]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1580568 from trunk:
authorJim Jagielski <jim@apache.org>
Tue, 15 Apr 2014 19:17:12 +0000 (19:17 +0000)
committerJim Jagielski <jim@apache.org>
Tue, 15 Apr 2014 19:17:12 +0000 (19:17 +0000)
mod_reqtimeout: Resolve unexpected timeouts on keepalive requests
under the Event MPM. PR56216.

Submitted By: Frank Meier <frank meier ergon ch>
Committed By: covener

Submitted by: covener
Reviewed/backported by: jim

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1587697 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
modules/filters/mod_reqtimeout.c

diff --git a/CHANGES b/CHANGES
index ad0180d764822b000cb24c1bddc2c69810bc6fbd..a68631ab7ea054246cee706e2537cacc90b4f4b1 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@
 
 Changes with Apache 2.4.10
 
+  *) mod_reqtimeout: Resolve unexpected timeouts on keepalive requests 
+     under the Event MPM. PR56216.  [Frank Meier <frank meier ergon ch>]
+
   *) mod_proxy_fcgi: Fix sending of response without some HTTP headers
      that might be set by filters.  [Jim Riggs <jim riggs.me>]
 
@@ -14,11 +17,11 @@ Changes with Apache 2.4.10
      for any third-party async MPMs.)  [Jeff Trawick]
 
   *) mod_lua: Redesign how request record table access behaves,
-     in order to utilize the request record from within these tables
+     in order to utilize the request record from within these tables.
      [Daniel Gruno]
-     
+
   *) mod_lua: Add r:wspeek for peeking at WebSocket frames. [Daniel Gruno]
-  
   *) mod_lua: Log an error when the initial parsing of a Lua file fails.
      [Daniel Gruno, Felipe Daragon <filipe syhunt com>]
 
diff --git a/STATUS b/STATUS
index fd442fce030ba76f78d5570cb60624f82c9199a3..8e5799009f2abb8a679219cc84b160f93ed77c3c 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -108,12 +108,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
         Trunk version of patch works
      +1: rpluem, jim, ylavic
  
-   * mod_reqtimeout: Don't add filters and create new connection configs
-     for each keepalive request under event MPM. PR56216
-     trunk patch: http://svn.apache.org/r1580568
-     2.4.x patch: trunk works
-     +1 covener, jim, ylavic
-
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
index 3250efcadece1a6d141745f0ae84b653ace6e7b9..b19d9512503902ba859465b3093cfa76a4454c4d 100644 (file)
@@ -343,7 +343,17 @@ static int reqtimeout_init(conn_rec *c)
         return DECLINED;
     }
 
-    ccfg = apr_pcalloc(c->pool, sizeof(reqtimeout_con_cfg));
+    ccfg = ap_get_module_config(c->conn_config, &reqtimeout_module);
+    if (ccfg == NULL) {
+        ccfg = apr_pcalloc(c->pool, sizeof(reqtimeout_con_cfg));
+        ap_set_module_config(c->conn_config, &reqtimeout_module, ccfg);
+        ap_add_input_filter(reqtimeout_filter_name, ccfg, NULL, c);
+    }
+    else {
+        /* subsequent request under event-like MPM */
+        memset(ccfg, 0, sizeof(reqtimeout_con_cfg));
+    }
+
     ccfg->type = "header";
     if (cfg->header_timeout != UNSET) {
         ccfg->new_timeout     = cfg->header_timeout;
@@ -357,9 +367,7 @@ static int reqtimeout_init(conn_rec *c)
         ccfg->min_rate        = MRT_DEFAULT_HEADER_MIN_RATE;
         ccfg->rate_factor     = default_header_rate_factor;
     }
-    ap_set_module_config(c->conn_config, &reqtimeout_module, ccfg);
 
-    ap_add_input_filter("reqtimeout", ccfg, NULL, c);
     /* we are not handling the connection, we just do initialization */
     return DECLINED;
 }