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