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