Added debug infos
This commit is contained in:
parent
bce884ff57
commit
7e20eb48bb
@ -1,7 +1,7 @@
|
||||
#include "WEBServerManager.h"
|
||||
|
||||
#define DEBUG
|
||||
#define DEBUG_RAW
|
||||
//#define DEBUG_RAW
|
||||
|
||||
WEBServerManager::WEBServerManager(unsigned int port, SDCardManager *sdCardManager) : _wifiServer(port), _sdCardManager(sdCardManager), _httpRequestData({UNDEFINED, UNKNOWN, UNKNOWN_MIME, Dictionary<DictionaryHelper::StringEntity>(), Dictionary<DictionaryHelper::StringEntity>(), NULL,NULL}), _httpParserState(INIT), _clientState(WAITING_FOR_CLIENT), _port(port), _clientTimeout(0)
|
||||
{
|
||||
@ -119,7 +119,12 @@ boolean WEBServerManager::parseQuery(WiFiClient *wifiClient)
|
||||
if(readChar == '\n')
|
||||
_httpParserState = BODY_SECTION;
|
||||
else if(readChar != '\r')
|
||||
{
|
||||
#ifdef DEBUG
|
||||
Serial.print(readChar);
|
||||
#endif
|
||||
_httpParserState = PARAMETER_SECTION;
|
||||
}
|
||||
break;
|
||||
case HTTP_VERB_SECTION:
|
||||
if(readChar >= 65 && readChar <= 90)
|
||||
@ -210,8 +215,14 @@ boolean WEBServerManager::parseQuery(WiFiClient *wifiClient)
|
||||
break;
|
||||
case BODY_SECTION:
|
||||
//parseBuffer = addChar(parseBuffer, readChar);
|
||||
#ifdef DEBUG
|
||||
Serial.print(readChar);
|
||||
#endif
|
||||
break;
|
||||
case PARAMETER_SECTION: //Here are all the http header params
|
||||
#ifdef DEBUG
|
||||
Serial.print(readChar);
|
||||
#endif
|
||||
if(readChar == '\n')
|
||||
{
|
||||
_httpParserState = LINE_BREAK;
|
||||
|
Loading…
Reference in New Issue
Block a user