Module mod_asis

Module mod_asis does not provide directives for the IBM® HTTP Server for i Web server.

Summary

The module mod_asis provides the handler send-as-is which causes Apache HTTP Server 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.

This module will also process any file with the mime type httpd/send-as-is.

Usage

In the server configuration file, associate files with the send-as-is handler, for example:

AddType httpd/send-as-is asis 

The contents of any file with a .asis extension will then be sent by Apache HTTP Server 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. The Content-Length: header will automatically be inserted or, if included, corrected by HTTP Server.

Here is an example of a file whose contents are sent asis, telling the client that a file has redirected.

Status: 301 Now where did I leave that URL
Location: http://xyz.example.com/foo/bar.html
Content-type: text/html

<HTML>
<HEAD>
<TITLE>Lame excuses'R'us</TITLE>
</HEAD>
<BODY>
<H1>Fred's exceptionally wonderful page has moved to
<A HREF="http://xyz.example.com/foo/bar.html">Joe's</A> site.
</H1>
</BODY>
</HTML>
Note: 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.