/usr/src/redhat/BUILD/httpd-2.2.3/include/http_request.h
Apache Request library [詳細]
#include "apr_hooks.h"
#include "util_filter.h"
ソースコードを見る。
|
マクロ定義 |
#define | AP_SUBREQ_NO_ARGS 0 |
#define | AP_SUBREQ_MERGE_ARGS 1 |
#define | MERGE_ALLOW 0 |
#define | REPLACE_ALLOW 1 |
関数 |
int | ap_process_request_internal (request_rec *r) |
request_rec * | ap_sub_req_lookup_uri (const char *new_uri, const request_rec *r, ap_filter_t *next_filter) |
request_rec * | ap_sub_req_lookup_file (const char *new_file, const request_rec *r, ap_filter_t *next_filter) |
request_rec * | ap_sub_req_lookup_dirent (const apr_finfo_t *finfo, const request_rec *r, int subtype, ap_filter_t *next_filter) |
request_rec * | ap_sub_req_method_uri (const char *method, const char *new_uri, const request_rec *r, ap_filter_t *next_filter) |
| AP_CORE_DECLARE_NONSTD (apr_status_t) ap_sub_req_output_filter(ap_filter_t *f |
int | ap_run_sub_req (request_rec *r) |
void | ap_destroy_sub_req (request_rec *r) |
void | ap_internal_redirect (const char *new_uri, request_rec *r) |
void | ap_internal_redirect_handler (const char *new_uri, request_rec *r) |
void | ap_internal_fast_redirect (request_rec *sub_req, request_rec *r) |
int | ap_some_auth_required (request_rec *r) |
int | ap_is_initial_req (request_rec *r) |
void | ap_update_mtime (request_rec *r, apr_time_t dependency_mtime) |
void | ap_allow_methods (request_rec *r, int reset,...) |
void | ap_allow_standard_methods (request_rec *r, int reset,...) |
int | create_request (request_rec *r) |
int | translate_name (request_rec *r) |
int | map_to_storage (request_rec *r) |
int | check_user_id (request_rec *r) |
int | fixups (request_rec *r) |
int | type_checker (request_rec *r) |
int | access_checker (request_rec *r) |
int | auth_checker (request_rec *r) |
void | insert_filter (request_rec *r) |
int | ap_location_walk (request_rec *r) |
int | ap_directory_walk (request_rec *r) |
int | ap_file_walk (request_rec *r) |
変数 |
apr_bucket_brigade * | bb |
説明
Apache Request library
request.c is the code which handles the main line of request processing, once a request has been read in (finding the right per- directory configuration, building it if necessary, and calling all the module dispatch functions in the right order).
The pieces here which are public to the modules, allow them to learn how the server would handle some other file or URI, or perhaps even direct the server to serve that other file instead of the one the client requested directly.
There are two ways to do that. The first is the sub_request mechanism, which handles looking up files and URIs as adjuncts to some other request (e.g., directory entries for multiviews and directory listings); the lookup functions stop short of actually running the request, but (e.g., for includes), a module may call for the request to be run by calling run_sub_req. The space allocated to create sub_reqs can be reclaimed by calling destroy_sub_req --- be sure to copy anything you care about which was allocated in its apr_pool_t elsewhere before doing this.
関数
void ap_allow_methods |
( |
request_rec * |
r, |
|
|
int |
reset, |
|
|
|
... | |
|
) |
| | |
Add one or more methods to the list permitted to access the resource. Usually executed by the content handler before the response header is sent, but sometimes invoked at an earlier phase if a module knows it can set the list authoritatively. Note that the methods are ADDED to any already permitted unless the reset flag is non-zero. The list is used to generate the Allow response header field when it is needed.
- 引数:
-
| r | The pointer to the request identifying the resource. |
| reset | Boolean flag indicating whether this list should completely replace any current settings. |
| ... | A NULL-terminated list of strings, each identifying a method name to add. |
- 戻り値:
- None.
void ap_allow_standard_methods |
( |
request_rec * |
r, |
|
|
int |
reset, |
|
|
|
... | |
|
) |
| | |
Add one or more methods to the list permitted to access the resource. Usually executed by the content handler before the response header is sent, but sometimes invoked at an earlier phase if a module knows it can set the list authoritatively. Note that the methods are ADDED to any already permitted unless the reset flag is non-zero. The list is used to generate the Allow response header field when it is needed.
- 引数:
-
| r | The pointer to the request identifying the resource. |
| reset | Boolean flag indicating whether this list should completely replace any current settings. |
| ... | A list of method identifiers, from the "M_" series defined in httpd.h, terminated with a value of -1 (e.g., "M_GET, M_POST, M_OPTIONS, -1") |
- 戻り値:
- None.
An output filter to strip EOS buckets from sub-requests. This always has to be inserted at the end of a sub-requests filter stack.
- 引数:
-
| f | The current filter |
| bb | The brigade to filter |
- 戻り値:
- status code
Free the memory associated with a subrequest
- 引数:
-
| r | The subrequest to finish |
Redirect the current request to a sub_req, merging the pools
- 引数:
-
| sub_req | A subrequest created from this request |
| r | The current request |
- 覚え書き:
- the sub_req's pool will be merged into r's pool, be very careful not to destroy this subrequest, it will be destroyed with the main request!
void ap_internal_redirect |
( |
const char * |
new_uri, |
|
|
request_rec * |
r | |
|
) |
| | |
Redirect the current request to some other uri
- 引数:
-
| new_uri | The URI to replace the current request with |
| r | The current request |
void ap_internal_redirect_handler |
( |
const char * |
new_uri, |
|
|
request_rec * |
r | |
|
) |
| | |
This function is designed for things like actions or CGI scripts, when using AddHandler, and you want to preserve the content type across an internal redirect.
- 引数:
-
| new_uri | The URI to replace the current request with. |
| r | The current request |
Determine if the current request is the main request or a subrequest
- 引数:
-
- 戻り値:
- 1 if this is the main request, 0 otherwise
An internal handler used by the ap_process_request, all subrequest mechanisms and the redirect mechanism.
- 引数:
-
| r | The request, subrequest or internal redirect to pre-process |
- 戻り値:
- The return code for the request
Run the handler for the subrequest
- 引数:
-
- 戻り値:
- The return code for the subrequest
Can be used within any handler to determine if any authentication is required for the current request
- 引数:
-
- 戻り値:
- 1 if authentication is required, 0 otherwise
Create a subrequest for the given apr_dir_read result. This subrequest can be inspected to find information about the requested file
- 引数:
-
| finfo | The apr_dir_read result to lookup |
| r | The current request |
| subtype | What type of subrequest to perform, one of;
AP_SUBREQ_NO_ARGS ignore r->args and r->path_info
AP_SUBREQ_MERGE_ARGS merge r->args and r->path_info
|
| next_filter | The first filter the sub_request should use. If this is NULL, it defaults to the first filter for the main request |
- 戻り値:
- The new request record
- 覚え書き:
- The apr_dir_read flags value APR_FINFO_MIN|APR_FINFO_NAME flag is the minimum recommended query if the results will be passed to apr_dir_read. The file info passed must include the name, and must have the same relative directory as the current request.
Create a subrequest for the given file. This subrequest can be inspected to find information about the requested file
- 引数:
-
| new_file | The file to lookup |
| r | The current request |
| next_filter | The first filter the sub_request should use. If this is NULL, it defaults to the first filter for the main request |
- 戻り値:
- The new request record
Create a subrequest from the given URI. This subrequest can be inspected to find information about the requested URI
- 引数:
-
| new_uri | The URI to lookup |
| r | The current request |
| next_filter | The first filter the sub_request should use. If this is NULL, it defaults to the first filter for the main request |
- 戻り値:
- The new request record
Create a subrequest for the given URI using a specific method. This subrequest can be inspected to find information about the requested URI
- 引数:
-
| method | The method to use in the new subrequest |
| new_uri | The URI to lookup |
| r | The current request |
| next_filter | The first filter the sub_request should use. If this is NULL, it defaults to the first filter for the main request |
- 戻り値:
- The new request record
Function to set the r->mtime field to the specified value if it's later than what's already there.
- 引数:
-
| r | The current request |
| dependency_mtime | Time to set the mtime to |
Apacheに対してSun Jul 19 22:05:25 2009に生成されました。
1.4.7