You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by jf...@apache.org on 2021/03/24 09:37:15 UTC

svn commit: r1887999 - in /httpd/httpd/trunk: modules/http/http_core.c server/protocol.c

Author: jfclere
Date: Wed Mar 24 09:37:15 2021
New Revision: 1887999

URL: http://svn.apache.org/viewvc?rev=1887999&view=rev
Log:
Make sure that conn->keepalive is NOT reset after being set in ap_read_request().

Modified:
    httpd/httpd/trunk/modules/http/http_core.c
    httpd/httpd/trunk/server/protocol.c

Modified: httpd/httpd/trunk/modules/http/http_core.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http/http_core.c?rev=1887999&r1=1887998&r2=1887999&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http/http_core.c (original)
+++ httpd/httpd/trunk/modules/http/http_core.c Wed Mar 24 09:37:15 2021
@@ -146,9 +146,6 @@ static int ap_process_http_async_connect
             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_connecti
             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;

Modified: httpd/httpd/trunk/server/protocol.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/protocol.c?rev=1887999&r1=1887998&r2=1887999&view=diff
==============================================================================
--- httpd/httpd/trunk/server/protocol.c (original)
+++ httpd/httpd/trunk/server/protocol.c Wed Mar 24 09:37:15 2021
@@ -1469,6 +1469,7 @@ request_rec *ap_read_request(conn_rec *c
     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);