From 083f917fe28d0c9c6c8e7f635d0edda062928f80 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Thu, 20 Jul 2023 09:50:56 +0200 Subject: [PATCH] BUG/MINOR: h1-htx: Return the right reason for 302 FCGI responses A FCGI response may contain a "Location" header with no status code. In this case a 302-Found HTTP response must be returned to the client. However, while the status code is indeed 302, the reason is wrong. "Found" must be set instead of "Moved Temporarily". This patch must be backported as far as 2.2. With the commit e3e4e0006 ("BUG/MINOR: http: Return the right reason for 302"), this should fix the issue #2208. --- src/h1_htx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/h1_htx.c b/src/h1_htx.c index 81977e8ad..d913fe17b 100644 --- a/src/h1_htx.c +++ b/src/h1_htx.c @@ -259,7 +259,7 @@ static int h1_postparse_res_hdrs(struct h1m *h1m, union h1_sl *h1sl, struct htx else if (isteqi(hdrs[hdr].n, ist("location"))) { code = 302; status = ist("302"); - reason = ist("Moved Temporarily"); + reason = ist("Found"); } } if (!code) {