From 91b4104c4f264bb09312486c5d097951a9008615 Mon Sep 17 00:00:00 2001 From: sticilface Date: Thu, 26 Nov 2015 16:02:28 +0000 Subject: [PATCH] Fix handling of / to load index.hm Recent changes broke the handling of / leading to index.htm. Im not sure if changing the requestUri is the best / or valid way to do this. but it works. It will just change it on first call to the handle. If you prefer, I can make a local copy of the requestUri, append the index.htm if required, then use that throughout the rest of the function? --- libraries/ESP8266WebServer/src/detail/RequestHandlersImpl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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