Mailing List Archive

svn commit: r1888926 - in /httpd/httpd/branches/2.4.x: ./ modules/http/http_core.c server/protocol.c
Author: jailletc36
Date: Sun Apr 18 19:09:03 2021
New Revision: 1888926

URL: http://svn.apache.org/viewvc?rev=1888926&view=rev
Log:
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

Modified:
httpd/httpd/branches/2.4.x/ (props changed)
httpd/httpd/branches/2.4.x/modules/http/http_core.c
httpd/httpd/branches/2.4.x/server/protocol.c

Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
Merged /httpd/httpd/trunk:r1887999

Modified: httpd/httpd/branches/2.4.x/modules/http/http_core.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/http/http_core.c?rev=1888926&r1=1888925&r2=1888926&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/http/http_core.c (original)
+++ httpd/httpd/branches/2.4.x/modules/http/http_core.c Sun Apr 18 19:09:03 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/branches/2.4.x/server/protocol.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/server/protocol.c?rev=1888926&r1=1888925&r2=1888926&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/server/protocol.c (original)
+++ httpd/httpd/branches/2.4.x/server/protocol.c Sun Apr 18 19:09:03 2021
@@ -1315,6 +1315,7 @@ request_rec *ap_read_request(conn_rec *c
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);