blob: 9d93d39f1577ce54f63d8990c0464d990e8a5e7e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator" content="HTML Tidy, see www.w3.org" />
<title>Apache module mod_asis</title>
</head>
<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF"
vlink="#000080" alink="#FF0000">
<div align="CENTER">
<img src="../images/sub.gif" alt="[APACHE DOCUMENTATION]" />
<h3>Apache HTTP Server Version 1.3</h3>
</div>
<h1 align="CENTER">Module mod_asis</h1>
<p>This module provides for sending files which contain their
own HTTP headers.</p>
<p><a href="module-dict.html#Status"
rel="Help"><strong>Status:</strong></a> Base<br />
<a href="module-dict.html#SourceFile"
rel="Help"><strong>Source File:</strong></a> mod_asis.c<br />
<a href="module-dict.html#ModuleIdentifier"
rel="Help"><strong>Module Identifier:</strong></a>
asis_module</p>
<h2>Summary</h2>
<p>This module provides the handler <code>send-as-is</code>
which causes Apache to send the document without adding most of
the usual HTTP headers.</p>
<p>This can be used to send any kind of data from the server,
including redirects and other special HTTP responses, without
requiring a cgi-script or an nph script.</p>
<p>For historical reasons, this module will also process any
file with the mime type <code>httpd/send-as-is</code>.</p>
<h2>Directives</h2>
<p>This module provides no directives.</p>
<h2>Usage</h2>
<p>In the server configuration file, associate files with the
<code>send-as-is</code> handler <em>e.g.</em></p>
<blockquote>
<code>AddHandler send-as-is asis</code>
</blockquote>
The contents of any file with a <code>.asis</code> extension
will then be sent by Apache to the client with almost no
changes. Clients will need HTTP headers to be attached, so do
not forget them. A Status: header is also required; the data
should be the 3-digit HTTP response code, followed by a textual
message.
<p>Here's an example of a file whose contents are sent <em>as
is</em> so as to tell the client that a file has
redirected.</p>
<blockquote>
<code>Status: 301 Now where did I leave that URL<br />
Location: http://xyz.abc.com/foo/bar.html<br />
Content-type: text/html<br />
<br />
<HTML><br />
<HEAD><br />
<TITLE>Lame excuses'R'us</TITLE><br />
</HEAD><br />
<BODY><br />
<H1>Fred's exceptionally wonderful page has moved
to<br />
<A
HREF="http://xyz.abc.com/foo/bar.html">Joe's</A>
site.<br />
</H1><br />
</BODY><br />
</HTML></code>
</blockquote>
<p>Notes: the server always adds a Date: and Server: header to
the data returned to the client, so these should not be
included in the file. The server does <em>not</em> add a
Last-Modified header; it probably should.
<hr />
<h3 align="CENTER">Apache HTTP Server Version 1.3</h3>
<a href="./"><img src="../images/index.gif" alt="Index" /></a>
<a href="../"><img src="../images/home.gif" alt="Home" /></a>
</p>
</body>
</html>
|