From e80e1862a8458be2904edf849786de1ff987ae7e Mon Sep 17 00:00:00 2001 From: Ben Pirt Date: Wed, 4 Mar 2015 09:12:27 +0000 Subject: [PATCH] Set the content-length header along with the 404 response --- user/httpd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user/httpd.c b/user/httpd.c index 285c6fe..a5d924f 100644 --- a/user/httpd.c +++ b/user/httpd.c @@ -283,7 +283,7 @@ static void ICACHE_FLASH_ATTR httpdSentCb(void *arg) { xmitSendBuff(conn); } -static const char *httpNotFoundHeader="HTTP/1.0 404 Not Found\r\nServer: esp8266-httpd/0.1\r\nContent-Type: text/plain\r\n\r\nNot Found.\r\n"; +static const char *httpNotFoundHeader="HTTP/1.0 404 Not Found\r\nServer: esp8266-httpd/0.1\r\nContent-Type: text/plain\r\nContent-Length: 12\r\n\r\nNot Found.\r\n"; //This is called when the headers have been received and the connection is ready to send //the result headers and data.