1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-15 00:02:49 +03:00

Merge remote-tracking branch 'esp8266/master' into www-basic-auth

This commit is contained in:
Me No Dev
2015-11-30 15:00:50 +02:00
18 changed files with 1221 additions and 1148 deletions

View File

@ -405,19 +405,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;