Allow uppercase chars in IS_ALPHANUM

This commit is contained in:
Jon Kolb
2011-06-18 13:46:29 -04:00
parent f684abdcc5
commit a6934445e8
2 changed files with 25 additions and 1 deletions

View File

@@ -302,7 +302,7 @@ enum header_states
#define TOKEN(c) (tokens[(unsigned char)c])
#define IS_ALPHA(c) ((c) >= 'a' && (c) <= 'z')
#define IS_NUM(c) ((c) >= '0' && (c) <= '9')
#define IS_ALPHANUM(c) (IS_ALPHA(c) || IS_NUM(c))
#define IS_ALPHANUM(c) (IS_ALPHA(LOWER(c)) || IS_NUM(c))
#if HTTP_PARSER_STRICT
#define IS_URL_CHAR(c) (normal_url_char[(unsigned char) (c)])

24
test.c
View File

@@ -744,6 +744,30 @@ const struct message requests[] =
,.body= "cccccccccc"
}
#define CONNECT_CAPS_REQUEST 27
, {.name = "connect caps request"
,.type= HTTP_REQUEST
,.raw= "CONNECT 0-HOME0.NETSCAPE.COM:443 HTTP/1.0\r\n"
"User-agent: Mozilla/1.1N\r\n"
"Proxy-authorization: basic aGVsbG86d29ybGQ=\r\n"
"\r\n"
,.should_keep_alive= FALSE
,.message_complete_on_eof= FALSE
,.http_major= 1
,.http_minor= 0
,.method= HTTP_CONNECT
,.query_string= ""
,.fragment= ""
,.request_path= ""
,.request_url= "0-HOME0.NETSCAPE.COM:443"
,.num_headers= 2
,.upgrade=1
,.headers= { { "User-agent", "Mozilla/1.1N" }
, { "Proxy-authorization", "basic aGVsbG86d29ybGQ=" }
}
,.body= ""
}
, {.name= NULL } /* sentinel */
};