home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2006 December / PCpro_2006_12.ISO / ossdvd / server / Apache / include / http_request.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-04-21  |  3.2 KB  |  76 lines

  1. /* Copyright 1999-2004 The Apache Software Foundation
  2.  *
  3.  * Licensed under the Apache License, Version 2.0 (the "License");
  4.  * you may not use this file except in compliance with the License.
  5.  * You may obtain a copy of the License at
  6.  *
  7.  *     http://www.apache.org/licenses/LICENSE-2.0
  8.  *
  9.  * Unless required by applicable law or agreed to in writing, software
  10.  * distributed under the License is distributed on an "AS IS" BASIS,
  11.  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12.  * See the License for the specific language governing permissions and
  13.  * limitations under the License.
  14.  */
  15.  
  16. #ifndef APACHE_HTTP_REQUEST_H
  17. #define APACHE_HTTP_REQUEST_H
  18.  
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22.  
  23. /* http_request.c is the code which handles the main line of request
  24.  * processing, once a request has been read in (finding the right per-
  25.  * directory configuration, building it if necessary, and calling all
  26.  * the module dispatch functions in the right order).
  27.  *
  28.  * The pieces here which are public to the modules, allow them to learn
  29.  * how the server would handle some other file or URI, or perhaps even
  30.  * direct the server to serve that other file instead of the one the
  31.  * client requested directly.
  32.  *
  33.  * There are two ways to do that.  The first is the sub_request mechanism,
  34.  * which handles looking up files and URIs as adjuncts to some other
  35.  * request (e.g., directory entries for multiviews and directory listings);
  36.  * the lookup functions stop short of actually running the request, but
  37.  * (e.g., for includes), a module may call for the request to be run
  38.  * by calling run_sub_req.  The space allocated to create sub_reqs can be
  39.  * reclaimed by calling destroy_sub_req --- be sure to copy anything you care
  40.  * about which was allocated in its pool elsewhere before doing this.
  41.  */
  42.  
  43. API_EXPORT(request_rec *) ap_sub_req_lookup_uri(const char *new_file,
  44.                                              const request_rec *r);
  45. API_EXPORT(request_rec *) ap_sub_req_lookup_file(const char *new_file,
  46.                                               const request_rec *r);
  47. API_EXPORT(request_rec *) ap_sub_req_method_uri(const char *method,
  48.                                                 const char *new_file,
  49.                                                 const request_rec *r);
  50. API_EXPORT(int) ap_run_sub_req(request_rec *r);
  51. API_EXPORT(void) ap_destroy_sub_req(request_rec *r);
  52.  
  53. /*
  54.  * Then there's the case that you want some other request to be served
  55.  * as the top-level request INSTEAD of what the client requested directly.
  56.  * If so, call this from a handler, and then immediately return OK.
  57.  */
  58.  
  59. API_EXPORT(void) ap_internal_redirect(const char *new_uri, request_rec *);
  60. API_EXPORT(void) ap_internal_redirect_handler(const char *new_uri, request_rec *);
  61. API_EXPORT(int) ap_some_auth_required(request_rec *r);
  62. API_EXPORT(int) ap_is_initial_req(request_rec *r);
  63. API_EXPORT(time_t) ap_update_mtime(request_rec *r, time_t dependency_mtime);
  64.  
  65. #ifdef CORE_PRIVATE
  66. /* Function called by main.c to handle first-level request */
  67. API_EXPORT(void) ap_process_request(request_rec *);
  68. API_EXPORT(void) ap_die(int type, request_rec *r);
  69. #endif
  70.  
  71. #ifdef __cplusplus
  72. }
  73. #endif
  74.  
  75. #endif    /* !APACHE_HTTP_REQUEST_H */
  76.