BUG/MINOR: http-ana: Properly handle keep-query redirect option if no QS
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 13 Jun 2025 09:19:50 +0000 (11:19 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 17 Jun 2025 05:56:26 +0000 (07:56 +0200)
commit95e8b55d87bfa300561a59f03fe1cfdb684ee245
treed8def443bf98d6a49590c6697db5cfd67f39e8b4
parentdac40233379db32ba92c8fc0a8265a1fba2ddee7
BUG/MINOR: http-ana: Properly handle keep-query redirect option if no QS

The keep-query redirect option must do nothing is there is no query-string.
However, there is a bug. When there is no QS, an error is returned, leading
to return a 500-internal-error to the client.

To fix the bug, instead of returning 0 when there is no QS, we just skip the
QS processing.

This patch should fix the issue #3005. It must be backported as far as 3.1.

(cherry picked from commit edb8f2bb60d11cc92895e6cf1cb05e5b6cdc51d7)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit c7fc5c4741e70322cb97bb1d913ff6db86ab0ab2)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/http_ana.c