From: Jeff Trawick Date: Tue, 26 Nov 2013 17:11:51 +0000 (+0000) Subject: Follow-up to r1538490: X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a4755fcfc7f7c172cef895ba4cb442c4a2846c9c;p=thirdparty%2Fapache%2Fhttpd.git Follow-up to r1538490: Ensure that conn_rec->sbh is always cleared when returning from process_socket(). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1545736 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/mpm/event/event.c b/server/mpm/event/event.c index 7aceeeca540..d36abbc64b7 100644 --- a/server/mpm/event/event.c +++ b/server/mpm/event/event.c @@ -1028,6 +1028,7 @@ read_request: * event thread poll for writeability. */ cs->expiration_time = ap_server_conf->timeout + apr_time_now(); + c->sbh = NULL; apr_thread_mutex_lock(timeout_mutex); TO_QUEUE_APPEND(write_completion_q, cs); cs->pfd.reqevents = ( @@ -1052,8 +1053,10 @@ read_request: } if (cs->pub.state == CONN_STATE_LINGER) { - if (!start_lingering_close_blocking(cs)) + if (!start_lingering_close_blocking(cs)) { + c->sbh = NULL; return; + } } else if (cs->pub.state == CONN_STATE_CHECK_REQUEST_LINE_READABLE) { /* It greatly simplifies the logic to use a single timeout value here diff --git a/server/mpm/eventopt/eventopt.c b/server/mpm/eventopt/eventopt.c index 000f265de31..0cdbc34c05c 100644 --- a/server/mpm/eventopt/eventopt.c +++ b/server/mpm/eventopt/eventopt.c @@ -1080,6 +1080,7 @@ read_request: pollset_op_t *v = ap_equeue_writer_value(eq); cs->expiration_time = ap_server_conf->timeout + apr_time_now(); + c->sbh = NULL; cs->pfd.reqevents = ( cs->pub.sense == CONN_SENSE_WANT_READ ? APR_POLLIN : APR_POLLOUT) | APR_POLLHUP | APR_POLLERR; @@ -1108,6 +1109,7 @@ read_request: if (cs->pub.state == CONN_STATE_LINGER) { if (!start_lingering_close_blocking(cs, eq)) { + c->sbh = NULL; return; } }