Added comments and todos linked to the web server

This commit is contained in:
Anatole SCHRAMM 2019-04-15 13:50:54 +02:00
parent 92ce0f0d6e
commit bce884ff57

View File

@ -138,7 +138,7 @@ boolean WEBServerManager::parseQuery(WiFiClient *wifiClient)
_httpParserState = ERROR;
break;
case HTTP_RESOURCE_SECTION:
if(_httpRequestData.HRM == POST)
if(_httpRequestData.HRM == POST)// Need to be changed, using Content-Length is more appropriate
activeTimeout = longTimeout;
if(readChar == '?' )
@ -170,7 +170,7 @@ boolean WEBServerManager::parseQuery(WiFiClient *wifiClient)
_httpParserState = HTTP_RESOURCE_SECTION;
}
break;
case HTTP_RESOURCE_PARAM_SECTION:
case HTTP_RESOURCE_PARAM_SECTION: //index.web?var1=1&var2=2...
if(readChar == ' ')
{
_httpRequestData.getParams.add(parseKey,new DictionaryHelper::StringEntity(parseValue));
@ -211,7 +211,7 @@ boolean WEBServerManager::parseQuery(WiFiClient *wifiClient)
case BODY_SECTION:
//parseBuffer = addChar(parseBuffer, readChar);
break;
case PARAMETER_SECTION:
case PARAMETER_SECTION: //Here are all the http header params
if(readChar == '\n')
{
_httpParserState = LINE_BREAK;