summaryrefslogtreecommitdiffhomepage
path: root/src/test/nxt_http_parse_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/nxt_http_parse_test.c')
-rw-r--r--src/test/nxt_http_parse_test.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/test/nxt_http_parse_test.c b/src/test/nxt_http_parse_test.c
index bc2e3a42..a23f27c3 100644
--- a/src/test/nxt_http_parse_test.c
+++ b/src/test/nxt_http_parse_test.c
@@ -270,6 +270,18 @@ static nxt_http_parse_test_case_t nxt_http_test_cases[] = {
},
{
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"),
NXT_HTTP_PARSE_INVALID,
NULL, { NULL }
@@ -300,6 +312,18 @@ static nxt_http_parse_test_case_t nxt_http_test_cases[] = {
},
{
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"
"X-Good-Header: value\r\n\r\n"),
NXT_DONE,