JSON hook, keep connection alive

pull/183/head
Karai Csaba 9 years ago committed by cskarai
parent d7ab9ee7bc
commit c14c214f49
  1. 9
      web-server/web-server.c

@ -88,6 +88,10 @@ int ICACHE_FLASH_ATTR cgiJsonHook(HttpdConnData *connData)
{ {
if (connData->conn==NULL) return HTTPD_CGI_DONE; // Connection aborted. Clean up. if (connData->conn==NULL) return HTTPD_CGI_DONE; // Connection aborted. Clean up.
void * cgiData = connData->cgiData;
if( cgiData == NULL )
{
if( !flashConfig.slip_enable ) if( !flashConfig.slip_enable )
{ {
errorResponse(connData, 400, "Slip processing is disabled!"); errorResponse(connData, 400, "Slip processing is disabled!");
@ -170,6 +174,9 @@ int ICACHE_FLASH_ATTR cgiJsonHook(HttpdConnData *connData)
return HTTPD_CGI_DONE; return HTTPD_CGI_DONE;
} }
connData->cgiData = (void *)1;
}
// TODO // TODO
return HTTPD_CGI_DONE; return HTTPD_CGI_MORE;
} }

Loading…
Cancel
Save