]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Make case insensitive
authorJim Jagielski <jim@apache.org>
Wed, 21 Jun 2017 10:54:44 +0000 (10:54 +0000)
committerJim Jagielski <jim@apache.org>
Wed, 21 Jun 2017 10:54:44 +0000 (10:54 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1799425 13f79535-47bb-0310-9956-ffa450edef68

include/httpd.h
server/util.c

index 1a2333395970d134565b775e1b096e4061c2c8a4..4e42f8b347029f91f4ab7f6c034877a834a8fd5f 100644 (file)
@@ -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
index 5d1df08ae3d61493ce19660251b376f770b5efd0..781493ed9102a1b73bcd44f9fbc2c026ae7ba452 100644 (file)
@@ -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: