httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r1587697 - in /httpd/httpd/branches/2.4.x: ./ CHANGES STATUS modules/filters/mod_reqtimeout.c
Date Tue, 15 Apr 2014 19:17:13 GMT
Author: jim
Date: Tue Apr 15 19:17:12 2014
New Revision: 1587697

URL: http://svn.apache.org/r1587697
Log:
Merge r1580568 from trunk:

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

Modified:
    httpd/httpd/branches/2.4.x/   (props changed)
    httpd/httpd/branches/2.4.x/CHANGES
    httpd/httpd/branches/2.4.x/STATUS
    httpd/httpd/branches/2.4.x/modules/filters/mod_reqtimeout.c

Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk:r1580568

Modified: httpd/httpd/branches/2.4.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/CHANGES?rev=1587697&r1=1587696&r2=1587697&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.4.x/CHANGES [utf-8] Tue Apr 15 19:17:12 2014
@@ -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>]
 

Modified: httpd/httpd/branches/2.4.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1587697&r1=1587696&r2=1587697&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/STATUS (original)
+++ httpd/httpd/branches/2.4.x/STATUS Tue Apr 15 19:17:12 2014
@@ -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 ]

Modified: httpd/httpd/branches/2.4.x/modules/filters/mod_reqtimeout.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/filters/mod_reqtimeout.c?rev=1587697&r1=1587696&r2=1587697&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/filters/mod_reqtimeout.c (original)
+++ httpd/httpd/branches/2.4.x/modules/filters/mod_reqtimeout.c Tue Apr 15 19:17:12 2014
@@ -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;
 }



Mime
View raw message