diff src/core/ngx_string.c @ 250:fbf2b2f66c9f NGINX_0_4_10

nginx 0.4.10 *) Feature: the POP3 proxy supports the APOP command. *) Bugfix: if the select, poll or /dev/poll methods were used, then while waiting authentication server response the IMAP/POP3 proxy hogged CPU. *) Bugfix: a segmentation fault might occur if the $server_addr variable was used in the "map" directive. *) Bugfix: the ngx_http_flv_module did not support the byte ranges for full responses; bug appeared in 0.4.7. *) Bugfix: nginx could not be built on Debian amd64; bug appeared in 0.4.9.
author Igor Sysoev <http://sysoev.ru>
date Mon, 23 Oct 2006 00:00:00 +0400
parents 3866d57d9cfd
children f3ec44f4a53b
line wrap: on
line diff
--- a/src/core/ngx_string.c
+++ b/src/core/ngx_string.c
@@ -593,7 +593,7 @@ ngx_atotm(u_char *line, size_t n)
 ngx_int_t
 ngx_hextoi(u_char *line, size_t n)
 {
-    u_char     ch;
+    u_char     c, ch;
     ngx_int_t  value;
 
     if (n == 0) {
@@ -608,13 +608,10 @@ ngx_hextoi(u_char *line, size_t n)
             continue;
         }
 
-        if (ch >= 'A' && ch <= 'F') {
-            value = value * 16 + (ch - 'A' + 10);
-            continue;
-        }
+        c = (u_char) (ch | 0x20);
 
-        if (ch >= 'a' && ch <= 'f') {
-            value = value * 16 + (ch - 'a' + 10);
+        if (c >= 'a' && c <= 'f') {
+            value = value * 16 + (c - 'a' + 10);
             continue;
         }