Digits in hostname on CONNECT req allowed

event_stream
Ryan Dahl 14 years ago
parent 90320fde7a
commit 37e9009369

@ -658,6 +658,9 @@ size_t http_parser_execute (http_parser *parser,
} else if (ch == '.') { } else if (ch == '.') {
state = s_req_host; state = s_req_host;
break; break;
} else if ('0' <= ch && ch <= '9') {
state = s_req_host;
break;
} }
goto error; goto error;

@ -498,7 +498,7 @@ const struct message requests[] =
#define CONNECT_REQUEST 17 #define CONNECT_REQUEST 17
, {.name = "connect request" , {.name = "connect request"
,.type= HTTP_REQUEST ,.type= HTTP_REQUEST
,.raw= "CONNECT home.netscape.com:443 HTTP/1.0\r\n" ,.raw= "CONNECT home0.netscape.com:443 HTTP/1.0\r\n"
"User-agent: Mozilla/1.1N\r\n" "User-agent: Mozilla/1.1N\r\n"
"Proxy-authorization: basic aGVsbG86d29ybGQ=\r\n" "Proxy-authorization: basic aGVsbG86d29ybGQ=\r\n"
"\r\n" "\r\n"
@ -510,7 +510,7 @@ const struct message requests[] =
,.query_string= "" ,.query_string= ""
,.fragment= "" ,.fragment= ""
,.request_path= "" ,.request_path= ""
,.request_url= "home.netscape.com:443" ,.request_url= "home0.netscape.com:443"
,.num_headers= 2 ,.num_headers= 2
,.upgrade=1 ,.upgrade=1
,.headers= { { "User-agent", "Mozilla/1.1N" } ,.headers= { { "User-agent", "Mozilla/1.1N" }

Loading…
Cancel
Save