HTTP parser: allowing tabs in field values as per RFC 7230.
This commit is contained in:
@@ -268,6 +268,18 @@ static nxt_http_parse_test_case_t nxt_http_test_cases[] = {
|
||||
NXT_HTTP_PARSE_INVALID,
|
||||
NULL, { NULL }
|
||||
},
|
||||
{
|
||||
nxt_string("GET / HTTP/1.1\r\n"
|
||||
"Ho\nst: example.com\r\n\r\n"),
|
||||
NXT_HTTP_PARSE_INVALID,
|
||||
NULL, { NULL }
|
||||
},
|
||||
{
|
||||
nxt_string("GET / HTTP/1.1\r\n"
|
||||
"Host : example.com\r\n\r\n"),
|
||||
NXT_HTTP_PARSE_INVALID,
|
||||
NULL, { NULL }
|
||||
},
|
||||
{
|
||||
nxt_string("GET / HTTP/1.1\r\n"
|
||||
"Host: exa\0mple.com\r\n\r\n"),
|
||||
@@ -298,6 +310,18 @@ static nxt_http_parse_test_case_t nxt_http_test_cases[] = {
|
||||
NXT_DONE,
|
||||
NULL, { NULL }
|
||||
},
|
||||
{
|
||||
nxt_string("GET / HTTP/1.1\r\n"
|
||||
"Host: exa\nmple.com\r\n\r\n"),
|
||||
NXT_HTTP_PARSE_INVALID,
|
||||
NULL, { NULL }
|
||||
},
|
||||
{
|
||||
nxt_string("GET / HTTP/1.1\r\n"
|
||||
"Host: exa\tmple.com\r\n\r\n"),
|
||||
NXT_DONE,
|
||||
NULL, { NULL }
|
||||
},
|
||||
{
|
||||
nxt_string("GET / HTTP/1.1\r\n"
|
||||
"X-Unknown-Header: value\r\n"
|
||||
|
||||
Reference in New Issue
Block a user