add unit test

This commit is contained in:
Sergio R. Caprile 2023-06-28 11:01:59 -03:00
parent eda1e8a402
commit 0adc858c85

View File

@ -899,6 +899,10 @@ static void test_http_server(void) {
ASSERT(fetch(&mgr, buf, url,
"POST /a.txt HTTP/1.0\n"
"Content-Length: 19000000000000000000\n\n") == 0);
ASSERT(fetch(&mgr, buf, url,
"GET /a.txt HTTP/1.0\n"
":\n" // truncated header
"Content-Length: 1\n\n") == 0);
{
extern char *mg_http_etag(char *, size_t, size_t, time_t);