From: Christopher Faulet Date: Thu, 20 Jul 2023 07:50:56 +0000 (+0200) Subject: BUG/MINOR: h1-htx: Return the right reason for 302 FCGI responses X-Git-Tag: v2.9-dev2~41 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=083f917fe28d0c9c6c8e7f635d0edda062928f80;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/h1_htx.c b/src/h1_htx.c index 81977e8ad8..d913fe17bc 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) {