Make sure that conn->keepalive is NOT reset after being set in ap_read_request().
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1887999 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/modules/http/http_core.c b/modules/http/http_core.c
index 3f87f80..9e875ce 100644
--- a/modules/http/http_core.c
+++ b/modules/http/http_core.c
@@ -146,9 +146,6 @@
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 @@
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 d18ca01..4eac201 100644
--- a/server/protocol.c
+++ b/server/protocol.c
@@ -1469,6 +1469,7 @@
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);