mod_asis.xml revision d72b7c0771ea253d02b75655ceed7a762dbf3aaa
59879db9d12c2ea10f77b2c44d6d3aba89bb9cb3slive<?xml version="1.0"?>
59879db9d12c2ea10f77b2c44d6d3aba89bb9cb3slive<!DOCTYPE modulesynopsis SYSTEM "/style/modulesynopsis.dtd">
fd9abdda70912b99b24e3bf1a38f26fde908a74cnd<?xml-stylesheet type="text/xsl" href="/style/manual.en.xsl"?>
fd9abdda70912b99b24e3bf1a38f26fde908a74cnd<!-- $LastChangedRevision$ -->
fd9abdda70912b99b24e3bf1a38f26fde908a74cnd
59879db9d12c2ea10f77b2c44d6d3aba89bb9cb3slive<!--
59879db9d12c2ea10f77b2c44d6d3aba89bb9cb3slive Copyright 2002-2005 The Apache Software Foundation or its licensors, as
59879db9d12c2ea10f77b2c44d6d3aba89bb9cb3slive applicable.
5a58787efeb02a1c3f06569d019ad81fd2efa06end
96ad5d81ee4a2cc66a4ae19893efc8aa6d06fae7jailletc Licensed under the Apache License, Version 2.0 (the "License");
5a58787efeb02a1c3f06569d019ad81fd2efa06end you may not use this file except in compliance with the License.
5a58787efeb02a1c3f06569d019ad81fd2efa06end You may obtain a copy of the License at
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen
2e545ce2450a9953665f701bb05350f0d3f26275nd http://www.apache.org/licenses/LICENSE-2.0
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen Unless required by applicable law or agreed to in writing, software
5a58787efeb02a1c3f06569d019ad81fd2efa06end distributed under the License is distributed on an "AS IS" BASIS,
00c2cccc28f249fb3b968ddf3e05508595290d40nd WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
af33a4994ae2ff15bc67d19ff1a7feb906745bf8rbowen See the License for the specific language governing permissions and
3f08db06526d6901aa08c110b5bc7dde6bc39905nd limitations under the License.
5a58787efeb02a1c3f06569d019ad81fd2efa06end-->
5a58787efeb02a1c3f06569d019ad81fd2efa06end
5a58787efeb02a1c3f06569d019ad81fd2efa06end<modulesynopsis metafile="mod_asis.xml.meta">
3f08db06526d6901aa08c110b5bc7dde6bc39905nd
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd<name>mod_asis</name>
5652dbe450e4fcfdf36d4cfb42d7f2345ded29a4maczniak<description>Sends files that contain their own
8928b6e739f1de5efcfa2a258f2cee76b52c6dfdgryzorHTTP headers</description>
e1e8390280254f7f0580d701e583f670643d4f3fnilgun<status>Base</status>
d474d8ef01ec5c2a09341cd148851ed383c3287crbowen<sourcefile>mod_asis.c</sourcefile>
d474d8ef01ec5c2a09341cd148851ed383c3287crbowen<identifier>asis_module</identifier>
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd<summary>
59879db9d12c2ea10f77b2c44d6d3aba89bb9cb3slive <p>This module provides the handler <code>send-as-is</code>
59879db9d12c2ea10f77b2c44d6d3aba89bb9cb3slive which causes Apache to send the document without adding most of
59879db9d12c2ea10f77b2c44d6d3aba89bb9cb3slive the usual HTTP headers.</p>
59879db9d12c2ea10f77b2c44d6d3aba89bb9cb3slive
7449c2bb2dd95f8d0dd1b3ede8b56a0e26cc0fa6nd <p>This can be used to send any kind of data from the server,
7449c2bb2dd95f8d0dd1b3ede8b56a0e26cc0fa6nd including redirects and other special HTTP responses, without
7449c2bb2dd95f8d0dd1b3ede8b56a0e26cc0fa6nd requiring a cgi-script or an nph script.</p>
7449c2bb2dd95f8d0dd1b3ede8b56a0e26cc0fa6nd
7449c2bb2dd95f8d0dd1b3ede8b56a0e26cc0fa6nd <p>For historical reasons, this module will also process any
7449c2bb2dd95f8d0dd1b3ede8b56a0e26cc0fa6nd file with the mime type <code>httpd/send-as-is</code>.</p>
7449c2bb2dd95f8d0dd1b3ede8b56a0e26cc0fa6nd</summary>
59879db9d12c2ea10f77b2c44d6d3aba89bb9cb3slive
59879db9d12c2ea10f77b2c44d6d3aba89bb9cb3slive<seealso><module>mod_headers</module></seealso>
59879db9d12c2ea10f77b2c44d6d3aba89bb9cb3slive<seealso><module>mod_cern_meta</module></seealso>
59879db9d12c2ea10f77b2c44d6d3aba89bb9cb3slive<seealso><a href="/handler.html">Apache's Handler Use</a></seealso>
59879db9d12c2ea10f77b2c44d6d3aba89bb9cb3slive
59879db9d12c2ea10f77b2c44d6d3aba89bb9cb3slive<section id="usage"><title>Usage</title>
59879db9d12c2ea10f77b2c44d6d3aba89bb9cb3slive
59879db9d12c2ea10f77b2c44d6d3aba89bb9cb3slive <p>In the server configuration file, associate files with the
59879db9d12c2ea10f77b2c44d6d3aba89bb9cb3slive <code>send-as-is</code> handler <em>e.g.</em></p>
59879db9d12c2ea10f77b2c44d6d3aba89bb9cb3slive
59879db9d12c2ea10f77b2c44d6d3aba89bb9cb3slive <example>AddHandler send-as-is asis</example>
59879db9d12c2ea10f77b2c44d6d3aba89bb9cb3slive
59879db9d12c2ea10f77b2c44d6d3aba89bb9cb3slive <p>The contents of any file with a <code>.asis</code> extension
59879db9d12c2ea10f77b2c44d6d3aba89bb9cb3slive will then be sent by Apache to the client with almost no
59879db9d12c2ea10f77b2c44d6d3aba89bb9cb3slive changes. In particular, HTTP headers are derived from the file
59879db9d12c2ea10f77b2c44d6d3aba89bb9cb3slive itself according to <module>mod_cgi</module> rules, so an asis
59879db9d12c2ea10f77b2c44d6d3aba89bb9cb3slive file must include valid headers, and may also use the CGI
0a5e1567f7fa7f5706c68d09f744673c6cb99b33nd Status: header to determine the HTTP response code.</p>
ae08254467d40ebbf0830ca618b06d51330556f9jsl
ae08254467d40ebbf0830ca618b06d51330556f9jsl <p>Here's an example of a file whose contents are sent <em>as
ae08254467d40ebbf0830ca618b06d51330556f9jsl is</em> so as to tell the client that a file has
ae08254467d40ebbf0830ca618b06d51330556f9jsl redirected.</p>
ae08254467d40ebbf0830ca618b06d51330556f9jsl
ae08254467d40ebbf0830ca618b06d51330556f9jsl
1f5c891e2da26b6b787e429aa71d9c899cc26dfcnoodl <example>
1f5c891e2da26b6b787e429aa71d9c899cc26dfcnoodl Status: 301 Now where did I leave that URL<br />
1f5c891e2da26b6b787e429aa71d9c899cc26dfcnoodl Location: http://xyz.abc.com/foo/bar.html<br />
1f5c891e2da26b6b787e429aa71d9c899cc26dfcnoodl Content-type: text/html<br />
1f5c891e2da26b6b787e429aa71d9c899cc26dfcnoodl <br />
1f5c891e2da26b6b787e429aa71d9c899cc26dfcnoodl &lt;html&gt;<br />
1f5c891e2da26b6b787e429aa71d9c899cc26dfcnoodl &lt;head&gt;<br />
59879db9d12c2ea10f77b2c44d6d3aba89bb9cb3slive &lt;title&gt;Lame excuses'R'us&lt;/title&gt;<br />
59879db9d12c2ea10f77b2c44d6d3aba89bb9cb3slive &lt;/head&gt;<br />
5a58787efeb02a1c3f06569d019ad81fd2efa06end &lt;body&gt;<br />
5a58787efeb02a1c3f06569d019ad81fd2efa06end &lt;h1&gt;Fred's exceptionally wonderful page has moved to<br />
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd &lt;a href="http://xyz.abc.com/foo/bar.html"&gt;Joe's&lt;/a&gt;
5652dbe450e4fcfdf36d4cfb42d7f2345ded29a4maczniak site.<br />
8928b6e739f1de5efcfa2a258f2cee76b52c6dfdgryzor &lt;/h1&gt;<br />
e1e8390280254f7f0580d701e583f670643d4f3fnilgun &lt;/body&gt;<br />
d474d8ef01ec5c2a09341cd148851ed383c3287crbowen &lt;/html&gt;
d474d8ef01ec5c2a09341cd148851ed383c3287crbowen </example>
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd
205f749042ed530040a4f0080dbcb47ceae8a374rjung <note><title>Notes:</title>
af33a4994ae2ff15bc67d19ff1a7feb906745bf8rbowen <p>The server always adds a <code>Date:</code> and <code>Server:</code>
0d0ba3a410038e179b695446bb149cce6264e0abnd header to the data returned to the client, so these should not be
7fec19672a491661b2fe4b29f685bc7f4efa64d4nd included in the file. The server does <em>not</em> add a
7fec19672a491661b2fe4b29f685bc7f4efa64d4nd <code>Last-Modified</code> header; it probably should.</p>
7fec19672a491661b2fe4b29f685bc7f4efa64d4nd </note>
5a58787efeb02a1c3f06569d019ad81fd2efa06end</section>
</modulesynopsis>