blob: 59a164c7b4b9c2a790b185b86c0ff2e506471ac3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<TITLE>Apache module mod_asis</TITLE>
</HEAD>
<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
<BODY
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#000080"
ALINK="#FF0000"
>
<DIV ALIGN="CENTER">
<IMG SRC="../images/sub.gif" ALT="[APACHE DOCUMENTATION]">
<H3>
Apache HTTP Server Version 1.2
</H3>
</DIV>
<H1 ALIGN="CENTER">Module mod_asis</h1>
This module is contained in the <code>mod_asis.c</code> file, and
is compiled in by default. It provides for <code>.asis</code> files. Any
document with mime type <code>httpd/send-as-is</code> will be processed by
this module.
<!--%plaintext <?INDEX {\tt httpd/send-as-is} mime type> -->
<h2>Purpose</h2>
To allow file types to be defined such that Apache sends them without
adding HTTP headers.<P>
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.
<h2>Usage</h2>
In the server configuration file, define a new mime type called
<code>httpd/send-as-is</code> e.g.
<blockquote><code>AddType httpd/send-as-is asis</code></blockquote>
this defines the <code>.asis</code> file extension as being of the new
<code>httpd/send-as-is</code> mime type. The contents of any file with a
<code>.asis</code> extension will then be sent by Apache to the client with
almost no changes. Clients will need HTTP headers to be attached, so do not
forget them. A Status: header is also required; the data should be the
3-digit HTTP response code, followed by a textual message.<p>
Here's an example of a file whose contents are sent <em>as is</em> so as to
tell the client that a file has redirected.
<blockquote><code>
Status: 302 Now where did I leave that URL <br>
Location: http://xyz.abc.com/foo/bar.html <br>
Content-type: text/html <br>
<br>
<HTML> <br>
<HEAD> <br>
<TITLE>Lame excuses'R'us</TITLE> <br>
</HEAD> <br>
<BODY> <br>
<H1>Fred's exceptionally wonderful page has moved to <br>
<A HREF="http://xyz.abc.com/foo/bar.html">Joe's</A> site. <br>
</H1> <br>
</BODY> <br>
</HTML>
</code></blockquote>
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 <em>not</em> add a Last-Modified header; it probably should.
<P>
<HR>
<H3 ALIGN="CENTER">
Apache HTTP Server Version 1.2
</H3>
<A HREF="./"><IMG SRC="../images/index.gif" ALT="Index"></A>
<A HREF="../"><IMG SRC="../images/home.gif" ALT="Home"></A>
</BODY>
</HTML>
|