diff src/http/ngx_http_parse.c @ 291:117ccc7c4055

nginx-0.0.3-2004-03-16-16:35:20 import
author Igor Sysoev <igor@sysoev.ru>
date Tue, 16 Mar 2004 13:35:20 +0000
parents 87e73f067470
children d71c87d11b16
line wrap: on
line diff
--- a/src/http/ngx_http_parse.c
+++ b/src/http/ngx_http_parse.c
@@ -458,7 +458,7 @@ ngx_int_t ngx_http_parse_header_line(ngx
                 state = sw_name;
                 r->header_name_start = p - 1;
 
-                c = (char) (ch | 0x20);
+                c = (u_char) (ch | 0x20);
                 if (c >= 'a' && c <= 'z') {
                     break;
                 }
@@ -778,15 +778,15 @@ ngx_int_t ngx_http_parse_complex_uri(ngx
 
         case sw_quoted:
             if (ch >= '0' && ch <= '9') {
-                decoded = (char) (ch - '0');
+                decoded = (u_char) (ch - '0');
                 state = sw_quoted_second;
                 ch = *p++;
                 break;
             }
 
-            c = (char) (ch | 0x20);
+            c = (u_char) (ch | 0x20);
             if (c >= 'a' && c <= 'f') {
-                decoded = (char) (c - 'a' + 10);
+                decoded = (u_char) (c - 'a' + 10);
                 state = sw_quoted_second;
                 ch = *p++;
                 break;
@@ -796,7 +796,7 @@ ngx_int_t ngx_http_parse_complex_uri(ngx
 
         case sw_quoted_second:
             if (ch >= '0' && ch <= '9') {
-                ch = (char) ((decoded << 4) + ch - '0');
+                ch = (u_char) ((decoded << 4) + ch - '0');
                 if (ch == '%') {
                     state = sw_usual;
                     *u++ = ch;
@@ -807,9 +807,9 @@ ngx_int_t ngx_http_parse_complex_uri(ngx
                 break;
             }
 
-            c = (char) (ch | 0x20);
+            c = (u_char) (ch | 0x20);
             if (c >= 'a' && c <= 'f') {
-                ch = (char) ((decoded << 4) + c - 'a' + 10);
+                ch = (u_char) ((decoded << 4) + c - 'a' + 10);
                 if (ch == '%') {
                     state = sw_usual;
                     *u++ = ch;