HTTP parser: fixed handling header fields with missing colon.

This commit is contained in:
Valentin Bartenev
2017-06-09 21:49:51 +03:00
parent c5cd7e5e97
commit f6e7c2b6a6
2 changed files with 15 additions and 1 deletions

View File

@@ -219,6 +219,18 @@ static nxt_http_parse_unit_test_case_t nxt_http_unit_test_cases[] = {
NXT_DONE,
NULL, { NULL }
},
{
nxt_string("GET / HTTP/1.1\r\n"
"Host:\r\n\r\n"),
NXT_DONE,
NULL, { NULL }
},
{
nxt_string("GET / HTTP/1.1\r\n"
"Host example.com\r\n\r\n"),
NXT_ERROR,
NULL, { NULL }
},
{
nxt_string("GET / HTTP/1.1\r\n"
":Host: example.com\r\n\r\n"),