You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by yl...@apache.org on 2016/07/28 10:57:22 UTC

svn commit: r1754391 - in /httpd/httpd/trunk: CHANGES modules/filters/mod_reqtimeout.c

Author: ylavic
Date: Thu Jul 28 10:57:22 2016
New Revision: 1754391

URL: http://svn.apache.org/viewvc?rev=1754391&view=rev
Log:
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


Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/modules/filters/mod_reqtimeout.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1754391&r1=1754390&r2=1754391&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Thu Jul 28 10:57:22 2016
@@ -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]

Modified: httpd/httpd/trunk/modules/filters/mod_reqtimeout.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/mod_reqtimeout.c?rev=1754391&r1=1754390&r2=1754391&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/filters/mod_reqtimeout.c (original)
+++ httpd/httpd/trunk/modules/filters/mod_reqtimeout.c Thu Jul 28 10:57:22 2016
@@ -417,8 +417,8 @@ static int reqtimeout_before_body(reques
     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(reques
     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;