mod_asis.html revision 7ee5602ce4340bfce2da30914c3bc32331296439
bcb4e51a409d94ae670de96afb8483a4f7855294Stephan Bosch<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen<HTML>
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen<HEAD>
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen<TITLE>Apache module mod_asis</TITLE>
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen</HEAD>
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen<BODY
f32c6ed9db6f4c535f97a2020401572efc8abf86Timo Sirainen BGCOLOR="#FFFFFF"
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen TEXT="#000000"
f32c6ed9db6f4c535f97a2020401572efc8abf86Timo Sirainen LINK="#0000FF"
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen VLINK="#000080"
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen ALINK="#FF0000"
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen>
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen<!--#include virtual="header.html" -->
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen<H1 ALIGN="CENTER">Module mod_asis</H1>
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen<P>This module provides for sending files which contain their own
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo SirainenHTTP headers.
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen<P><A
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo SirainenHREF="module-dict.html#Status"
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo SirainenREL="Help"
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen><STRONG>Status:</STRONG></A> Base
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen<BR>
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen<A
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo SirainenHREF="module-dict.html#SourceFile"
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo SirainenREL="Help"
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen><STRONG>Source File:</STRONG></A> mod_asis.c
f24edebe360d3effe584a884aa7d119daf3fd371Aki Tuomi<BR>
f24edebe360d3effe584a884aa7d119daf3fd371Aki Tuomi<A
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo SirainenHREF="module-dict.html#ModuleIdentifier"
2bc963ea051ddacefe0fa5e26280e8ef853fd6c6Timo SirainenREL="Help"
2bc963ea051ddacefe0fa5e26280e8ef853fd6c6Timo Sirainen><STRONG>Module Identifier:</STRONG></A> asis_module
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen</P>
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen<H2>Summary</H2>
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen<p>This module provides the handler <code>send-as-is</code> wich
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainencauses Apache to send the document without adding most of the usual
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo SirainenHTTP headers.</p>
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen<P>This can be used to send any kind of data from the server,
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainenincluding redirects and other special HTTP responses, without
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainenrequiring a cgi-script or an nph script.
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen<p>For historical reasons, this module will also process any file with
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainenthe mime type <code>httpd/send-as-is</code>.
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen<H2>Directives</H2>
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen<P>This module provides no directives.
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen<H2>Usage</H2>
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen<P>In the server configuration file, associate files with the
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen<code>send-as-is</code> handler <EM>e.g.</EM>
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen<BLOCKQUOTE><CODE>AddHandler send-as-is asis</CODE></BLOCKQUOTE>
2bc963ea051ddacefe0fa5e26280e8ef853fd6c6Timo SirainenThe contents of any file with a <CODE>.asis</CODE> extension will then
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainenbe sent by Apache to the client with almost no changes. Clients will
efe78d3ba24fc866af1c79b9223dc0809ba26cadStephan Boschneed HTTP headers to be attached, so do not forget them. A Status:
efe78d3ba24fc866af1c79b9223dc0809ba26cadStephan Boschheader is also required; the data should be the 3-digit HTTP response
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainencode, followed by a textual message.
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen<P>Here's an example of a file whose contents are sent <EM>as is</EM>
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainenso as to tell the client that a file has redirected.
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen<BLOCKQUOTE><CODE> Status: 301 Now where did I leave that URL <BR>
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo SirainenLocation: http://xyz.abc.com/foo/bar.html <BR>
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo SirainenContent-type: text/html
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen<BR>
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen<BR>
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen&lt;HTML&gt; <BR>
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen&lt;HEAD&gt; <BR>
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen&lt;TITLE&gt;Lame excuses'R'us&lt;/TITLE&gt; <BR>
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen&lt;/HEAD&gt; <BR>
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen&lt;BODY&gt; <BR>
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen&lt;H1&gt;Fred's exceptionally wonderful page has moved to <BR>
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen&lt;A HREF="http://xyz.abc.com/foo/bar.html"&gt;Joe's&lt;/A&gt; site. <BR>
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen&lt;/H1&gt; <BR>
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen&lt;/BODY&gt; <BR>
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen&lt;/HTML&gt;
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen</CODE></BLOCKQUOTE>
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen<P>Notes: the server always adds a Date: and Server: header to the data returned
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainento the client, so these should not be included in the file.
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo SirainenThe server does <EM>not</EM> add a Last-Modified header; it probably should.
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen<!--#include virtual="footer.html" -->
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen</BODY>
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen</HTML>
5ef28f68edef46f69961b19b7c1dcd8ec5a955e8Timo Sirainen