1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-21 10:26:06 +03:00

Improve LittleFS support (#7071)

Previously, when the path was a directory, but didn't have a slash at
the end, a 0 byte response would be sent when using LittleFS. Now, it
will return a 404, like was always the case when using SPIFFS.
This commit is contained in:
JasperHorn 2020-02-23 09:38:40 +01:00 committed by GitHub
parent 16319da63d
commit d990ff9547
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -134,6 +134,11 @@ public:
if (!f) if (!f)
return false; return false;
if (!f.isFile()) {
f.close();
return false;
}
if (_cache_header.length() != 0) if (_cache_header.length() != 0)
server.sendHeader("Cache-Control", _cache_header); server.sendHeader("Cache-Control", _cache_header);