summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2017-06-09 21:49:51 +0300
committerValentin Bartenev <vbart@nginx.com>2017-06-09 21:49:51 +0300
commitf6e7c2b6a6b36fb54cc771e27dff61b8f079e688 (patch)
treed4181328e2ab17b10d2cf8010029b79b1d9d4610 /test
parentc5cd7e5e975b37f6ca1e969da269739218e791c5 (diff)
downloadunit-f6e7c2b6a6b36fb54cc771e27dff61b8f079e688.tar.gz
unit-f6e7c2b6a6b36fb54cc771e27dff61b8f079e688.tar.bz2
HTTP parser: fixed handling header fields with missing colon.
Diffstat (limited to 'test')
-rw-r--r--test/nxt_http_parse_unit_test.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/nxt_http_parse_unit_test.c b/test/nxt_http_parse_unit_test.c
index d9e03e47..2bc974db 100644
--- a/test/nxt_http_parse_unit_test.c
+++ b/test/nxt_http_parse_unit_test.c
@@ -221,6 +221,18 @@ static nxt_http_parse_unit_test_case_t nxt_http_unit_test_cases[] = {
},
{
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"),
NXT_ERROR,
NULL, { NULL }