From f6f791848cbc6031f6c892d48a5759cffe17b1df Mon Sep 17 00:00:00 2001 From: Yann Ylavic Date: Thu, 28 Jul 2016 10:57:22 +0000 Subject: [PATCH] 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 --- CHANGES | 4 ++++ modules/filters/mod_reqtimeout.c | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index fae8bb82b9..34579a6f25 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 ed99c683bc..176b824e36 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; -- 2.50.1