]> granicus.if.org Git - apache/commitdiff
mod_reqtimeout: Fix body timeout disabling for CONNECT requests to avoid
authorYann Ylavic <ylavic@apache.org>
Thu, 28 Jul 2016 10:57:22 +0000 (10:57 +0000)
committerYann Ylavic <ylavic@apache.org>
Thu, 28 Jul 2016 10:57:22 +0000 (10:57 +0000)
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
modules/filters/mod_reqtimeout.c

diff --git a/CHANGES b/CHANGES
index fae8bb82b992584e2de9af118f54ebb188996d86..34579a6f25a567ff3af6b21683e1e3384530be92 100644 (file)
--- 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]
index ed99c683bc9ca35778545f9d2cf1f045e3807ff7..176b824e36ec40d28959ab673becdcfeca9845e8 100644 (file)
@@ -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;