Checking for major HTTP version.

This commit is contained in:
Valentin Bartenev
2018-01-15 20:50:20 +03:00
parent a073616fc3
commit 0c38ff0e66
5 changed files with 35 additions and 13 deletions

View File

@@ -124,6 +124,11 @@ static nxt_http_parse_test_case_t nxt_http_test_cases[] = {
NXT_HTTP_PARSE_INVALID,
NULL, { NULL }
},
{
nxt_string("GET / HTTP/2.0\r\n"),
NXT_HTTP_PARSE_UNSUPPORTED_VERSION,
NULL, { NULL }
},
{
nxt_string("GET /. HTTP/1.0\r\n\r\n"),
NXT_DONE,