JSON hook, keep connection alive

pull/193/head
Karai Csaba 9 years ago committed by Thorsten von Eicken
parent 979510681b
commit 89a9ff0d24
  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.
void * cgiData = connData->cgiData;
if( cgiData == NULL )
{
if( !flashConfig.slip_enable )
{
errorResponse(connData, 400, "Slip processing is disabled!");
@ -170,6 +174,9 @@ int ICACHE_FLASH_ATTR cgiJsonHook(HttpdConnData *connData)
return HTTPD_CGI_DONE;
}
connData->cgiData = (void *)1;
}
// TODO
return HTTPD_CGI_DONE;
return HTTPD_CGI_MORE;
}

Loading…
Cancel
Save