Fixing ethernet and wifi connection to be more robust
This commit is contained in:
@@ -58,7 +58,7 @@ internal esp_err_t static_file_handler(httpd_req_t *req) {
|
||||
struct stat file_stat;
|
||||
if (stat(filepath, &file_stat) == -1) {
|
||||
// Try gzipped first, then fallback to index.html
|
||||
char filepath_gz[FILE_PATH_MAX];
|
||||
char filepath_gz[FILE_PATH_MAX + 16];
|
||||
snprintf(filepath_gz, sizeof(filepath_gz), "%s.gz", filepath);
|
||||
if (stat(filepath_gz, &file_stat) == 0) {
|
||||
strlcpy(filepath, filepath_gz, sizeof(filepath));
|
||||
|
||||
Reference in New Issue
Block a user