Skip to content

Commit 6768116

Browse files
earlephilhowerdevyte
authored andcommitted
Only add "l" to XX.htm URLs if XX.html exists (esp8266#6794)
Fixes esp8266#6792 Only append the "l" to ".htm" when there actually is a ".html" file present. If not, fall-thru like before and try .gz through the normal paths.
1 parent 344c449 commit 6768116

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/ESP8266WebServer/src/detail/RequestHandlersImpl.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class StaticRequestHandler : public RequestHandler<ServerType> {
102102
// Append whatever follows this URI in request to get the file path.
103103
path += requestUri.substring(_baseUriLength);
104104

105-
if (!_fs.exists(path) && path.endsWith(".htm")) {
105+
if (!_fs.exists(path) && path.endsWith(".htm") && _fs.exists(path + "l")) {
106106
path += "l";
107107
}
108108
}

0 commit comments

Comments
 (0)