diff --git a/libraries/ESP8266WebServer/src/detail/RequestHandlersImpl.h b/libraries/ESP8266WebServer/src/detail/RequestHandlersImpl.h index 1c930aed76..e9b8689c04 100644 --- a/libraries/ESP8266WebServer/src/detail/RequestHandlersImpl.h +++ b/libraries/ESP8266WebServer/src/detail/RequestHandlersImpl.h @@ -101,6 +101,10 @@ class StaticRequestHandler : public RequestHandler<ServerType> { // Append whatever follows this URI in request to get the file path. path += requestUri.substring(_baseUriLength); + + if (!_fs.exists(path) && path.endsWith(".htm")) { + path += "l"; + } } DEBUGV("StaticRequestHandler::handle: path=%s, isFile=%d\r\n", path.c_str(), _isFile);