BUG/MINOR: fcgi: Don't set the status to 302 if it is already set
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 17 Feb 2025 15:37:47 +0000 (16:37 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 18 Mar 2025 14:50:54 +0000 (15:50 +0100)
commit479c4b24460b43049ebe04544fb7e37ac7d55bc3
tree27e00c7af383ec474e4c6ab0bc880cfd883daf82
parent5da93f35ea6b55d639d276a78af4432a2ad825bf
BUG/MINOR: fcgi: Don't set the status to 302 if it is already set

When a "Location" header was found in a FCGI response, the status code was
forced to 302. But it should only be performed if no status code was set
first.

So now, we take care to not override an already defined status code when the
"Location" header is found.

This patch should fix the issue #2865. It must backported to all stable
versions.

(cherry picked from commit ca79ed5eefaa65fc82e1a8c1ec4308eaaadaebd1)
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit 870bbce00c8fc1be660499a943f81dd26530a82b)
Signed-off-by: Amaury Denoyelle <adenoyelle@haproxy.com>
src/h1_htx.c