
sf at apache
Nov 10, 2009, 7:27 AM
Post #1 of 1
(125 views)
Permalink
|
|
svn commit: r834499 - /httpd/httpd/trunk/modules/filters/mod_reqtimeout.c
|
|
Author: sf Date: Tue Nov 10 15:27:02 2009 New Revision: 834499 URL: http://svn.apache.org/viewvc?rev=834499&view=rev Log: Fix broken config check for *max timeouts Fix floating point exception for *minrate == 0 Modified: httpd/httpd/trunk/modules/filters/mod_reqtimeout.c Modified: httpd/httpd/trunk/modules/filters/mod_reqtimeout.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/mod_reqtimeout.c?rev=834499&r1=834498&r2=834499&view=diff ============================================================================== --- httpd/httpd/trunk/modules/filters/mod_reqtimeout.c (original) +++ httpd/httpd/trunk/modules/filters/mod_reqtimeout.c Tue Nov 10 15:27:02 2009 @@ -305,7 +305,8 @@ } else if (!strcasecmp(key, "headermax")) { ret = parse_int(val, &conf->header_max_timeout); - if (!ret && conf->header_max_timeout > conf->header_timeout) { + if (!ret && conf->header_max_timeout > 0 && + conf->header_max_timeout <= conf->header_timeout) { ret = "Max timeout must be larger than initial timeout"; } } @@ -314,19 +315,20 @@ } else if (!strcasecmp(key, "bodymax")) { ret = parse_int(val, &conf->body_max_timeout); - if (!ret && conf->body_max_timeout > conf->body_timeout) { + if (!ret && conf->body_max_timeout > 0 && + conf->body_max_timeout <= conf->body_timeout) { ret = "Max timeout must be larger than initial timeout"; } } else if (!strcasecmp(key, "headerminrate")) { ret = parse_int(val, &conf->header_min_rate); - if (!ret) { + if (!ret && conf->header_min_rate > 0) { conf->header_rate_factor = apr_time_from_sec(1) / conf->header_min_rate; } } else if (!strcasecmp(key, "bodyminrate")) { ret = parse_int(val, &conf->body_min_rate); - if (!ret) { + if (!ret && conf->body_min_rate > 0) { conf->body_rate_factor = apr_time_from_sec(1) / conf->body_min_rate; } }
|