Updated getHTTPHeader function (increased mime type size)

This commit is contained in:
anschrammh 2019-12-28 14:09:51 +01:00
parent d0349ea26e
commit af25f55089

View File

@ -668,7 +668,7 @@ class WEBServer : public TCPServer<T>, 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)
{