summaryrefslogtreecommitdiffhomepage
path: root/src/test/nxt_http_parse_test.c
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2018-01-15 20:49:59 +0300
committerValentin Bartenev <vbart@nginx.com>2018-01-15 20:49:59 +0300
commit3fb140d6d2f8bf0344e7c311923178db808cb437 (patch)
tree139b1cf0d91895682beb6818136ab2ee6e4831ea /src/test/nxt_http_parse_test.c
parent819b43fc2da414c9132c6061eabf063ae08c36dc (diff)
downloadunit-3fb140d6d2f8bf0344e7c311923178db808cb437.tar.gz
unit-3fb140d6d2f8bf0344e7c311923178db808cb437.tar.bz2
HTTP parser: improved error reporting.
Diffstat (limited to 'src/test/nxt_http_parse_test.c')
-rw-r--r--src/test/nxt_http_parse_test.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/test/nxt_http_parse_test.c b/src/test/nxt_http_parse_test.c
index bd577e10..637e9298 100644
--- a/src/test/nxt_http_parse_test.c
+++ b/src/test/nxt_http_parse_test.c
@@ -101,27 +101,27 @@ static nxt_http_parse_test_case_t nxt_http_test_cases[] = {
},
{
nxt_string("GEt / HTTP/1.0\r\n\r\n"),
- NXT_ERROR,
+ NXT_HTTP_PARSE_INVALID,
NULL, { NULL }
},
{
nxt_string("GET /\0 HTTP/1.0\r\n\r\n"),
- NXT_ERROR,
+ NXT_HTTP_PARSE_INVALID,
NULL, { NULL }
},
{
nxt_string("GET /\r HTTP/1.0\r\n\r\n"),
- NXT_ERROR,
+ NXT_HTTP_PARSE_INVALID,
NULL, { NULL }
},
{
nxt_string("GET /\n HTTP/1.0\r\n\r\n"),
- NXT_ERROR,
+ NXT_HTTP_PARSE_INVALID,
NULL, { NULL }
},
{
nxt_string("GET / HTTP/1.0\r\r\n"),
- NXT_ERROR,
+ NXT_HTTP_PARSE_INVALID,
NULL, { NULL }
},
{
@@ -230,13 +230,13 @@ static nxt_http_parse_test_case_t nxt_http_test_cases[] = {
{
nxt_string("GET / HTTP/1.1\r\n"
"Host example.com\r\n\r\n"),
- NXT_ERROR,
+ NXT_HTTP_PARSE_INVALID,
NULL, { NULL }
},
{
nxt_string("GET / HTTP/1.1\r\n"
":Host: example.com\r\n\r\n"),
- NXT_ERROR,
+ NXT_HTTP_PARSE_INVALID,
NULL, { NULL }
},
{
@@ -248,25 +248,25 @@ static nxt_http_parse_test_case_t nxt_http_test_cases[] = {
{
nxt_string("GET / HTTP/1.1\r\n"
"Ho\0st: example.com\r\n\r\n"),
- NXT_ERROR,
+ NXT_HTTP_PARSE_INVALID,
NULL, { NULL }
},
{
nxt_string("GET / HTTP/1.1\r\n"
"Ho\rst: example.com\r\n\r\n"),
- NXT_ERROR,
+ NXT_HTTP_PARSE_INVALID,
NULL, { NULL }
},
{
nxt_string("GET / HTTP/1.1\r\n"
"Host: exa\0mple.com\r\n\r\n"),
- NXT_ERROR,
+ NXT_HTTP_PARSE_INVALID,
NULL, { NULL }
},
{
nxt_string("GET / HTTP/1.1\r\n"
"Host: exa\rmple.com\r\n\r\n"),
- NXT_ERROR,
+ NXT_HTTP_PARSE_INVALID,
NULL, { NULL }
},
{