From 41ea8de0d6dc1e2d92b358e5d7fb17d71db1b784 Mon Sep 17 00:00:00 2001 From: cpq Date: Sun, 20 Nov 2022 12:18:15 +0000 Subject: [PATCH] Mark request close for HTTP redirects --- mongoose.c | 1 + src/http.c | 1 + 2 files changed, 2 insertions(+) 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 &&