From: Aleksandar Lazic Date: Thu, 3 Dec 2026 20:34:41 +0000 (+0100) Subject: BUG/MINOR: haterm: parse the arguments from the first '?' of the URI X-Git-Url: https://git.kaiwu.me/web/http/static/control.html?a=commitdiff_plain;h=e2fd957dce9e9f86bad5e8c9282ebde4b4bd6709;p=haproxy.git BUG/MINOR: haterm: parse the arguments from the first '?' of the URI The URI parser looked for the last '?' of the URI instead of the first one, so only the arguments after the last '?' were used. The example of the documentation and of the help page, "/?r=500?s=0?c=0?t=1000", thus only applied "t=1000" and returned a 200. httpterm used the first '?', and the arguments loop already accepts '?' as a delimiter between arguments, like '&', ',', ';' and '/'. Let's stop at the first '?'. This was introduced with haterm by commit c9d47804d ("MINOR: haterm: add haterm HTTP server"), so it should be backported to 3.4. Co-Authored-By: Claude Opus 5.5 Signed-off-by: Aleksandar Lazic --- diff --git a/src/haterm.c b/src/haterm.c index 9b78967ad..361e934cb 100644 --- a/src/haterm.c +++ b/src/haterm.c @@ -823,10 +823,15 @@ static void hstream_parse_uri(struct ist uri, struct hstream *hs) /* we'll check for the following URIs : * /?{s=|r=|t=