mod_asis.c revision 9ede6357edc9aff1fb2f7edebefab473673298aa
842ae4bd224140319ae7feec1872b93dfd491143fielding/* ====================================================================
842ae4bd224140319ae7feec1872b93dfd491143fielding * Copyright (c) 1995-1999 The Apache Group. All rights reserved.
842ae4bd224140319ae7feec1872b93dfd491143fielding * Redistribution and use in source and binary forms, with or without
842ae4bd224140319ae7feec1872b93dfd491143fielding * modification, are permitted provided that the following conditions
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes * 1. Redistributions of source code must retain the above copyright
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes * notice, this list of conditions and the following disclaimer.
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes * 2. Redistributions in binary form must reproduce the above copyright
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes * notice, this list of conditions and the following disclaimer in
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes * the documentation and/or other materials provided with the
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes * distribution.
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes * 3. All advertising materials mentioning features or use of this
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes * software must display the following acknowledgment:
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes * "This product includes software developed by the Apache Group
e8f95a682820a599fe41b22977010636be5c2717jim * for use in the Apache HTTP server project (http://www.apache.org/)."
e8f95a682820a599fe41b22977010636be5c2717jim * 4. The names "Apache Server" and "Apache Group" must not be used to
1747d30b98aa1bdbc43994c02cd46ab4cb9319e4fielding * endorse or promote products derived from this software without
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes * prior written permission. For written permission, please contact
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes * apache@apache.org.
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes * 5. Products derived from this software may not be called "Apache"
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes * nor may "Apache" appear in their names without prior written
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes * permission of the Apache Group.
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes * 6. Redistributions of any form whatsoever must retain the following
11f2c481e1d57bedb3f758565307501e9a2730ddtrawick * acknowledgment:
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes * "This product includes software developed by the Apache Group
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes * for use in the Apache HTTP server project (http://www.apache.org/)."
5c0419d51818eb02045cf923a9fe456127a44c60wrowe * THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY
5c0419d51818eb02045cf923a9fe456127a44c60wrowe * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE GROUP OR
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
ab86c68ce36c715e93f403dde41d0b9c1522c8b0sf * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
ab86c68ce36c715e93f403dde41d0b9c1522c8b0sf * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
cd3bbd6d2df78d6c75e5d159a81ef8bdd5f70df9trawick * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ab86c68ce36c715e93f403dde41d0b9c1522c8b0sf * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
ab86c68ce36c715e93f403dde41d0b9c1522c8b0sf * OF THE POSSIBILITY OF SUCH DAMAGE.
5bfaaf573bacb45c1cf290ce85ecc676587e8a64jim * ====================================================================
ab86c68ce36c715e93f403dde41d0b9c1522c8b0sf * This software consists of voluntary contributions made by many
ab86c68ce36c715e93f403dde41d0b9c1522c8b0sf * individuals on behalf of the Apache Group and was originally based
ab86c68ce36c715e93f403dde41d0b9c1522c8b0sf * on public domain software written at the National Center for
ab86c68ce36c715e93f403dde41d0b9c1522c8b0sf * Supercomputing Applications, University of Illinois, Urbana-Champaign.
bede2929837dfd23863ad4b39199c63126566d61jorton * For more information on the Apache Group and the Apache HTTP server
0f60998368b493f90120180a93fc2e1e74490872covener * project, please see <http://www.apache.org/>.
97cd2f98ad4abe68aaaba96b5bfc9ebf7109a2c1covener const char *location;
fa123db15501821e36e513afa78e839775ad2800covener ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
0568280364eb026393be492ebc732795c4934643jorton if ((status = ap_open(&f, r->filename, APR_READ | APR_BUFFERED,
0568280364eb026393be492ebc732795c4934643jorton "file permissions deny server access: %s", r->filename);
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes location = ap_table_get(r->headers_out, "Location");
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes ((r->status == HTTP_OK) || ap_is_HTTP_REDIRECT(r->status))) {
796e4a7141265d8ed7036e4628161c6eafb2a789jorton /* Internal redirect -- fake-up a pseudo-request */
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes /* This redirect needs to be a GET no matter what the original
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes * method was.