mod_asis.html revision 9f2717a179d48a28158c3dea7392da981220f835
bcb4e51a409d94ae670de96afb8483a4f7855294Stephan Bosch<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen <meta name="generator" content="HTML Tidy, see www.w3.org">
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen <!-- Background white, links blue (unvisited), navy (visited), red (active) -->
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen <body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink=
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen <!--#include virtual="header.html" -->
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen <p>This module provides for sending files which contain their
54b88816e47ceeccf953751c90e64d86195d5c2dTimo Sirainen own HTTP headers.</p>
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen <a href="module-dict.html#SourceFile" rel="Help"><strong>Source
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen <a href="module-dict.html#ModuleIdentifier" rel=
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen "Help"><strong>Module Identifier:</strong></a> asis_module</p>
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 <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>
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>
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>
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 <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 <code>Status: 301 Now where did I leave that URL<br>
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen <HTML><br>
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen <HEAD><br>
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen <TITLE>Lame excuses'R'us</TITLE><br>
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen </HEAD><br>
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen <BODY><br>
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen <H1>Fred's exceptionally wonderful page has moved
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen HREF="http://xyz.abc.com/foo/bar.html">Joe's</A>
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen </H1><br>
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen </BODY><br>
eca38954bcf972618f6b85932a3690acbd2b673aTimo Sirainen </HTML></code>
1ea214b620715aa8b213c5686383b821e720fe42Timo Sirainen </blockquote>
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" -->