From f6e7c2b6a6b36fb54cc771e27dff61b8f079e688 Mon Sep 17 00:00:00 2001 From: Valentin Bartenev Date: Fri, 9 Jun 2017 21:49:51 +0300 Subject: HTTP parser: fixed handling header fields with missing colon. --- test/nxt_http_parse_unit_test.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test') 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 @@ -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"), -- cgit