Skip to content

Commit

Permalink
Update mongoose.c
Browse files Browse the repository at this point in the history
  • Loading branch information
cpq committed May 11, 2024
1 parent b316989 commit 50963df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mongoose.c
Expand Up @@ -2789,7 +2789,7 @@ void mg_http_serve_file(struct mg_connection *c, struct mg_http_message *hm,
struct mg_str *ae = mg_http_get_header(hm, "Accept-Encoding");
if (ae != NULL) {
char *ae_ = mg_mprintf("%.*s", ae->len, ae->buf);
if (strstr(ae_, "gzip") != NULL) {
if (ae_ != NULL && strstr(ae_, "gzip") != NULL) {
mg_snprintf(tmp, sizeof(tmp), "%s.gz", path);
fd = mg_fs_open(fs, tmp, MG_FS_READ);
if (fd != NULL) gzip = true, path = tmp;
Expand Down

0 comments on commit 50963df

Please sign in to comment.