test: Assert against correct error messages

PR-URL: https://github.com/nodejs/http-parser/pull/279
Reviewed-By: James M Snell <jasnell@gmail.com>
make-http-max-header-size-gyp-configurable v2.6.1
Johan Bergström 9 years ago committed by James M Snell
parent e2e467b912
commit 678a9e21f1

@ -3356,7 +3356,7 @@ test_double_content_length_error (int req)
parsed = http_parser_execute(&parser, &settings_null, buf, buflen); parsed = http_parser_execute(&parser, &settings_null, buf, buflen);
if (parsed != buflen) { if (parsed != buflen) {
assert(HTTP_PARSER_ERRNO(&parser) == HPE_MULTIPLE_CONTENT_LENGTH); assert(HTTP_PARSER_ERRNO(&parser) == HPE_UNEXPECTED_CONTENT_LENGTH);
return; return;
} }
@ -3383,7 +3383,7 @@ test_chunked_content_length_error (int req)
parsed = http_parser_execute(&parser, &settings_null, buf, buflen); parsed = http_parser_execute(&parser, &settings_null, buf, buflen);
if (parsed != buflen) { if (parsed != buflen) {
assert(HTTP_PARSER_ERRNO(&parser) == HPE_CHUNKED_WITH_CONTENT_LENGTH); assert(HTTP_PARSER_ERRNO(&parser) == HPE_UNEXPECTED_CONTENT_LENGTH);
return; return;
} }

Loading…
Cancel
Save