|The Apache HTTP Server Reference Manual
by Apache Software Foundation
Paperback (6"x9"), 862 pages
RRP £19.95 ($29.95)
Sends files that contain their own HTTP headers
This module provides the handler send-as-is which causes Apache to send the document without adding most of the usual HTTP headers.
This can be used to send any kind of data from the server, including redirects and other special HTTP responses, without requiring a CGI script or an NPH script.
For historical reasons, this module will also process any file with the mime type httpd/send-as-is.
This module provides no directives.
In the server configuration file, associate files with the send-as-is handler e.g.
AddHandler send-as-is asis
The contents of any file with a .asis extension will then be sent by Apache to the client with almost no changes. In particular, HTTP headers are derived from the file itself according to mod_cgi rules, so an asis file must include valid headers, and may also use the CGI Status: header to determine the HTTP response code.
Here’s an example of a file whose contents are sent as is so as to tell the client that a file has redirected.
Status: 301 Now where did I leave that URL
<h1>Fred’s exceptionally wonderful page has moved to
<a href="http://xyz.abc.com/foo/bar.html">Joe’s</a> site.
Notes: The server always adds a Date: and Server: header to the data returned to the client, so these should not be included in the file. The server does not add a Last-Modified header; it probably should.
|ISBN 9781906966034||The Apache HTTP Server Reference Manual||See the print edition|