]> granicus.if.org Git - apache/commitdiff
Merge r1754391, r1754399 from trunk:
authorJim Jagielski <jim@apache.org>
Thu, 25 Aug 2016 12:54:06 +0000 (12:54 +0000)
committerJim Jagielski <jim@apache.org>
Thu, 25 Aug 2016 12:54:06 +0000 (12:54 +0000)
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

CHANGES
STATUS
modules/filters/mod_reqtimeout.c

diff --git a/CHANGES b/CHANGES
index b7c2985798174b12f198d915fe3adf51472d771e..fc47f4e9830497d7449750560aa616298a185c3f 100644 (file)
--- 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 ed1955481badbb14f81e76781a6d0816ff2d21ca..5f098e21691564a67a35115b6fce989f7ec57b28 100644 (file)
--- 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 ]
index ed99c683bc9ca35778545f9d2cf1f045e3807ff7..538e9b1bde9bc60673d782b2c7bb28a2fcb63abd 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,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;