aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_parse.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2004-03-16 07:10:12 +0000
committerIgor Sysoev <igor@sysoev.ru>2004-03-16 07:10:12 +0000
commit10a543a810ac78eb5d754302b001debf9cd420c4 (patch)
treea4a4f43835bed4549007b82db516d460fc86c555 /src/http/ngx_http_parse.c
parent5596ede94ed311bb9d16ee11f6f68c97eb46d836 (diff)
downloadnginx-10a543a810ac78eb5d754302b001debf9cd420c4.tar.gz
nginx-10a543a810ac78eb5d754302b001debf9cd420c4.zip
nginx-0.0.2-2004-03-16-10:10:12 import
Diffstat (limited to 'src/http/ngx_http_parse.c')
-rw-r--r--src/http/ngx_http_parse.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/http/ngx_http_parse.c b/src/http/ngx_http_parse.c
index ad9dac085..c86024539 100644
--- a/src/http/ngx_http_parse.c
+++ b/src/http/ngx_http_parse.c
@@ -5,7 +5,7 @@
ngx_int_t ngx_http_parse_request_line(ngx_http_request_t *r)
{
- char ch, *p;
+ u_char ch, *p;
enum {
sw_start = 0,
sw_G,
@@ -421,7 +421,7 @@ ngx_int_t ngx_http_parse_request_line(ngx_http_request_t *r)
ngx_int_t ngx_http_parse_header_line(ngx_http_request_t *r, ngx_hunk_t *h)
{
- char c, ch, *p;
+ u_char c, ch, *p;
enum {
sw_start = 0,
sw_name,
@@ -458,7 +458,7 @@ ngx_int_t ngx_http_parse_header_line(ngx_http_request_t *r, ngx_hunk_t *h)
state = sw_name;
r->header_name_start = p - 1;
- c = ch | 0x20;
+ c = (char) (ch | 0x20);
if (c >= 'a' && c <= 'z') {
break;
}
@@ -478,7 +478,7 @@ ngx_int_t ngx_http_parse_header_line(ngx_http_request_t *r, ngx_hunk_t *h)
/* header name */
case sw_name:
- c = ch | 0x20;
+ c = (u_char) (ch | 0x20);
if (c >= 'a' && c <= 'z') {
break;
}
@@ -623,7 +623,7 @@ ngx_int_t ngx_http_parse_header_line(ngx_http_request_t *r, ngx_hunk_t *h)
ngx_int_t ngx_http_parse_complex_uri(ngx_http_request_t *r)
{
- char c, ch, decoded, *p, *u;
+ u_char c, ch, decoded, *p, *u;
enum {
sw_usual = 0,
sw_slash,
@@ -778,15 +778,15 @@ ngx_int_t ngx_http_parse_complex_uri(ngx_http_request_t *r)
case sw_quoted:
if (ch >= '0' && ch <= '9') {
- decoded = ch - '0';
+ decoded = (char) (ch - '0');
state = sw_quoted_second;
ch = *p++;
break;
}
- c = ch | 0x20;
+ c = (char) (ch | 0x20);
if (c >= 'a' && c <= 'f') {
- decoded = c - 'a' + 10;
+ decoded = (char) (c - 'a' + 10);
state = sw_quoted_second;
ch = *p++;
break;
@@ -796,7 +796,7 @@ ngx_int_t ngx_http_parse_complex_uri(ngx_http_request_t *r)
case sw_quoted_second:
if (ch >= '0' && ch <= '9') {
- ch = (decoded << 4) + ch - '0';
+ ch = (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_http_request_t *r)
break;
}
- c = ch | 0x20;
+ c = (char) (ch | 0x20);
if (c >= 'a' && c <= 'f') {
- ch = (decoded << 4) + c - 'a' + 10;
+ ch = (char) ((decoded << 4) + c - 'a' + 10);
if (ch == '%') {
state = sw_usual;
*u++ = ch;