|
|
@ -153,10 +153,10 @@ const struct message requests[] =
|
|
|
|
,.body= ""
|
|
|
|
,.body= ""
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#define DUMBFUCK 2
|
|
|
|
#define DUMBLUCK 2
|
|
|
|
, {.name= "dumbfuck"
|
|
|
|
, {.name= "dumbluck"
|
|
|
|
,.type= HTTP_REQUEST
|
|
|
|
,.type= HTTP_REQUEST
|
|
|
|
,.raw= "GET /dumbfuck HTTP/1.1\r\n"
|
|
|
|
,.raw= "GET /dumbluck HTTP/1.1\r\n"
|
|
|
|
"aaaaaaaaaaaaa:++++++++++\r\n"
|
|
|
|
"aaaaaaaaaaaaa:++++++++++\r\n"
|
|
|
|
"\r\n"
|
|
|
|
"\r\n"
|
|
|
|
,.should_keep_alive= TRUE
|
|
|
|
,.should_keep_alive= TRUE
|
|
|
@ -166,8 +166,8 @@ const struct message requests[] =
|
|
|
|
,.method= HTTP_GET
|
|
|
|
,.method= HTTP_GET
|
|
|
|
,.query_string= ""
|
|
|
|
,.query_string= ""
|
|
|
|
,.fragment= ""
|
|
|
|
,.fragment= ""
|
|
|
|
,.request_path= "/dumbfuck"
|
|
|
|
,.request_path= "/dumbluck"
|
|
|
|
,.request_url= "/dumbfuck"
|
|
|
|
,.request_url= "/dumbluck"
|
|
|
|
,.num_headers= 1
|
|
|
|
,.num_headers= 1
|
|
|
|
,.headers=
|
|
|
|
,.headers=
|
|
|
|
{ { "aaaaaaaaaaaaa", "++++++++++" }
|
|
|
|
{ { "aaaaaaaaaaaaa", "++++++++++" }
|
|
|
@ -371,13 +371,13 @@ const struct message requests[] =
|
|
|
|
,.chunk_lengths= { 5, 6 }
|
|
|
|
,.chunk_lengths= { 5, 6 }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#define CHUNKED_W_BULLSHIT_AFTER_LENGTH 11
|
|
|
|
#define CHUNKED_W_NONSENSE_AFTER_LENGTH 11
|
|
|
|
, {.name= "with bullshit after the length"
|
|
|
|
, {.name= "with nonsense after the length"
|
|
|
|
,.type= HTTP_REQUEST
|
|
|
|
,.type= HTTP_REQUEST
|
|
|
|
,.raw= "POST /chunked_w_bullshit_after_length HTTP/1.1\r\n"
|
|
|
|
,.raw= "POST /chunked_w_nonsense_after_length HTTP/1.1\r\n"
|
|
|
|
"Transfer-Encoding: chunked\r\n"
|
|
|
|
"Transfer-Encoding: chunked\r\n"
|
|
|
|
"\r\n"
|
|
|
|
"\r\n"
|
|
|
|
"5; ihatew3;whatthefuck=aretheseparametersfor\r\nhello\r\n"
|
|
|
|
"5; ilovew3;whattheluck=aretheseparametersfor\r\nhello\r\n"
|
|
|
|
"6; blahblah; blah\r\n world\r\n"
|
|
|
|
"6; blahblah; blah\r\n world\r\n"
|
|
|
|
"0\r\n"
|
|
|
|
"0\r\n"
|
|
|
|
"\r\n"
|
|
|
|
"\r\n"
|
|
|
@ -388,8 +388,8 @@ const struct message requests[] =
|
|
|
|
,.method= HTTP_POST
|
|
|
|
,.method= HTTP_POST
|
|
|
|
,.query_string= ""
|
|
|
|
,.query_string= ""
|
|
|
|
,.fragment= ""
|
|
|
|
,.fragment= ""
|
|
|
|
,.request_path= "/chunked_w_bullshit_after_length"
|
|
|
|
,.request_path= "/chunked_w_nonsense_after_length"
|
|
|
|
,.request_url= "/chunked_w_bullshit_after_length"
|
|
|
|
,.request_url= "/chunked_w_nonsense_after_length"
|
|
|
|
,.num_headers= 1
|
|
|
|
,.num_headers= 1
|
|
|
|
,.headers=
|
|
|
|
,.headers=
|
|
|
|
{ { "Transfer-Encoding", "chunked" }
|
|
|
|
{ { "Transfer-Encoding", "chunked" }
|
|
|
@ -4355,9 +4355,9 @@ main (void)
|
|
|
|
"\r\n",
|
|
|
|
"\r\n",
|
|
|
|
HPE_INVALID_HEADER_TOKEN);
|
|
|
|
HPE_INVALID_HEADER_TOKEN);
|
|
|
|
|
|
|
|
|
|
|
|
const char *dumbfuck2 =
|
|
|
|
const char *dumbluck2 =
|
|
|
|
"GET / HTTP/1.1\r\n"
|
|
|
|
"GET / HTTP/1.1\r\n"
|
|
|
|
"X-SSL-Bullshit: -----BEGIN CERTIFICATE-----\r\n"
|
|
|
|
"X-SSL-Nonsense: -----BEGIN CERTIFICATE-----\r\n"
|
|
|
|
"\tMIIFbTCCBFWgAwIBAgICH4cwDQYJKoZIhvcNAQEFBQAwcDELMAkGA1UEBhMCVUsx\r\n"
|
|
|
|
"\tMIIFbTCCBFWgAwIBAgICH4cwDQYJKoZIhvcNAQEFBQAwcDELMAkGA1UEBhMCVUsx\r\n"
|
|
|
|
"\tETAPBgNVBAoTCGVTY2llbmNlMRIwEAYDVQQLEwlBdXRob3JpdHkxCzAJBgNVBAMT\r\n"
|
|
|
|
"\tETAPBgNVBAoTCGVTY2llbmNlMRIwEAYDVQQLEwlBdXRob3JpdHkxCzAJBgNVBAMT\r\n"
|
|
|
|
"\tAkNBMS0wKwYJKoZIhvcNAQkBFh5jYS1vcGVyYXRvckBncmlkLXN1cHBvcnQuYWMu\r\n"
|
|
|
|
"\tAkNBMS0wKwYJKoZIhvcNAQkBFh5jYS1vcGVyYXRvckBncmlkLXN1cHBvcnQuYWMu\r\n"
|
|
|
@ -4390,7 +4390,7 @@ main (void)
|
|
|
|
"\tRA==\r\n"
|
|
|
|
"\tRA==\r\n"
|
|
|
|
"\t-----END CERTIFICATE-----\r\n"
|
|
|
|
"\t-----END CERTIFICATE-----\r\n"
|
|
|
|
"\r\n";
|
|
|
|
"\r\n";
|
|
|
|
test_simple(dumbfuck2, HPE_OK);
|
|
|
|
test_simple(dumbluck2, HPE_OK);
|
|
|
|
|
|
|
|
|
|
|
|
const char *corrupted_connection =
|
|
|
|
const char *corrupted_connection =
|
|
|
|
"GET / HTTP/1.1\r\n"
|
|
|
|
"GET / HTTP/1.1\r\n"
|
|
|
@ -4457,7 +4457,7 @@ main (void)
|
|
|
|
printf("request scan 3/4 ");
|
|
|
|
printf("request scan 3/4 ");
|
|
|
|
test_scan( &requests[TWO_CHUNKS_MULT_ZERO_END]
|
|
|
|
test_scan( &requests[TWO_CHUNKS_MULT_ZERO_END]
|
|
|
|
, &requests[CHUNKED_W_TRAILING_HEADERS]
|
|
|
|
, &requests[CHUNKED_W_TRAILING_HEADERS]
|
|
|
|
, &requests[CHUNKED_W_BULLSHIT_AFTER_LENGTH]
|
|
|
|
, &requests[CHUNKED_W_NONSENSE_AFTER_LENGTH]
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
printf("request scan 4/4 ");
|
|
|
|
printf("request scan 4/4 ");
|
|
|
|