From 5fb984e13b859cd30c77f96c2ad668540d525dd5 Mon Sep 17 00:00:00 2001 From: Jeroen Domburg Date: Fri, 3 Apr 2015 11:30:48 +0200 Subject: [PATCH] Added warning for abuse of CGI return code --- user/httpd.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/user/httpd.c b/user/httpd.c index d856b89..2039945 100644 --- a/user/httpd.c +++ b/user/httpd.c @@ -279,6 +279,10 @@ static void ICACHE_FLASH_ATTR httpdSentCb(void *arg) { if (r==HTTPD_CGI_DONE) { conn->cgi=NULL; //mark for destruction. } + if (r==HTTPD_CGI_NOTFOUND || HTTPD_CGI_AUTHENTICATED) { + os_printf("ERROR! CGI fn returns code %d after sending data! Bad CGI!\n", r); + conn->cgi=NULL; //mark for destruction. + } xmitSendBuff(conn); }