diff --git a/mongoose.c b/mongoose.c index c1f4df31..edd1074c 100644 --- a/mongoose.c +++ b/mongoose.c @@ -2024,6 +2024,7 @@ static int uri_to_path2(struct mg_connection *c, struct mg_http_message *hm, "Content-Length: 0\r\n" "\r\n", (int) hm->uri.len, hm->uri.ptr); + c->is_resp = 0; flags = -1; } else if (flags & MG_FS_DIR) { if (((mg_snprintf(path + n, path_size - n, "/" MG_HTTP_INDEX) > 0 && diff --git a/src/http.c b/src/http.c index f01dbac4..9db712f3 100644 --- a/src/http.c +++ b/src/http.c @@ -684,6 +684,7 @@ static int uri_to_path2(struct mg_connection *c, struct mg_http_message *hm, "Content-Length: 0\r\n" "\r\n", (int) hm->uri.len, hm->uri.ptr); + c->is_resp = 0; flags = -1; } else if (flags & MG_FS_DIR) { if (((mg_snprintf(path + n, path_size - n, "/" MG_HTTP_INDEX) > 0 &&