mod_asis.xml revision 76542e0c3c0a35ccbdde3b5ee43285b6343188fa
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<?xml version="1.0"?>
530eba85dbd41b8a0fa5255d3648d1440199a661slive<!DOCTYPE modulesynopsis SYSTEM "/style/modulesynopsis.dtd">
e942c741056732f50da2074b36fe59805d370650slive<?xml-stylesheet type="text/xsl" href="/style/manual.en.xsl"?>
5f5d1b4cc970b7f06ff8ef6526128e9a27303d88nd<!-- $LastChangedRevision$ -->
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd<!--
08cb74ca432a8c24e39f17dedce527e6a47b8001jerenkrantz Licensed to the Apache Software Foundation (ASF) under one or more
08cb74ca432a8c24e39f17dedce527e6a47b8001jerenkrantz contributor license agreements. See the NOTICE file distributed with
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd this work for additional information regarding copyright ownership.
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd The ASF licenses this file to You under the Apache License, Version 2.0
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd (the "License"); you may not use this file except in compliance with
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd the License. You may obtain a copy of the License at
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd http://www.apache.org/licenses/LICENSE-2.0
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd Unless required by applicable law or agreed to in writing, software
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd distributed under the License is distributed on an "AS IS" BASIS,
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd See the License for the specific language governing permissions and
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd limitations under the License.
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd-->
d5d794fc2f4cc9ca6d6da17cfa2cdcd8d244bacdnd
7db9f691a00ead175b03335457ca296a33ddf31bnd<modulesynopsis metafile="mod_asis.xml.meta">
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<name>mod_asis</name>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<description>Sends files that contain their own
80c4526970a11f37c0f8e3b82afdf03902dac3f3sliveHTTP headers</description>
530eba85dbd41b8a0fa5255d3648d1440199a661slive<status>Base</status>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive<sourcefile>mod_asis.c</sourcefile>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<identifier>asis_module</identifier>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<summary>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <p>This module provides the handler <code>send-as-is</code>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna which causes Apache HTTP Server to send the document without adding most of
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna the usual HTTP headers.</p>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <p>This can be used to send any kind of data from the server,
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna including redirects and other special HTTP responses, without
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna requiring a cgi-script or an nph script.</p>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <p>For historical reasons, this module will also process any
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna file with the mime type <code>httpd/send-as-is</code>.</p>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna</summary>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<seealso><module>mod_headers</module></seealso>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<seealso><module>mod_cern_meta</module></seealso>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<seealso><a href="/handler.html">Apache httpd's Handler Use</a></seealso>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna<section id="usage"><title>Usage</title>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <p>In the server configuration file, associate files with the
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <code>send-as-is</code> handler <em>e.g.</em></p>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <example>AddHandler send-as-is asis</example>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <p>The contents of any file with a <code>.asis</code> extension
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna will then be sent by Apache httpd to the client with almost no
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna changes. In particular, HTTP headers are derived from the file
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna itself according to <module>mod_cgi</module> rules, so an asis
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna file must include valid headers, and may also use the CGI
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <code>Status:</code> header to determine the HTTP response
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna code. The <code>Content-Length:</code> header will automatically
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna be inserted or, if included, corrected by httpd.</p>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <p>Here's an example of a file whose contents are sent <em>as
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna is</em> so as to tell the client that a file has
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna redirected.</p>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <example>
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna Status: 301 Now where did I leave that URL<br />
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna Location: http://xyz.example.com/foo/bar.html<br />
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna Content-type: text/html<br />
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna <br />
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna &lt;html&gt;<br />
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna &lt;head&gt;<br />
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna &lt;title&gt;Lame excuses'R'us&lt;/title&gt;<br />
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna &lt;/head&gt;<br />
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna &lt;body&gt;<br />
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna &lt;h1&gt;Fred's exceptionally wonderful page has moved to<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;a href="http://xyz.example.com/foo/bar.html"&gt;Joe's&lt;/a&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive site.<br />
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess &lt;/h1&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/body&gt;<br />
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive &lt;/html&gt;
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </example>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <note><title>Notes:</title>
18b4b0fd6056093002ddef488636bf5ebe415ef0erikabele <p>The server always adds a <code>Date:</code> and <code>Server:</code>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive header to the data returned to the client, so these should not be
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive included in the file. The server does <em>not</em> add a
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive <code>Last-Modified</code> header; it probably should.</p>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive </note>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</section>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive</modulesynopsis>
80c4526970a11f37c0f8e3b82afdf03902dac3f3slive