]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Make sure that conn->keepalive is NOT reset after being set in ap_read_request().
authorJean-Frederic Clere <jfclere@apache.org>
Wed, 24 Mar 2021 09:37:15 +0000 (09:37 +0000)
committerJean-Frederic Clere <jfclere@apache.org>
Wed, 24 Mar 2021 09:37:15 +0000 (09:37 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1887999 13f79535-47bb-0310-9956-ffa450edef68

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

index 3f87f80f9549a56996fdd5c60e49deee964fe8bc..9e875ce2cc56a3d348be8c82435f120e400be92b 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 d18ca01b95604450cf057771ccfe1de532913688..4eac201e0466803e23924128942ccab8c3846b14 100644 (file)
@@ -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);