From: Jean-Frederic Clere Date: Wed, 24 Mar 2021 09:37:15 +0000 (+0000) Subject: Make sure that conn->keepalive is NOT reset after being set in ap_read_request(). X-Git-Tag: 2.5.0-alpha2-ci-test-only~983 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=38af3ed363b6e9d99771729cab2115d8ebc733f6;p=thirdparty%2Fapache%2Fhttpd.git Make sure that conn->keepalive is NOT reset after being set in ap_read_request(). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1887999 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/http/http_core.c b/modules/http/http_core.c index 3f87f80f954..9e875ce2cc5 100644 --- a/modules/http/http_core.c +++ b/modules/http/http_core.c @@ -146,9 +146,6 @@ static int ap_process_http_async_connection(conn_rec *c) ap_set_conn_count(c->sbh, r, c->keepalives); } if ((r = ap_read_request(c))) { - c->keepalive = AP_CONN_UNKNOWN; - /* process the request if it was read without error */ - if (r->status == HTTP_OK) { cs->state = CONN_STATE_HANDLER; if (ap_extended_status) { @@ -204,9 +201,6 @@ static int ap_process_http_sync_connection(conn_rec *c) keep_alive_timeout = c->base_server->keep_alive_timeout; } - c->keepalive = AP_CONN_UNKNOWN; - /* process the request if it was read without error */ - if (r->status == HTTP_OK) { if (cs) cs->state = CONN_STATE_HANDLER; diff --git a/server/protocol.c b/server/protocol.c index d18ca01b956..4eac201e046 100644 --- a/server/protocol.c +++ b/server/protocol.c @@ -1469,6 +1469,7 @@ request_rec *ap_read_request(conn_rec *conn) request_rec *r = ap_create_request(conn); tmp_bb = apr_brigade_create(r->pool, r->connection->bucket_alloc); + conn->keepalive = AP_CONN_UNKNOWN; ap_run_pre_read_request(r, conn);