]> granicus.if.org Git - apache/blob - docs/manual/mod/mod_asis.xml
switch to the new format for outdated revision references
[apache] / docs / manual / mod / mod_asis.xml
1 <?xml version="1.0"?>
2 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
3 <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
4 <!-- $LastChangedRevision$ -->
5
6 <!--
7  Copyright 2002-2004 The Apache Software Foundation
8
9  Licensed under the Apache License, Version 2.0 (the "License");
10  you may not use this file except in compliance with the License.
11  You may obtain a copy of the License at
12
13      http://www.apache.org/licenses/LICENSE-2.0
14
15  Unless required by applicable law or agreed to in writing, software
16  distributed under the License is distributed on an "AS IS" BASIS,
17  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  See the License for the specific language governing permissions and
19  limitations under the License.
20 -->
21
22 <modulesynopsis metafile="mod_asis.xml.meta">
23
24 <name>mod_asis</name>
25 <description>Sends files that contain their own
26 HTTP headers</description>
27 <status>Base</status>
28 <sourcefile>mod_asis.c</sourcefile>
29 <identifier>asis_module</identifier>
30
31 <summary>
32     <p>This module provides the handler <code>send-as-is</code>
33     which causes Apache to send the document without adding most of
34     the usual HTTP headers.</p>
35
36     <p>This can be used to send any kind of data from the server,
37     including redirects and other special HTTP responses, without
38     requiring a cgi-script or an nph script.</p>
39
40     <p>For historical reasons, this module will also process any
41     file with the mime type <code>httpd/send-as-is</code>.</p>
42 </summary>
43
44 <seealso><module>mod_headers</module></seealso>
45 <seealso><module>mod_cern_meta</module></seealso>
46 <seealso><a href="../handler.html">Apache's Handler Use</a></seealso>
47
48 <section id="usage"><title>Usage</title>
49
50     <p>In the server configuration file, associate files with the
51     <code>send-as-is</code> handler <em>e.g.</em></p>
52
53     <example>AddHandler send-as-is asis</example>
54
55     <p>The contents of any file with a <code>.asis</code> extension
56     will then be sent by Apache to the client with almost no
57     changes. Clients will need HTTP headers to be attached, so do
58     not forget them. A Status: header is also required; the data
59     should be the 3-digit HTTP response code, followed by a textual
60     message.</p>
61
62     <p>Here's an example of a file whose contents are sent <em>as
63     is</em> so as to tell the client that a file has
64     redirected.</p>
65
66
67     <example>
68       Status: 301 Now where did I leave that URL<br />
69       Location: http://xyz.abc.com/foo/bar.html<br />
70       Content-type: text/html<br />
71       <br />
72       &lt;html&gt;<br />
73       &lt;head&gt;<br />
74       &lt;title&gt;Lame excuses'R'us&lt;/title&gt;<br />
75       &lt;/head&gt;<br />
76       &lt;body&gt;<br />
77       &lt;h1&gt;Fred's exceptionally wonderful page has moved to<br />
78       &lt;a href="http://xyz.abc.com/foo/bar.html"&gt;Joe's&lt;/a&gt;
79       site.<br />
80       &lt;/h1&gt;<br />
81       &lt;/body&gt;<br />
82       &lt;/html&gt;
83     </example>
84
85     <note><title>Notes:</title>
86     <p>The server always adds a <code>Date:</code> and <code>Server:</code>
87     header to the data returned to the client, so these should not be
88     included in the file. The server does <em>not</em> add a
89     <code>Last-Modified</code> header; it probably should.</p>
90     </note>
91 </section>
92
93 </modulesynopsis>