mod_asis.html revision 7ee5602ce4340bfce2da30914c3bc32331296439
ea8572f0df1c69b398e9d677648a0fa5f31b2d60pquerna<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
ea8572f0df1c69b398e9d677648a0fa5f31b2d60pquerna<HTML>
ea8572f0df1c69b398e9d677648a0fa5f31b2d60pquerna<HEAD>
ea8572f0df1c69b398e9d677648a0fa5f31b2d60pquerna<TITLE>Apache module mod_asis</TITLE>
ea8572f0df1c69b398e9d677648a0fa5f31b2d60pquerna</HEAD>
ea8572f0df1c69b398e9d677648a0fa5f31b2d60pquerna
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding<BODY
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding BGCOLOR="#FFFFFF"
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding TEXT="#000000"
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding LINK="#0000FF"
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding VLINK="#000080"
ea8572f0df1c69b398e9d677648a0fa5f31b2d60pquerna ALINK="#FF0000"
ea8572f0df1c69b398e9d677648a0fa5f31b2d60pquerna>
ea8572f0df1c69b398e9d677648a0fa5f31b2d60pquerna<!--#include virtual="header.html" -->
ea8572f0df1c69b398e9d677648a0fa5f31b2d60pquerna
ea8572f0df1c69b398e9d677648a0fa5f31b2d60pquerna<H1 ALIGN="CENTER">Module mod_asis</H1>
ea8572f0df1c69b398e9d677648a0fa5f31b2d60pquerna
ea8572f0df1c69b398e9d677648a0fa5f31b2d60pquerna<P>This module provides for sending files which contain their own
ea8572f0df1c69b398e9d677648a0fa5f31b2d60pquernaHTTP headers.
ea8572f0df1c69b398e9d677648a0fa5f31b2d60pquerna
ea8572f0df1c69b398e9d677648a0fa5f31b2d60pquerna<P><A
ea8572f0df1c69b398e9d677648a0fa5f31b2d60pquernaHREF="module-dict.html#Status"
ea8572f0df1c69b398e9d677648a0fa5f31b2d60pquernaREL="Help"
7677dd9b01d498a2af1cddb8e2506a25d7da630btrawick><STRONG>Status:</STRONG></A> Base
7677dd9b01d498a2af1cddb8e2506a25d7da630btrawick<BR>
ea8572f0df1c69b398e9d677648a0fa5f31b2d60pquerna<A
ea8572f0df1c69b398e9d677648a0fa5f31b2d60pquernaHREF="module-dict.html#SourceFile"
ea8572f0df1c69b398e9d677648a0fa5f31b2d60pquernaREL="Help"
ea8572f0df1c69b398e9d677648a0fa5f31b2d60pquerna><STRONG>Source File:</STRONG></A> mod_asis.c
ea8572f0df1c69b398e9d677648a0fa5f31b2d60pquerna<BR>
57758b7ebacbd303cb1c004dd67dd8e5cc1055dbslive<A
57758b7ebacbd303cb1c004dd67dd8e5cc1055dbsliveHREF="module-dict.html#ModuleIdentifier"
57758b7ebacbd303cb1c004dd67dd8e5cc1055dbsliveREL="Help"
57758b7ebacbd303cb1c004dd67dd8e5cc1055dbslive><STRONG>Module Identifier:</STRONG></A> asis_module
57758b7ebacbd303cb1c004dd67dd8e5cc1055dbslive</P>
57758b7ebacbd303cb1c004dd67dd8e5cc1055dbslive
57758b7ebacbd303cb1c004dd67dd8e5cc1055dbslive<H2>Summary</H2>
57758b7ebacbd303cb1c004dd67dd8e5cc1055dbslive
57758b7ebacbd303cb1c004dd67dd8e5cc1055dbslive<p>This module provides the handler <code>send-as-is</code> wich
ea8572f0df1c69b398e9d677648a0fa5f31b2d60pquernacauses Apache to send the document without adding most of the usual
ea8572f0df1c69b398e9d677648a0fa5f31b2d60pquernaHTTP headers.</p>
ea8572f0df1c69b398e9d677648a0fa5f31b2d60pquerna
57758b7ebacbd303cb1c004dd67dd8e5cc1055dbslive<P>This can be used to send any kind of data from the server,
57758b7ebacbd303cb1c004dd67dd8e5cc1055dbsliveincluding redirects and other special HTTP responses, without
57758b7ebacbd303cb1c004dd67dd8e5cc1055dbsliverequiring a cgi-script or an nph script.
57758b7ebacbd303cb1c004dd67dd8e5cc1055dbslive
57758b7ebacbd303cb1c004dd67dd8e5cc1055dbslive<p>For historical reasons, this module will also process any file with
57758b7ebacbd303cb1c004dd67dd8e5cc1055dbslivethe mime type <code>httpd/send-as-is</code>.
57758b7ebacbd303cb1c004dd67dd8e5cc1055dbslive
57758b7ebacbd303cb1c004dd67dd8e5cc1055dbslive<H2>Directives</H2>
57758b7ebacbd303cb1c004dd67dd8e5cc1055dbslive
27b9f42e4e894c2a8ed786f87d0fc134a50fcdd8humbedooh<P>This module provides no directives.
381b101317d64df9ce37f788d903a999f9f26ca7rbowen
57758b7ebacbd303cb1c004dd67dd8e5cc1055dbslive<H2>Usage</H2>
57758b7ebacbd303cb1c004dd67dd8e5cc1055dbslive
188a5ef97e793cb79096d1297a37747b1de03457sf<P>In the server configuration file, associate files with the
188a5ef97e793cb79096d1297a37747b1de03457sf<code>send-as-is</code> handler <EM>e.g.</EM>
188a5ef97e793cb79096d1297a37747b1de03457sf<BLOCKQUOTE><CODE>AddHandler send-as-is asis</CODE></BLOCKQUOTE>
188a5ef97e793cb79096d1297a37747b1de03457sfThe contents of any file with a <CODE>.asis</CODE> extension will then
188a5ef97e793cb79096d1297a37747b1de03457sfbe sent by Apache to the client with almost no changes. Clients will
188a5ef97e793cb79096d1297a37747b1de03457sfneed HTTP headers to be attached, so do not forget them. A Status:
35e26fe7e0920b607afc63a645c846633f0e6889minfrinheader is also required; the data should be the 3-digit HTTP response
35e26fe7e0920b607afc63a645c846633f0e6889minfrincode, followed by a textual message.
35e26fe7e0920b607afc63a645c846633f0e6889minfrin
35e26fe7e0920b607afc63a645c846633f0e6889minfrin<P>Here's an example of a file whose contents are sent <EM>as is</EM>
35e26fe7e0920b607afc63a645c846633f0e6889minfrinso as to tell the client that a file has redirected.
57758b7ebacbd303cb1c004dd67dd8e5cc1055dbslive<BLOCKQUOTE><CODE> Status: 301 Now where did I leave that URL <BR>
e06a6bccd7ccb44e34fe2de158e0450393f1683bsfLocation: http://xyz.abc.com/foo/bar.html <BR>
e06a6bccd7ccb44e34fe2de158e0450393f1683bsfContent-type: text/html
e06a6bccd7ccb44e34fe2de158e0450393f1683bsf<BR>
e06a6bccd7ccb44e34fe2de158e0450393f1683bsf<BR>
e06a6bccd7ccb44e34fe2de158e0450393f1683bsf&lt;HTML&gt; <BR>
e06a6bccd7ccb44e34fe2de158e0450393f1683bsf&lt;HEAD&gt; <BR>
e06a6bccd7ccb44e34fe2de158e0450393f1683bsf&lt;TITLE&gt;Lame excuses'R'us&lt;/TITLE&gt; <BR>
e06a6bccd7ccb44e34fe2de158e0450393f1683bsf&lt;/HEAD&gt; <BR>
57758b7ebacbd303cb1c004dd67dd8e5cc1055dbslive&lt;BODY&gt; <BR>
57758b7ebacbd303cb1c004dd67dd8e5cc1055dbslive&lt;H1&gt;Fred's exceptionally wonderful page has moved to <BR>
57758b7ebacbd303cb1c004dd67dd8e5cc1055dbslive&lt;A HREF="http://xyz.abc.com/foo/bar.html"&gt;Joe's&lt;/A&gt; site. <BR>
57758b7ebacbd303cb1c004dd67dd8e5cc1055dbslive&lt;/H1&gt; <BR>
57758b7ebacbd303cb1c004dd67dd8e5cc1055dbslive&lt;/BODY&gt; <BR>
57758b7ebacbd303cb1c004dd67dd8e5cc1055dbslive&lt;/HTML&gt;
57758b7ebacbd303cb1c004dd67dd8e5cc1055dbslive</CODE></BLOCKQUOTE>
57758b7ebacbd303cb1c004dd67dd8e5cc1055dbslive
1d9308ed0075062953a246d16bcda888a1be1adeslive<P>Notes: the server always adds a Date: and Server: header to the data returned
1d9308ed0075062953a246d16bcda888a1be1adesliveto the client, so these should not be included in the file.
1d9308ed0075062953a246d16bcda888a1be1adesliveThe server does <EM>not</EM> add a Last-Modified header; it probably should.
1d9308ed0075062953a246d16bcda888a1be1adeslive
1d9308ed0075062953a246d16bcda888a1be1adeslive<!--#include virtual="footer.html" -->
ea8572f0df1c69b398e9d677648a0fa5f31b2d60pquerna</BODY>
ea8572f0df1c69b398e9d677648a0fa5f31b2d60pquerna</HTML>
1d9308ed0075062953a246d16bcda888a1be1adeslive