MINOR: http-ana: Add option to keep query-string on a localtion-based redirect
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 15 Nov 2024 16:03:06 +0000 (17:03 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 19 Nov 2024 14:20:02 +0000 (15:20 +0100)
commitb2877db47c6a4c8637ac3ccefd4d16c3a38d1985
tree8626c73634ab896e4200bf62285c21c3fe325eb6
parent7848692c4cb666875477f718e7b89aee69cfba80
MINOR: http-ana: Add option to keep query-string on a localtion-based redirect

On prefix-based redirect, there is an option to drop the query-string of the
location. Here it is the opposite. an option is added to preserve the
query-string of the original URI for a localtion-based redirect.

By setting "keep-query" option, for a location-based redirect only, the
query-string of the original URI is appended to the location. If there is no
query-string, nothing is added (no empty '?'). If there is already a
non-empty query-string on the localtion, the original one is appended with
'&' separator.

This patch should fix issue #2728.
doc/configuration.txt
include/haproxy/http_ana-t.h
src/http_ana.c
src/http_rules.c