mirror of
https://github.com/apache/httpd.git
synced 2025-08-07 04:02:58 +03:00
Change conn_rec->keepalive to an enumerated value of
AP_CONN_UNKNOWN AP_CONN_CLOSE AP_CONN_KEEPALIVE This also fixes a problem where ap_discard_request_body would not discard the body when keepalive was 0. This actually meant the keepalive status was unknown *not* closed, but no one ever remembered that. This problem was seen with mod_dav sending error responses (as reported by Karl Fogel). Suggested by: Greg "this isn't the '80s" Stein Reviewed by: Greg Ames git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95891 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -143,7 +143,7 @@ AP_DECLARE(void) ap_die(int type, request_rec *r)
|
||||
* connection, be sure that the request body (if any) has been read.
|
||||
*/
|
||||
if (ap_status_drops_connection(r->status)) {
|
||||
r->connection->keepalive = 0;
|
||||
r->connection->keepalive = AP_CONN_CLOSE;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -216,7 +216,7 @@ static void check_pipeline_flush(request_rec *r)
|
||||
*/
|
||||
/* ### shouldn't this read from the connection input filters? */
|
||||
/* ### is zero correct? that means "read one line" */
|
||||
if (!r->connection->keepalive ||
|
||||
if (r->connection->keepalive == AP_CONN_CLOSE ||
|
||||
ap_get_brigade(r->input_filters, bb, AP_MODE_EATCRLF,
|
||||
APR_NONBLOCK_READ, 0) != APR_SUCCESS) {
|
||||
apr_bucket *e = apr_bucket_flush_create(c->bucket_alloc);
|
||||
|
Reference in New Issue
Block a user