From af25f55089817a235c6f94a24d771bb9fe208024 Mon Sep 17 00:00:00 2001 From: anschrammh Date: Sat, 28 Dec 2019 14:09:51 +0100 Subject: [PATCH] Updated getHTTPHeader function (increased mime type size) --- src/app/WEBServer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/WEBServer.h b/src/app/WEBServer.h index b0bae50..bbe4795 100644 --- a/src/app/WEBServer.h +++ b/src/app/WEBServer.h @@ -668,7 +668,7 @@ class WEBServer : public TCPServer, public HttpConstants static char *getHTTPHeader(HttpMIMEType httpMIMEType, size_t size) { - char *header = (char *) malloc(sizeof(char) /*strlen("HTTP/1.1 200 OK\r\nContent-Type: \r\nContent-Length: \r\nCache-Control: max-age=31536000\r\n\r\n")*/* (86 + 74/*Longest MIME-TYPE*/ + 10 /*Max unsigned long footprint*/ + 1)); + char *header = (char *) malloc(sizeof(char) /*strlen("HTTP/1.1 200 OK\r\nContent-Type: \r\nContent-Length: \r\nCache-Control: max-age=31536000\r\n\r\n")*/* (86 + 255/*Longest MIME-TYPE that RFC allows*/ + 10 /*Max unsigned long footprint*/ + 1)); switch(httpMIMEType) {