fc24275
# ./pullrev.sh 1857129
fc24275
http://svn.apache.org/viewvc?view=revision&revision=1857129
fc24275
fc24275
--- httpd-2.4.37/modules/filters/mod_reqtimeout.c
fc24275
+++ httpd-2.4.37/modules/filters/mod_reqtimeout.c
fc24275
@@ -31,7 +31,7 @@
fc24275
 #define UNSET                            -1
fc24275
 #define MRT_DEFAULT_handshake_TIMEOUT     0 /* disabled */
fc24275
 #define MRT_DEFAULT_handshake_MAX_TIMEOUT 0
fc24275
-#define MRT_DEFAULT_handshake_MIN_RATE    APR_INT32_MAX
fc24275
+#define MRT_DEFAULT_handshake_MIN_RATE    0
fc24275
 #define MRT_DEFAULT_header_TIMEOUT       20
fc24275
 #define MRT_DEFAULT_header_MAX_TIMEOUT   40
fc24275
 #define MRT_DEFAULT_header_MIN_RATE      500
fc24275
@@ -220,7 +220,7 @@
fc24275
     if (block == APR_NONBLOCK_READ || mode == AP_MODE_INIT
fc24275
         || mode == AP_MODE_EATCRLF) {
fc24275
         rv = ap_get_brigade(f->next, bb, mode, block, readbytes);
fc24275
-        if (ccfg->cur_stage.rate_factor > 0 && rv == APR_SUCCESS) {
fc24275
+        if (ccfg->cur_stage.rate_factor && rv == APR_SUCCESS) {
fc24275
             extend_timeout(ccfg, bb);
fc24275
         }
fc24275
         return rv;
fc24275
@@ -254,7 +254,7 @@
fc24275
             }
fc24275
 
fc24275
             if (!APR_BRIGADE_EMPTY(bb)) {
fc24275
-                if (ccfg->cur_stage.rate_factor > 0) {
fc24275
+                if (ccfg->cur_stage.rate_factor) {
fc24275
                     extend_timeout(ccfg, bb);
fc24275
                 }
fc24275
 
fc24275
@@ -315,7 +315,7 @@
fc24275
          * the real (relevant) bytes to be asked later, within the
fc24275
          * currently alloted time.
fc24275
          */
fc24275
-        if (ccfg->cur_stage.rate_factor > 0 && rv == APR_SUCCESS
fc24275
+        if (ccfg->cur_stage.rate_factor && rv == APR_SUCCESS
fc24275
                 && mode != AP_MODE_SPECULATIVE) {
fc24275
             extend_timeout(ccfg, bb);
fc24275
         }
fc24275
@@ -638,17 +638,17 @@
fc24275
     ap_hook_post_read_request(reqtimeout_before_body, NULL, NULL,
fc24275
                               APR_HOOK_MIDDLE);
fc24275
 
fc24275
-#if MRT_DEFAULT_HANDSHAKE_MIN_RATE > 0
fc24275
+#if MRT_DEFAULT_handshake_MIN_RATE
fc24275
     default_handshake_rate_factor = apr_time_from_sec(1) /
fc24275
-                                    MRT_DEFAULT_HANDSHAKE_MIN_RATE;
fc24275
+                                    MRT_DEFAULT_handshake_MIN_RATE;
fc24275
 #endif
fc24275
-#if MRT_DEFAULT_HEADER_MIN_RATE > 0
fc24275
+#if MRT_DEFAULT_header_MIN_RATE
fc24275
     default_header_rate_factor = apr_time_from_sec(1) /
fc24275
-                                 MRT_DEFAULT_HEADER_MIN_RATE;
fc24275
+                                 MRT_DEFAULT_header_MIN_RATE;
fc24275
 #endif
fc24275
-#if MRT_DEFAULT_BODY_MIN_RATE > 0
fc24275
+#if MRT_DEFAULT_body_MIN_RATE
fc24275
     default_body_rate_factor = apr_time_from_sec(1) /
fc24275
-                               MRT_DEFAULT_BODY_MIN_RATE;
fc24275
+                               MRT_DEFAULT_body_MIN_RATE;
fc24275
 #endif
fc24275
 }
fc24275