88f76f668542dcd72fc9d71577997967c6bf123bslive<?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<!--
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding Licensed to the Apache Software Foundation (ASF) under one or more
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding contributor license agreements. See the NOTICE file distributed with
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding this work for additional information regarding copyright ownership.
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding The ASF licenses this file to You under the Apache License, Version 2.0
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding (the "License"); you may not use this file except in compliance with
db479b48bd4d75423ed4a45e15b75089d1a8ad72fielding 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">
88f76f668542dcd72fc9d71577997967c6bf123bslive
88f76f668542dcd72fc9d71577997967c6bf123bslive<name>mod_asis</name>
88f76f668542dcd72fc9d71577997967c6bf123bslive<description>Sends files that contain their own
88f76f668542dcd72fc9d71577997967c6bf123bsliveHTTP headers</description>
88f76f668542dcd72fc9d71577997967c6bf123bslive<status>Base</status>
88f76f668542dcd72fc9d71577997967c6bf123bslive<sourcefile>mod_asis.c</sourcefile>
88f76f668542dcd72fc9d71577997967c6bf123bslive<identifier>asis_module</identifier>
88f76f668542dcd72fc9d71577997967c6bf123bslive
88f76f668542dcd72fc9d71577997967c6bf123bslive<summary>
88f76f668542dcd72fc9d71577997967c6bf123bslive <p>This module provides the handler <code>send-as-is</code>
f921112485b06f8b2ed70511b5b0feacdcddca64rbowen which causes Apache HTTP Server to send the document without adding most of
88f76f668542dcd72fc9d71577997967c6bf123bslive the usual HTTP headers.</p>
88f76f668542dcd72fc9d71577997967c6bf123bslive
88f76f668542dcd72fc9d71577997967c6bf123bslive <p>This can be used to send any kind of data from the server,
88f76f668542dcd72fc9d71577997967c6bf123bslive including redirects and other special HTTP responses, without
88f76f668542dcd72fc9d71577997967c6bf123bslive requiring a cgi-script or an nph script.</p>
88f76f668542dcd72fc9d71577997967c6bf123bslive
88f76f668542dcd72fc9d71577997967c6bf123bslive <p>For historical reasons, this module will also process any
88f76f668542dcd72fc9d71577997967c6bf123bslive file with the mime type <code>httpd/send-as-is</code>.</p>
88f76f668542dcd72fc9d71577997967c6bf123bslive</summary>
88f76f668542dcd72fc9d71577997967c6bf123bslive
130852d0f5f810207a3a064d270c239ac52ae820slive<seealso><module>mod_headers</module></seealso>
130852d0f5f810207a3a064d270c239ac52ae820slive<seealso><module>mod_cern_meta</module></seealso>
f921112485b06f8b2ed70511b5b0feacdcddca64rbowen<seealso><a href="/handler.html">Apache httpd's Handler Use</a></seealso>
130852d0f5f810207a3a064d270c239ac52ae820slive
67a715b4352c3e25bff32fccad48350180393f5end<section id="usage"><title>Usage</title>
88f76f668542dcd72fc9d71577997967c6bf123bslive
88f76f668542dcd72fc9d71577997967c6bf123bslive <p>In the server configuration file, associate files with the
88f76f668542dcd72fc9d71577997967c6bf123bslive <code>send-as-is</code> handler <em>e.g.</em></p>
88f76f668542dcd72fc9d71577997967c6bf123bslive
7a98571671f92e53441bf24a0222768072172f90coar <highlight language="config">
7a98571671f92e53441bf24a0222768072172f90coarAddHandler send-as-is asis
7a98571671f92e53441bf24a0222768072172f90coar </highlight>
88f76f668542dcd72fc9d71577997967c6bf123bslive
88f76f668542dcd72fc9d71577997967c6bf123bslive <p>The contents of any file with a <code>.asis</code> extension
f921112485b06f8b2ed70511b5b0feacdcddca64rbowen will then be sent by Apache httpd to the client with almost no
d72b7c0771ea253d02b75655ceed7a762dbf3aaaniq changes. In particular, HTTP headers are derived from the file
d72b7c0771ea253d02b75655ceed7a762dbf3aaaniq itself according to <module>mod_cgi</module> rules, so an asis
d72b7c0771ea253d02b75655ceed7a762dbf3aaaniq file must include valid headers, and may also use the CGI
76542e0c3c0a35ccbdde3b5ee43285b6343188faigalic <code>Status:</code> header to determine the HTTP response
76542e0c3c0a35ccbdde3b5ee43285b6343188faigalic code. The <code>Content-Length:</code> header will automatically
76542e0c3c0a35ccbdde3b5ee43285b6343188faigalic be inserted or, if included, corrected by httpd.</p>
88f76f668542dcd72fc9d71577997967c6bf123bslive
88f76f668542dcd72fc9d71577997967c6bf123bslive <p>Here's an example of a file whose contents are sent <em>as
88f76f668542dcd72fc9d71577997967c6bf123bslive is</em> so as to tell the client that a file has
88f76f668542dcd72fc9d71577997967c6bf123bslive redirected.</p>
88f76f668542dcd72fc9d71577997967c6bf123bslive
88f76f668542dcd72fc9d71577997967c6bf123bslive
67a715b4352c3e25bff32fccad48350180393f5end <example>
67a715b4352c3e25bff32fccad48350180393f5end Status: 301 Now where did I leave that URL<br />
f921112485b06f8b2ed70511b5b0feacdcddca64rbowen Location: http://xyz.example.com/foo/bar.html<br />
67a715b4352c3e25bff32fccad48350180393f5end Content-type: text/html<br />
88f76f668542dcd72fc9d71577997967c6bf123bslive <br />
67a715b4352c3e25bff32fccad48350180393f5end &lt;html&gt;<br />
67a715b4352c3e25bff32fccad48350180393f5end &lt;head&gt;<br />
67a715b4352c3e25bff32fccad48350180393f5end &lt;title&gt;Lame excuses'R'us&lt;/title&gt;<br />
67a715b4352c3e25bff32fccad48350180393f5end &lt;/head&gt;<br />
67a715b4352c3e25bff32fccad48350180393f5end &lt;body&gt;<br />
67a715b4352c3e25bff32fccad48350180393f5end &lt;h1&gt;Fred's exceptionally wonderful page has moved to<br />
f921112485b06f8b2ed70511b5b0feacdcddca64rbowen &lt;a href="http://xyz.example.com/foo/bar.html"&gt;Joe's&lt;/a&gt;
88f76f668542dcd72fc9d71577997967c6bf123bslive site.<br />
67a715b4352c3e25bff32fccad48350180393f5end &lt;/h1&gt;<br />
67a715b4352c3e25bff32fccad48350180393f5end &lt;/body&gt;<br />
67a715b4352c3e25bff32fccad48350180393f5end &lt;/html&gt;
67a715b4352c3e25bff32fccad48350180393f5end </example>
88f76f668542dcd72fc9d71577997967c6bf123bslive
67a715b4352c3e25bff32fccad48350180393f5end <note><title>Notes:</title>
67a715b4352c3e25bff32fccad48350180393f5end <p>The server always adds a <code>Date:</code> and <code>Server:</code>
67a715b4352c3e25bff32fccad48350180393f5end header to the data returned to the client, so these should not be
88f76f668542dcd72fc9d71577997967c6bf123bslive included in the file. The server does <em>not</em> add a
67a715b4352c3e25bff32fccad48350180393f5end <code>Last-Modified</code> header; it probably should.</p>
67a715b4352c3e25bff32fccad48350180393f5end </note>
88f76f668542dcd72fc9d71577997967c6bf123bslive</section>
88f76f668542dcd72fc9d71577997967c6bf123bslive
88f76f668542dcd72fc9d71577997967c6bf123bslive</modulesynopsis>