1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00

Only add "l" to XX.htm URLs if XX.html exists (#6794)

Fixes #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.
This commit is contained in:
Earle F. Philhower, III 2019-11-18 22:43:47 -07:00 committed by Develo
parent 344c4492af
commit 6768116b8c

View File

@ -102,7 +102,7 @@ public:
// Append whatever follows this URI in request to get the file path. // Append whatever follows this URI in request to get the file path.
path += requestUri.substring(_baseUriLength); path += requestUri.substring(_baseUriLength);
if (!_fs.exists(path) && path.endsWith(".htm")) { if (!_fs.exists(path) && path.endsWith(".htm") && _fs.exists(path + "l")) {
path += "l"; path += "l";
} }
} }