From: Christophe Jaillet Date: Sun, 18 Apr 2021 19:09:03 +0000 (+0000) Subject: Merge r1887999 from trunk X-Git-Tag: 2.4.47~27 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9a7bbd69f25a51622a32e3aa128342c55a04ef68;p=thirdparty%2Fapache%2Fhttpd.git Merge r1887999 from trunk * modules/http/http_core.c server/protocol.c: Make sure that conn->keepalive is NOT reset after being set in ap_read_request() Submitted by: jfclere Reviewed by: jfclere, covener, ylavic Backported by: jailletc36 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1888926 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/http/http_core.c b/modules/http/http_core.c index 3b6b0b75992..c6cb473dbc8 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 86b152f8dea..379db1b3879 100644 --- a/server/protocol.c +++ b/server/protocol.c @@ -1315,6 +1315,7 @@ request_rec *ap_read_request(conn_rec *conn) r->useragent_ip = conn->client_ip; tmp_bb = apr_brigade_create(r->pool, r->connection->bucket_alloc); + conn->keepalive = AP_CONN_UNKNOWN; ap_run_pre_read_request(r, conn);