http_request.h revision fd0edaa8e3d4dd67d0604ccef2e96b071db96643
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
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * 1. Redistributions of source code must retain the above copyright
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * notice, this list of conditions and the following disclaimer.
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * 2. Redistributions in binary form must reproduce the above copyright
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * notice, this list of conditions and the following disclaimer in
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * the documentation and/or other materials provided with the
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * distribution.
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * 3. All advertising materials mentioning features or use of this
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * software must display the following acknowledgment:
9d129b55f5a43abf43865c6b0eb6dd19bc22aba8ianh * "This product includes software developed by the Apache Group
9d129b55f5a43abf43865c6b0eb6dd19bc22aba8ianh * for use in the Apache HTTP server project (http://www.apache.org/)."
9d129b55f5a43abf43865c6b0eb6dd19bc22aba8ianh * 4. The names "Apache Server" and "Apache Group" must not be used to
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * endorse or promote products derived from this software without
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * prior written permission. For written permission, please contact
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * apache@apache.org.
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * 5. Products derived from this software may not be called "Apache"
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * nor may "Apache" appear in their names without prior written
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * permission of the Apache Group.
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * 6. Redistributions of any form whatsoever must retain the following
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * acknowledgment:
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * "This product includes software developed by the Apache Group
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * for use in the Apache HTTP server project (http://www.apache.org/)."
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE GROUP OR
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
f888346b48f5e5b5e3f0a47dedb8cefd2759a4e2gregames * OF THE POSSIBILITY OF SUCH DAMAGE.
750d12c59545dbbac70390988de94f7e901b08f2niq * ====================================================================
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * This software consists of voluntary contributions made by many
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * individuals on behalf of the Apache Group and was originally based
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * on public domain software written at the National Center for
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * Supercomputing Applications, University of Illinois, Urbana-Champaign.
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * For more information on the Apache Group and the Apache HTTP server
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * project, please see <http://www.apache.org/>.
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb/* http_request.c is the code which handles the main line of request
4f9c22c4f27571d54197be9674e1fc0d528192aestriker * processing, once a request has been read in (finding the right per-
a2a0abd88b19e042a3eb2a9fa1702c25ad51303dwrowe * directory configuration, building it if necessary, and calling all
4f9c22c4f27571d54197be9674e1fc0d528192aestriker * the module dispatch functions in the right order).
4f9c22c4f27571d54197be9674e1fc0d528192aestriker * The pieces here which are public to the modules, allow them to learn
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * how the server would handle some other file or URI, or perhaps even
4f9c22c4f27571d54197be9674e1fc0d528192aestriker * direct the server to serve that other file instead of the one the
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * client requested directly.
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * There are two ways to do that. The first is the sub_request mechanism,
4f9c22c4f27571d54197be9674e1fc0d528192aestriker * which handles looking up files and URIs as adjuncts to some other
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * request (e.g., directory entries for multiviews and directory listings);
4f9c22c4f27571d54197be9674e1fc0d528192aestriker * the lookup functions stop short of actually running the request, but
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * (e.g., for includes), a module may call for the request to be run
4f9c22c4f27571d54197be9674e1fc0d528192aestriker * by calling run_sub_req. The space allocated to create sub_reqs can be
4f9c22c4f27571d54197be9674e1fc0d528192aestriker * reclaimed by calling destroy_sub_req --- be sure to copy anything you care
b38846b15c8891c6dec44dcc4f96ca40721bf663rbb * about which was allocated in its pool elsewhere before doing this.
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewroweAPI_EXPORT(request_rec *) ap_sub_req_lookup_uri(const char *new_file,
2d399cd7535887fceaa9f8f116eb98ce68ddd602trawickAPI_EXPORT(request_rec *) ap_sub_req_lookup_file(const char *new_file,
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewroweAPI_EXPORT(request_rec *) ap_sub_req_method_uri(const char *method,
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe const char *new_file,
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe * Then there's the case that you want some other request to be served
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe * as the top-level request INSTEAD of what the client requested directly.
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewrowe * If so, call this from a handler, and then immediately return OK.
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewroweAPI_EXPORT(void) ap_internal_redirect(const char *new_uri, request_rec *);
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewroweAPI_EXPORT(void) ap_internal_redirect_handler(const char *new_uri, request_rec *);
3e392a5afd51526de3cb15d57ee46d8cb160ae65gregamesAPI_EXPORT(int) ap_some_auth_required(request_rec *r);
83a8dc5a596a8a1b9d14f063268287d123b9ed7ewroweAPI_EXPORT(time_t) ap_update_mtime(request_rec *r, time_t dependency_mtime);
8419e6f8bff1a3617933f3ba760d2bdec7442f44coar/* Function called by main.c to handle first-level request */
8419e6f8bff1a3617933f3ba760d2bdec7442f44coar /* Hooks */
d4abb06ac220bb280ae996b6d21bbd257db51bb1jerenkrantz#endif /* !APACHE_HTTP_REQUEST_H */