diff --git a/libraries/ESP8266WebServer/src/detail/RequestHandlersImpl.h b/libraries/ESP8266WebServer/src/detail/RequestHandlersImpl.h index ae94b259f9..1d134133f9 100644 --- a/libraries/ESP8266WebServer/src/detail/RequestHandlersImpl.h +++ b/libraries/ESP8266WebServer/src/detail/RequestHandlersImpl.h @@ -81,7 +81,7 @@ class StaticRequestHandler : public RequestHandler { String path(_path); - if(path.endsWith("/")) path += "index.htm"; + if(requestUri.endsWith("/")) requestUri += "index.htm"; if (!_isFile) { // Base URI doesn't point to a file. Append whatever follows this