mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-08-03 20:40:41 +08:00
Fix files with gz extension not deflated
This commit is contained in:
parent
b1bcfabc83
commit
ce5761344d
@ -22,7 +22,7 @@
|
||||
#define _VERSION_ESP3D_H
|
||||
|
||||
//version and sources location
|
||||
#define FW_VERSION "3.0.0.a46"
|
||||
#define FW_VERSION "3.0.0.a47"
|
||||
#define REPOSITORY "https://github.com/luc-github/ESP3D/tree/3.0"
|
||||
|
||||
#endif //_VERSION_ESP3D_H
|
||||
|
@ -42,6 +42,7 @@ void HTTP_Server:: handle_not_found()
|
||||
#if defined (FILESYSTEM_FEATURE)
|
||||
if(ESP_FileSystem::exists(pathWithGz.c_str()) || ESP_FileSystem::exists(path.c_str())) {
|
||||
if(ESP_FileSystem::exists(pathWithGz.c_str())) {
|
||||
_webserver->sendHeader("Content-Encoding", "gzip");
|
||||
path = pathWithGz;
|
||||
}
|
||||
if(!StreamFSFile(path.c_str(),contentType.c_str())) {
|
||||
@ -58,6 +59,7 @@ void HTTP_Server:: handle_not_found()
|
||||
pathWithGz = path + ".gz";
|
||||
if(ESP_FileSystem::exists(pathWithGz.c_str()) || ESP_FileSystem::exists(path.c_str())) {
|
||||
if(ESP_FileSystem::exists(pathWithGz.c_str())) {
|
||||
_webserver->sendHeader("Content-Encoding", "gzip");
|
||||
path = pathWithGz;
|
||||
}
|
||||
if(!StreamFSFile(path.c_str(),contentType.c_str())) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user