From 3c658dcae864daf2d3d7f194281d016cce148830 Mon Sep 17 00:00:00 2001 From: Me No Dev Date: Sat, 23 Jan 2016 19:06:57 +0200 Subject: [PATCH] fix where file will not be served if only gzipped version exists. Thanks @andig --- src/AsyncWebServerHandlerImpl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AsyncWebServerHandlerImpl.h b/src/AsyncWebServerHandlerImpl.h index 6f9133a..c7f63b7 100644 --- a/src/AsyncWebServerHandlerImpl.h +++ b/src/AsyncWebServerHandlerImpl.h @@ -21,7 +21,7 @@ class AsyncStaticWebHandler: public AsyncWebHandler { public: AsyncStaticWebHandler(FS& fs, const char* path, const char* uri, const char* cache_header) : _fs(fs), _uri(uri), _path(path), _cache_header(cache_header){ - _isFile = _fs.exists(path); + _isFile = _fs.exists(path) || _fs.exists(path+".gz"); } bool canHandle(AsyncWebServerRequest *request); void handleRequest(AsyncWebServerRequest *request);