mod_asis.xml revision 7db9f691a00ead175b03335457ca296a33ddf31b
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<?xml version="1.0"?>
530eba85dbd41b8a0fa5255d3648d1440199a661slive<!DOCTYPE modulesynopsis SYSTEM "/style/modulesynopsis.dtd">
e942c741056732f50da2074b36fe59805d370650slive<?xml-stylesheet type="text/xsl" href="/style/manual.en.xsl"?>
5f5d1b4cc970b7f06ff8ef6526128e9a27303d88nd<modulesynopsis metafile="mod_asis.xml.meta">
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd<name>mod_asis</name>
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding<description>Sends files that contain their own
db479b48bd4d75423ed4a45e15b75089d1a8ad72fieldingHTTP headers</description>
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding<status>Base</status>
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding<sourcefile>mod_asis.c</sourcefile>
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding<identifier>asis_module</identifier>
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd<summary>
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd <p>This module provides the handler <code>send-as-is</code>
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd which causes Apache to send the document without adding most of
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd the usual HTTP headers.</p>
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd <p>This can be used to send any kind of data from the server,
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd including redirects and other special HTTP responses, without
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd requiring a cgi-script or an nph script.</p>
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd <p>For historical reasons, this module will also process any
7db9f691a00ead175b03335457ca296a33ddf31bnd file with the mime type <code>httpd/send-as-is</code>.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</summary>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><module>mod_headers</module></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<seealso><module>mod_cern_meta</module></seealso>
530eba85dbd41b8a0fa5255d3648d1440199a661slive<seealso><a href="/handler.html">Apache's Handler Use</a></seealso>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<section id="usage"><title>Usage</title>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <p>In the server configuration file, associate files with the
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <code>send-as-is</code> handler <em>e.g.</em></p>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe <example>AddHandler send-as-is asis</example>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <p>The contents of any file with a <code>.asis</code> extension
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna will then be sent by Apache to the client with almost no
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna changes. Clients will need HTTP headers to be attached, so do
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna not forget them. A Status: header is also required; the data
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna should be the 3-digit HTTP response code, followed by a textual
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna message.</p>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe <p>Here's an example of a file whose contents are sent <em>as
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe is</em> so as to tell the client that a file has
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe redirected.</p>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe <example>
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe Status: 301 Now where did I leave that URL<br />
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe Location: http://xyz.abc.com/foo/bar.html<br />
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna Content-type: text/html<br />
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <br />
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna &lt;html&gt;<br />
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna &lt;head&gt;<br />
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna &lt;title&gt;Lame excuses'R'us&lt;/title&gt;<br />
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna &lt;/head&gt;<br />
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna &lt;body&gt;<br />
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna &lt;h1&gt;Fred's exceptionally wonderful page has moved to<br />
90efa9f1730742d874edb5a7803adce11c9f08eanoodl &lt;a href="http://xyz.abc.com/foo/bar.html"&gt;Joe's&lt;/a&gt;
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna site.<br />
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna &lt;/h1&gt;<br />
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna &lt;/body&gt;<br />
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna &lt;/html&gt;
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna </example>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <note><title>Notes:</title>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <p>The server always adds a <code>Date:</code> and <code>Server:</code>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna header to the data returned to the client, so these should not be
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna included in the file. The server does <em>not</em> add a
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <code>Last-Modified</code> header; it probably should.</p>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna </note>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna</section>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna</modulesynopsis>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna