mirror of
https://github.com/apache/httpd.git
synced 2025-11-08 04:22:21 +03:00
Redesign of request cleanup and logging to use End-Of-Request bucket
(backport from async-dev branch to 2.3 trunk) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@327925 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -237,11 +237,20 @@ AP_DECLARE(void) ap_allow_standard_methods(request_rec *r, int reset, ...);
|
||||
|
||||
#ifdef CORE_PRIVATE
|
||||
/**
|
||||
* Process a top-level request from a client
|
||||
* Process a top-level request from a client, and synchronously write
|
||||
* the response to the client
|
||||
* @param r The current request
|
||||
*/
|
||||
void ap_process_request(request_rec *);
|
||||
|
||||
/**
|
||||
* Process a top-level request from a client, allowing some or all of
|
||||
* the response to remain buffered in the core output filter for later,
|
||||
* asynchronous write completion
|
||||
* @param r The current request
|
||||
*/
|
||||
void ap_process_async_request(request_rec *);
|
||||
|
||||
/**
|
||||
* Kill the current request
|
||||
* @param type Why the request is dieing
|
||||
@@ -354,6 +363,36 @@ AP_DECLARE(int) ap_location_walk(request_rec *r);
|
||||
AP_DECLARE(int) ap_directory_walk(request_rec *r);
|
||||
AP_DECLARE(int) ap_file_walk(request_rec *r);
|
||||
|
||||
/** End Of REQUEST (EOR) bucket */
|
||||
AP_DECLARE_DATA extern const apr_bucket_type_t ap_bucket_type_eor;
|
||||
|
||||
/**
|
||||
* Determine if a bucket is an End Of REQUEST (EOR) bucket
|
||||
* @param e The bucket to inspect
|
||||
* @return true or false
|
||||
*/
|
||||
#define AP_BUCKET_IS_EOR(e) (e->type == &ap_bucket_type_eor)
|
||||
|
||||
/**
|
||||
* Make the bucket passed in an End Of REQUEST (EOR) bucket
|
||||
* @param b The bucket to make into an EOR bucket
|
||||
* @param r The request to destroy when this bucket is destroyed
|
||||
* @return The new bucket, or NULL if allocation failed
|
||||
*/
|
||||
AP_DECLARE(apr_bucket *) ap_bucket_eor_make(apr_bucket *b, request_rec *r);
|
||||
|
||||
/**
|
||||
* Create a bucket referring to an End Of REQUEST (EOR). This bucket
|
||||
* holds a pointer to the request_rec, so that the request can be
|
||||
* destroyed right after all of the output has been sent to the client.
|
||||
*
|
||||
* @param list The freelist from which this bucket should be allocated
|
||||
* @param r The request to destroy when this bucket is destroyed
|
||||
* @return The new bucket, or NULL if allocation failed
|
||||
*/
|
||||
AP_DECLARE(apr_bucket *) ap_bucket_eor_create(apr_bucket_alloc_t *list,
|
||||
request_rec *r);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user