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)
committerWilly Tarreau <w@1wt.eu>
Wed, 19 Feb 2025 09:35:04 +0000 (10:35 +0100)
commit870bbce00c8fc1be660499a943f81dd26530a82b
tree56235a72217cf35a2c2d713ddf3e957968288e31
parent6633abae2a17f969754504f2aca37bbfa12f3ca4
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>
src/h1_htx.c