|
|
@ -1232,7 +1232,7 @@ test_no_overflow_long_body (int req, size_t length)
|
|
|
|
size_t parsed;
|
|
|
|
size_t parsed;
|
|
|
|
size_t i;
|
|
|
|
size_t i;
|
|
|
|
char buf1[3000];
|
|
|
|
char buf1[3000];
|
|
|
|
size_t buf1len = sprintf(buf1, "%s\r\nConnection: Keep-Alive\r\nContent-Length: %ld\r\n\r\n",
|
|
|
|
size_t buf1len = sprintf(buf1, "%s\r\nConnection: Keep-Alive\r\nContent-Length: %zu\r\n\r\n",
|
|
|
|
req ? "POST / HTTP/1.0" : "HTTP/1.0 200 OK", length);
|
|
|
|
req ? "POST / HTTP/1.0" : "HTTP/1.0 200 OK", length);
|
|
|
|
parsed = http_parser_execute(&parser, &settings_null, buf1, buf1len);
|
|
|
|
parsed = http_parser_execute(&parser, &settings_null, buf1, buf1len);
|
|
|
|
if (parsed != buf1len)
|
|
|
|
if (parsed != buf1len)
|
|
|
@ -1251,7 +1251,7 @@ test_no_overflow_long_body (int req, size_t length)
|
|
|
|
|
|
|
|
|
|
|
|
err:
|
|
|
|
err:
|
|
|
|
fprintf(stderr,
|
|
|
|
fprintf(stderr,
|
|
|
|
"\n*** error in test_no_overflow_long_body %s of length %ld ***\n",
|
|
|
|
"\n*** error in test_no_overflow_long_body %s of length %zu ***\n",
|
|
|
|
req ? "REQUEST" : "RESPONSE",
|
|
|
|
req ? "REQUEST" : "RESPONSE",
|
|
|
|
length);
|
|
|
|
length);
|
|
|
|
exit(1);
|
|
|
|
exit(1);
|
|
|
|