]> granicus.if.org Git - apache/blob - docs/manual/mod/mod_asis.html.en
Update transforms
[apache] / docs / manual / mod / mod_asis.html.en
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
4         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
5               This file is generated from xml source: DO NOT EDIT
6         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
7       -->
8 <title>mod_asis - Apache HTTP Server</title>
9 <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
10 <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
11 <link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
12 <link href="../images/favicon.ico" rel="shortcut icon" /></head>
13 <body>
14 <div id="page-header">
15 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
16 <p class="apache">Apache HTTP Server Version 2.3</p>
17 <img alt="" src="../images/feather.gif" /></div>
18 <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
19 <div id="path">
20 <a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.3</a> &gt; <a href="./">Modules</a></div>
21 <div id="page-content">
22 <div id="preamble"><h1>Apache Module mod_asis</h1>
23 <div class="toplang">
24 <p><span>Available Languages: </span><a href="../en/mod/mod_asis.html" title="English">&nbsp;en&nbsp;</a> |
25 <a href="../fr/mod/mod_asis.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
26 <a href="../ja/mod/mod_asis.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
27 <a href="../ko/mod/mod_asis.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a></p>
28 </div>
29 <table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Sends files that contain their own
30 HTTP headers</td></tr>
31 <tr><th><a href="module-dict.html#Status">Status:</a></th><td>Base</td></tr>
32 <tr><th><a href="module-dict.html#ModuleIdentifier">Module Identifier:</a></th><td>asis_module</td></tr>
33 <tr><th><a href="module-dict.html#SourceFile">Source File:</a></th><td>mod_asis.c</td></tr></table>
34 <h3>Summary</h3>
35
36     <p>This module provides the handler <code>send-as-is</code>
37     which causes Apache HTTP Server to send the document without adding most of
38     the usual HTTP headers.</p>
39
40     <p>This can be used to send any kind of data from the server,
41     including redirects and other special HTTP responses, without
42     requiring a cgi-script or an nph script.</p>
43
44     <p>For historical reasons, this module will also process any
45     file with the mime type <code>httpd/send-as-is</code>.</p>
46 </div>
47 <div id="quickview"><h3 class="directives">Directives</h3>
48 <p>This module provides no
49             directives.</p>
50 <h3>Topics</h3>
51 <ul id="topics">
52 <li><img alt="" src="../images/down.gif" /> <a href="#usage">Usage</a></li>
53 </ul><h3>See also</h3>
54 <ul class="seealso">
55 <li><code class="module"><a href="../mod/mod_headers.html">mod_headers</a></code></li>
56 <li><code class="module"><a href="../mod/mod_cern_meta.html">mod_cern_meta</a></code></li>
57 <li><a href="../handler.html">Apache httpd's Handler Use</a></li>
58 </ul></div>
59 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
60 <div class="section">
61 <h2><a name="usage" id="usage">Usage</a></h2>
62
63     <p>In the server configuration file, associate files with the
64     <code>send-as-is</code> handler <em>e.g.</em></p>
65
66     <div class="example"><p><code>AddHandler send-as-is asis</code></p></div>
67
68     <p>The contents of any file with a <code>.asis</code> extension
69     will then be sent by Apache httpd to the client with almost no
70     changes. In particular, HTTP headers are derived from the file
71     itself according to <code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code> rules, so an asis
72     file must include valid headers, and may also use the CGI
73     <code>Status:</code> header to determine the HTTP response
74     code. The <code>Content-Length:</code> header will automatically
75     be inserted or, if included, corrected by httpd.</p>
76
77     <p>Here's an example of a file whose contents are sent <em>as
78     is</em> so as to tell the client that a file has
79     redirected.</p>
80
81
82     <div class="example"><p><code>
83       Status: 301 Now where did I leave that URL<br />
84       Location: http://xyz.example.com/foo/bar.html<br />
85       Content-type: text/html<br />
86       <br />
87       &lt;html&gt;<br />
88       &lt;head&gt;<br />
89       &lt;title&gt;Lame excuses'R'us&lt;/title&gt;<br />
90       &lt;/head&gt;<br />
91       &lt;body&gt;<br />
92       &lt;h1&gt;Fred's exceptionally wonderful page has moved to<br />
93       &lt;a href="http://xyz.example.com/foo/bar.html"&gt;Joe's&lt;/a&gt;
94       site.<br />
95       &lt;/h1&gt;<br />
96       &lt;/body&gt;<br />
97       &lt;/html&gt;
98     </code></p></div>
99
100     <div class="note"><h3>Notes:</h3>
101     <p>The server always adds a <code>Date:</code> and <code>Server:</code>
102     header to the data returned to the client, so these should not be
103     included in the file. The server does <em>not</em> add a
104     <code>Last-Modified</code> header; it probably should.</p>
105     </div>
106 </div>
107 </div>
108 <div class="bottomlang">
109 <p><span>Available Languages: </span><a href="../en/mod/mod_asis.html" title="English">&nbsp;en&nbsp;</a> |
110 <a href="../fr/mod/mod_asis.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
111 <a href="../ja/mod/mod_asis.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
112 <a href="../ko/mod/mod_asis.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a></p>
113 </div><div id="footer">
114 <p class="apache">Copyright 2011 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
115 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div>
116 </body></html>