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