From: Yann Ylavic Date: Thu, 28 Jul 2016 10:57:22 +0000 (+0000) Subject: mod_reqtimeout: Fix body timeout disabling for CONNECT requests to avoid X-Git-Tag: 2.5.0-alpha~1369 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f6f791848cbc6031f6c892d48a5759cffe17b1df;p=thirdparty%2Fapache%2Fhttpd.git 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 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1754391 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index fae8bb82b99..34579a6f25a 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,10 @@ -*- coding: utf-8 -*- Changes with Apache 2.5.0 + *) mod_reqtimeout: Fix body timeout disabling for CONNECT requests to avoid + triggering mod_proxy_connect's AH01018 once the tunnel is established. + [Yann Ylavic] + *) mod_proxy_balancer: Prevent redirect loops between workers within a balancer by limiting the number of redirects to the number balancer members. PR 59864 [Ruediger Pluem] diff --git a/modules/filters/mod_reqtimeout.c b/modules/filters/mod_reqtimeout.c index ed99c683bc9..176b824e36e 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,6 +428,10 @@ static int reqtimeout_before_body(request_rec *r) ccfg->timeout_at = 0; ccfg->max_timeout_at = 0; ccfg->type = "body"; + if (r->method_number == M_CONNECT) { + /* disabled for a CONNECT request */ + ccfg->new_timeout = 0; + } if (cfg->body_timeout != UNSET) { ccfg->new_timeout = cfg->body_timeout; ccfg->new_max_timeout = cfg->body_max_timeout;