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