mirror of
https://github.com/apache/httpd.git
synced 2025-08-07 04:02:58 +03:00
Allow the core_output_filter to save data in the filter past the end of
the first request if this is a keepalive connection. This allows us to save the end of the first request until we have enough data from the second request to make it worthwhile to send the responses. In order to do this, we need to allocate mmap's from the connection pool instead of the request pool. If we don't use the connection pool, then the mmap is freed before the data is sent, because the mmap is freed at the end of the first request. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86840 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -1367,6 +1367,22 @@ static void process_request_internal(request_rec *r)
|
||||
ap_finalize_request_protocol(r);
|
||||
}
|
||||
|
||||
static void check_pipeline_flush(request_rec *r)
|
||||
{
|
||||
ap_bucket_brigade *bb = ap_brigade_create(r->pool);
|
||||
if (ap_get_brigade(r->input_filters, bb, AP_MODE_PEEK) != APR_SUCCESS) {
|
||||
ap_bucket *e = ap_bucket_create_flush();
|
||||
|
||||
/* We just send directly to the connection based filters, because at
|
||||
* this point, we know that we have seen all of the data, so we just
|
||||
* want to flush the buckets if something hasn't been sent to the
|
||||
* network yet.
|
||||
*/
|
||||
AP_BRIGADE_INSERT_HEAD(bb, e);
|
||||
ap_pass_brigade(r->connection->output_filters, bb);
|
||||
}
|
||||
}
|
||||
|
||||
void ap_process_request(request_rec *r)
|
||||
{
|
||||
process_request_internal(r);
|
||||
@@ -1378,7 +1394,7 @@ void ap_process_request(request_rec *r)
|
||||
* this packet, then it'll appear like the link is stalled when really
|
||||
* it's the application that's stalled.
|
||||
*/
|
||||
ap_bhalfduplex(r->connection->client);
|
||||
check_pipeline_flush(r);
|
||||
ap_run_log_transaction(r);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user