|
|
@ -2094,6 +2094,7 @@ int
|
|
|
|
message_begin_cb (http_parser *p)
|
|
|
|
message_begin_cb (http_parser *p)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
assert(p == &parser);
|
|
|
|
assert(p == &parser);
|
|
|
|
|
|
|
|
assert(!messages[num_messages].message_begin_cb_called);
|
|
|
|
messages[num_messages].message_begin_cb_called = TRUE;
|
|
|
|
messages[num_messages].message_begin_cb_called = TRUE;
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -4189,6 +4190,7 @@ main (void)
|
|
|
|
test_simple_type("HTTP/11.1 200 OK\r\n\r\n", HPE_INVALID_VERSION, HTTP_RESPONSE);
|
|
|
|
test_simple_type("HTTP/11.1 200 OK\r\n\r\n", HPE_INVALID_VERSION, HTTP_RESPONSE);
|
|
|
|
test_simple_type("HTTP/1.01 200 OK\r\n\r\n", HPE_INVALID_VERSION, HTTP_RESPONSE);
|
|
|
|
test_simple_type("HTTP/1.01 200 OK\r\n\r\n", HPE_INVALID_VERSION, HTTP_RESPONSE);
|
|
|
|
test_simple_type("HTTP/1.1\t200 OK\r\n\r\n", HPE_INVALID_VERSION, HTTP_RESPONSE);
|
|
|
|
test_simple_type("HTTP/1.1\t200 OK\r\n\r\n", HPE_INVALID_VERSION, HTTP_RESPONSE);
|
|
|
|
|
|
|
|
test_simple_type("\rHTTP/1.1\t200 OK\r\n\r\n", HPE_INVALID_VERSION, HTTP_RESPONSE);
|
|
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < ARRAY_SIZE(responses); i++) {
|
|
|
|
for (i = 0; i < ARRAY_SIZE(responses); i++) {
|
|
|
|
test_message(&responses[i]);
|
|
|
|
test_message(&responses[i]);
|
|
|
|