]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1887999 from trunk
authorChristophe Jaillet <jailletc36@apache.org>
Sun, 18 Apr 2021 19:09:03 +0000 (19:09 +0000)
committerChristophe Jaillet <jailletc36@apache.org>
Sun, 18 Apr 2021 19:09:03 +0000 (19:09 +0000)
   * 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

modules/http/http_core.c
server/protocol.c

index 3b6b0b759929601bfbf3e3aa16ff8b0776189335..c6cb473dbc83e538639d603c1de3ffef1d57781d 100644 (file)
@@ -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;
index 86b152f8dea3181d3281bccfd4a7f57bf52d97bc..379db1b3879d6ab2f95a2f4b492598bac1d8d080 100644 (file)
@@ -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);