1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-13 13:01:55 +03:00

Merge branch 'master' into www-basic-auth

This commit is contained in:
Me No Dev
2015-11-30 10:50:53 +02:00
17 changed files with 1202 additions and 1143 deletions

View File

@ -397,19 +397,28 @@ void ESP8266WebServer::onNotFound(THandlerFunction fn) {
}
void ESP8266WebServer::_handleRequest() {
bool handled = false;
if (!_currentHandler){
#ifdef DEBUG
DEBUG_OUTPUT.println("request handler not found");
#endif
}
else {
handled = _currentHandler->handle(*this, _currentMethod, _currentUri);
#ifdef DEBUG
if (!handled) {
DEBUG_OUTPUT.println("request handler failed to handle request");
}
#endif
}
if (!handled) {
if(_notFoundHandler) {
_notFoundHandler();
}
else {
send(404, "text/plain", String("Not found: ") + _currentUri);
}
} else {
_currentHandler->handle(*this, _currentMethod, _currentUri);
}
uint16_t maxWait = HTTP_MAX_CLOSE_WAIT;