mod_asis.html revision f9b3be308809978f797e0c57b296147532a4313c
d6c63bd07b2e1b034b608fb8af3ae94e6c03ee08Derek Gathright<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
7f2b731c52d0326179ad6ef2f4611ba088dcee22Derek Gathright<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
d6fd645d5192ae6fff6d50db36de9f26bb4161d3Derek Gathright BGCOLOR="#FFFFFF"
d6fd645d5192ae6fff6d50db36de9f26bb4161d3Derek Gathright TEXT="#000000"
d6fd645d5192ae6fff6d50db36de9f26bb4161d3Derek Gathright LINK="#0000FF"
d6fd645d5192ae6fff6d50db36de9f26bb4161d3Derek Gathright VLINK="#000080"
1cdc9668bdd7d912d1be5b9f576c1fc35fdb20c2Derek Gathright ALINK="#FF0000"
d6fd645d5192ae6fff6d50db36de9f26bb4161d3Derek Gathright<!--#include virtual="header.html" -->
d6fd645d5192ae6fff6d50db36de9f26bb4161d3Derek GathrightThis module is contained in the <CODE>mod_asis.c</CODE> file, and
d6fd645d5192ae6fff6d50db36de9f26bb4161d3Derek Gathrightis compiled in by default. It provides for <CODE>.asis</CODE> files. Any
d6fd645d5192ae6fff6d50db36de9f26bb4161d3Derek Gathrightdocument with mime type <CODE>httpd/send-as-is</CODE> will be processed by
d6fd645d5192ae6fff6d50db36de9f26bb4161d3Derek Gathright<!--%plaintext <?INDEX {\tt httpd/send-as-is} mime type> -->
7f2b731c52d0326179ad6ef2f4611ba088dcee22Derek GathrightTo allow file types to be defined such that Apache sends them without
7f2b731c52d0326179ad6ef2f4611ba088dcee22Derek Gathrightadding HTTP headers.<P>
d6fd645d5192ae6fff6d50db36de9f26bb4161d3Derek GathrightThis can be used to send any kind of data from the server, including redirects
d6fd645d5192ae6fff6d50db36de9f26bb4161d3Derek Gathrightand other special HTTP responses, without requiring a cgi-script or an nph
d6fd645d5192ae6fff6d50db36de9f26bb4161d3Derek GathrightIn the server configuration file, define a new mime type called
d6fd645d5192ae6fff6d50db36de9f26bb4161d3Derek Gathright<BLOCKQUOTE><CODE>AddType httpd/send-as-is asis</CODE></BLOCKQUOTE>
d6fd645d5192ae6fff6d50db36de9f26bb4161d3Derek Gathrightthis defines the <CODE>.asis</CODE> file extension as being of the new
7f2b731c52d0326179ad6ef2f4611ba088dcee22Derek Gathright<CODE>httpd/send-as-is</CODE> mime type. The contents of any file with a
7f2b731c52d0326179ad6ef2f4611ba088dcee22Derek Gathright<CODE>.asis</CODE> extension will then be sent by Apache to the client with
7f2b731c52d0326179ad6ef2f4611ba088dcee22Derek Gathrightalmost no changes. Clients will need HTTP headers to be attached, so do not
1cdc9668bdd7d912d1be5b9f576c1fc35fdb20c2Derek Gathrightforget them. A Status: header is also required; the data should be the
d6fd645d5192ae6fff6d50db36de9f26bb4161d3Derek Gathright3-digit HTTP response code, followed by a textual message.<P>
d6fd645d5192ae6fff6d50db36de9f26bb4161d3Derek GathrightHere's an example of a file whose contents are sent <EM>as is</EM> so as to
d6fd645d5192ae6fff6d50db36de9f26bb4161d3Derek Gathrighttell the client that a file has redirected.
7f2b731c52d0326179ad6ef2f4611ba088dcee22Derek GathrightStatus: 301 Now where did I leave that URL <BR>
d6fd645d5192ae6fff6d50db36de9f26bb4161d3Derek GathrightLocation: http://xyz.abc.com/foo/bar.html <BR>
d6fd645d5192ae6fff6d50db36de9f26bb4161d3Derek Gathright<HTML> <BR>
d6fd645d5192ae6fff6d50db36de9f26bb4161d3Derek Gathright<HEAD> <BR>
1cdc9668bdd7d912d1be5b9f576c1fc35fdb20c2Derek Gathright<TITLE>Lame excuses'R'us</TITLE> <BR>
e9738690feeb7eae0899f34e5d0feec68bdbd48cDerek Gathright</HEAD> <BR>
800a6a9307a3bbe026f640d20ef73c3d627efc37Derek Gathright<BODY> <BR>
d6fd645d5192ae6fff6d50db36de9f26bb4161d3Derek Gathright<H1>Fred's exceptionally wonderful page has moved to <BR>
d6fd645d5192ae6fff6d50db36de9f26bb4161d3Derek Gathright<A HREF="http://xyz.abc.com/foo/bar.html">Joe's</A> site. <BR>
d6fd645d5192ae6fff6d50db36de9f26bb4161d3Derek Gathright</H1> <BR>
d6fd645d5192ae6fff6d50db36de9f26bb4161d3Derek Gathright</BODY> <BR>
800a6a9307a3bbe026f640d20ef73c3d627efc37Derek GathrightNotes: the server always adds a Date: and Server: header to the data returned
d6c63bd07b2e1b034b608fb8af3ae94e6c03ee08Derek Gathrightto the client, so these should not be included in the file.
d6fd645d5192ae6fff6d50db36de9f26bb4161d3Derek GathrightThe server does <EM>not</EM> add a Last-Modified header; it probably should.
1cdc9668bdd7d912d1be5b9f576c1fc35fdb20c2Derek Gathright<!--#include virtual="footer.html" -->