mod_asis.html revision 9f2717a179d48a28158c3dea7392da981220f835
bcb4e51a409d94ae670de96afb8483a4f7855294Stephan Bosch<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen<html>
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen <head>
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen <meta name="generator" content="HTML Tidy, see www.w3.org">
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen <title>Apache module mod_asis</title>
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen </head>
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen <!-- Background white, links blue (unvisited), navy (visited), red (active) -->
056e7cd4029d460afabff2dc27c269096d8661c1Timo Sirainen
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen <body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink=
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen "#000080" alink="#FF0000">
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen <!--#include virtual="header.html" -->
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen <h1 align="CENTER">Module mod_asis</h1>
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen <p>This module provides for sending files which contain their
54b88816e47ceeccf953751c90e64d86195d5c2dTimo Sirainen own HTTP headers.</p>
1a883718249b8db128a105ee7f03293873f1f9c5Timo Sirainen
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen <p><a href="module-dict.html#Status" rel=
cbe49ba128638e63395aedaa2144087c89835633Timo Sirainen "Help"><strong>Status:</strong></a> Base<br>
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen <a href="module-dict.html#SourceFile" rel="Help"><strong>Source
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen File:</strong></a> mod_asis.c<br>
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen <a href="module-dict.html#ModuleIdentifier" rel=
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen "Help"><strong>Module Identifier:</strong></a> asis_module</p>
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen
c93aca832ee532010ead91b85fa9f614132e1be2Stephan Bosch <h2>Summary</h2>
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen <p>This module provides the handler <code>send-as-is</code>
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen which causes Apache to send the document without adding most of
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen the usual HTTP headers.</p>
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen <p>This can be used to send any kind of data from the server,
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen including redirects and other special HTTP responses, without
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen requiring a cgi-script or an nph script.</p>
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen
8e1491e4924e3f9fc474a99438b6297b8d1ce1f3Timo Sirainen <p>For historical reasons, this module will also process any
8e1491e4924e3f9fc474a99438b6297b8d1ce1f3Timo Sirainen file with the mime type <code>httpd/send-as-is</code>.</p>
8e1491e4924e3f9fc474a99438b6297b8d1ce1f3Timo Sirainen
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen <h2>Directives</h2>
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen <p>This module provides no directives.</p>
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen <h2>Usage</h2>
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen <p>In the server configuration file, associate files with the
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen <code>send-as-is</code> handler <em>e.g.</em></p>
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen
c93aca832ee532010ead91b85fa9f614132e1be2Stephan Bosch <blockquote>
c93aca832ee532010ead91b85fa9f614132e1be2Stephan Bosch <code>AddHandler send-as-is asis</code>
c93aca832ee532010ead91b85fa9f614132e1be2Stephan Bosch </blockquote>
c93aca832ee532010ead91b85fa9f614132e1be2Stephan Bosch The contents of any file with a <code>.asis</code> extension
c93aca832ee532010ead91b85fa9f614132e1be2Stephan Bosch will then be sent by Apache to the client with almost no
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen changes. Clients will need HTTP headers to be attached, so do
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen not forget them. A Status: header is also required; the data
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen should be the 3-digit HTTP response code, followed by a textual
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen message.
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen <p>Here's an example of a file whose contents are sent <em>as
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen is</em> so as to tell the client that a file has
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen redirected.</p>
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen <blockquote>
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen <code>Status: 301 Now where did I leave that URL<br>
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen Location: http://xyz.abc.com/foo/bar.html<br>
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen Content-type: text/html<br>
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen <br>
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen &lt;HTML&gt;<br>
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen &lt;HEAD&gt;<br>
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen &lt;TITLE&gt;Lame excuses'R'us&lt;/TITLE&gt;<br>
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen &lt;/HEAD&gt;<br>
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen &lt;BODY&gt;<br>
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen &lt;H1&gt;Fred's exceptionally wonderful page has moved
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen to<br>
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen &lt;A
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen HREF="http://xyz.abc.com/foo/bar.html"&gt;Joe's&lt;/A&gt;
20e04227229970d148801c507946666e2a9bd838Timo Sirainen site.<br>
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen &lt;/H1&gt;<br>
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen &lt;/BODY&gt;<br>
eca38954bcf972618f6b85932a3690acbd2b673aTimo Sirainen &lt;/HTML&gt;</code>
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen </blockquote>
c7fd0af4fddec4a5a6d87d105a429e32429ae17dAki Tuomi
c7fd0af4fddec4a5a6d87d105a429e32429ae17dAki Tuomi <p>Notes: the server always adds a Date: and Server: header to
c7fd0af4fddec4a5a6d87d105a429e32429ae17dAki Tuomi the data returned to the client, so these should not be
c7fd0af4fddec4a5a6d87d105a429e32429ae17dAki Tuomi included in the file. The server does <em>not</em> add a
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen Last-Modified header; it probably should.
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen <!--#include virtual="footer.html" -->
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen </p>
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen </body>
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen</html>
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen