From: Jim Jagielski Date: Wed, 21 Jun 2017 10:54:44 +0000 (+0000) Subject: Make case insensitive X-Git-Tag: 2.5.0-alpha~364 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=eb03bf18ef9cb590f7afdda9e6a03b610f00a970;p=thirdparty%2Fapache%2Fhttpd.git Make case insensitive git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1799425 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/include/httpd.h b/include/httpd.h index 1a233339597..4e42f8b3470 100644 --- a/include/httpd.h +++ b/include/httpd.h @@ -2152,7 +2152,7 @@ AP_DECLARE(char *) ap_append_pid(apr_pool_t *p, const char *string, /** * Parse a given timeout parameter string into an apr_interval_time_t value. * The unit of the time interval is given as postfix string to the numeric - * string. Currently the following units are understood: + * string. Currently the following units are understood (case insensitive): * * ms : milliseconds * s : seconds diff --git a/server/util.c b/server/util.c index 5d1df08ae3d..781493ed910 100644 --- a/server/util.c +++ b/server/util.c @@ -2559,7 +2559,7 @@ AP_DECLARE(char *) ap_append_pid(apr_pool_t *p, const char *string, /** * Parse a given timeout parameter string into an apr_interval_time_t value. * The unit of the time interval is given as postfix string to the numeric - * string. Currently the following units are understood: + * string. Currently the following units are understood (case insensitive): * * ms : milliseconds * s : seconds @@ -2597,20 +2597,25 @@ AP_DECLARE(apr_status_t) ap_timeout_parameter_parse( switch (*time_str) { /* Time is in seconds */ case 's': + case 'S': *timeout = (apr_interval_time_t) apr_time_from_sec(tout); break; case 'h': + case 'H': /* Time is in hours */ *timeout = (apr_interval_time_t) apr_time_from_sec(tout * 3600); break; case 'm': + case 'M': switch (*(++time_str)) { /* Time is in milliseconds */ case 's': + case 'S': *timeout = (apr_interval_time_t) tout * 1000; break; /* Time is in minutes */ case 'i': + case 'I': *timeout = (apr_interval_time_t) apr_time_from_sec(tout * 60); break; default: