Blame SOURCES/cve-tests-backport.patch
|
|
89295e |
diff -up http-parser-2.7.1/test.c.tests-simple-type http-parser-2.7.1/test.c
|
|
|
89295e |
--- http-parser-2.7.1/test.c.tests-simple-type 2019-04-01 11:47:35.658031500 +0200
|
|
|
89295e |
+++ http-parser-2.7.1/test.c 2019-04-01 11:48:20.275113054 +0200
|
|
|
89295e |
@@ -3313,18 +3313,18 @@ test_message_count_body (const struct me
|
|
|
89295e |
}
|
|
|
89295e |
|
|
|
89295e |
void
|
|
|
89295e |
-test_simple (const char *buf, enum http_errno err_expected)
|
|
|
89295e |
+test_simple_type (const char *buf,
|
|
|
89295e |
+ enum http_errno err_expected,
|
|
|
89295e |
+ enum http_parser_type type)
|
|
|
89295e |
{
|
|
|
89295e |
- parser_init(HTTP_REQUEST);
|
|
|
89295e |
+ parser_init(type);
|
|
|
89295e |
|
|
|
89295e |
enum http_errno err;
|
|
|
89295e |
|
|
|
89295e |
parse(buf, strlen(buf));
|
|
|
89295e |
- err = HTTP_PARSER_ERRNO(parser);
|
|
|
89295e |
+ err = HTTP_PARSER_ERRNO(parser);
|
|
|
89295e |
parse(NULL, 0);
|
|
|
89295e |
|
|
|
89295e |
- parser_free();
|
|
|
89295e |
-
|
|
|
89295e |
/* In strict mode, allow us to pass with an unexpected HPE_STRICT as
|
|
|
89295e |
* long as the caller isn't expecting success.
|
|
|
89295e |
*/
|
|
|
89295e |
@@ -3340,6 +3340,12 @@ test_simple (const char *buf, enum http_
|
|
|
89295e |
}
|
|
|
89295e |
|
|
|
89295e |
void
|
|
|
89295e |
+test_simple (const char *buf, enum http_errno err_expected)
|
|
|
89295e |
+{
|
|
|
89295e |
+ test_simple_type(buf, err_expected, HTTP_REQUEST);
|
|
|
89295e |
+}
|
|
|
89295e |
+
|
|
|
89295e |
+void
|
|
|
89295e |
test_invalid_header_content (int req, const char* str)
|
|
|
89295e |
{
|
|
|
89295e |
http_parser parser;
|