Merge pull request #2278 from cesanta/httpheaders

fix header truncation
This commit is contained in:
Sergey Lyubka authored and GitHub committed 2023-06-29 22:59:51 +01:00
commit 415bbf2932
3 files changed
+22 -12

No files matched your search

+4
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);