From: Jim Jagielski Date: Thu, 25 Aug 2016 12:54:06 +0000 (+0000) Subject: Merge r1754391, r1754399 from trunk: X-Git-Tag: 2.4.24~286 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=11263adbd528616721d46dc7567587a398861d72;p=apache Merge r1754391, r1754399 from trunk: mod_reqtimeout: Fix body timeout disabling for CONNECT requests to avoid triggering mod_proxy_connect's AH01018 once the tunnel is established. https://bugzilla.mozilla.org/show_bug.cgi?id=1279483#c9 mod_reqtimeout: follow up to r1754391: fix missing "else". Submitted by: ylavic Reviewed/backported by: jim git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1757675 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index b7c2985798..fc47f4e983 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,10 @@ Changes with Apache 2.4.24 + *) mod_reqtimeout: Fix body timeout disabling for CONNECT requests to avoid + triggering mod_proxy_connect's AH01018 once the tunnel is established. + [Yann Ylavic] + *) ab: Set the Server Name Indication (SNI) extension on outgoing TLS connections (unless -I is specified), according to the Host header (if any) or the requested URL's hostname otherwise. [Yann Ylavic] diff --git a/STATUS b/STATUS index ed1955481b..5f098e2169 100644 --- a/STATUS +++ b/STATUS @@ -117,12 +117,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - *) mod_reqtimeout: Fix body timeout disabling for CONNECT requests to avoid - triggering mod_proxy_connect's AH01018 once the tunnel is established. - trunk patch: http://svn.apache.org/r1754391 - http://svn.apache.org/r1754399 - 2.4.x patch: trunk works (module CHANGES) - +1: ylavic, rpluem, jim PATCHES PROPOSED TO BACKPORT FROM TRUNK: [ New proposals should be added at the end of the list ] diff --git a/modules/filters/mod_reqtimeout.c b/modules/filters/mod_reqtimeout.c index ed99c683bc..538e9b1bde 100644 --- a/modules/filters/mod_reqtimeout.c +++ b/modules/filters/mod_reqtimeout.c @@ -417,8 +417,8 @@ static int reqtimeout_before_body(request_rec *r) reqtimeout_con_cfg *ccfg = ap_get_module_config(r->connection->conn_config, &reqtimeout_module); - if (ccfg == NULL || r->method_number == M_CONNECT) { - /* either disabled for this connection or a CONNECT request */ + if (ccfg == NULL) { + /* not configured for this connection */ return OK; } cfg = ap_get_module_config(r->connection->base_server->module_config, @@ -428,7 +428,11 @@ static int reqtimeout_before_body(request_rec *r) ccfg->timeout_at = 0; ccfg->max_timeout_at = 0; ccfg->type = "body"; - if (cfg->body_timeout != UNSET) { + if (r->method_number == M_CONNECT) { + /* disabled for a CONNECT request */ + ccfg->new_timeout = 0; + } + else if (cfg->body_timeout != UNSET) { ccfg->new_timeout = cfg->body_timeout; ccfg->new_max_timeout = cfg->body_max_timeout; ccfg->min_rate = cfg->body_min_rate;