From: Christopher Faulet Date: Wed, 29 Apr 2026 13:20:50 +0000 (+0200) Subject: BUG/MINOR: http-htx: Don't normalize emtpy path for OPTIONS requests X-Git-Tag: v3.4-dev10~1 X-Git-Url: http://www.kaiwu.me/postgresql/commit/static/gitweb.js?a=commitdiff_plain;h=77a6f1157836952390ede9a9bbc68c5b8e780cfe;p=haproxy.git BUG/MINOR: http-htx: Don't normalize emtpy path for OPTIONS requests When the scheme-based normalization is performed, an empty path is normalized to "/". But as stated in RFC9110#4.2.3, this must not be applied on OPTIONS requests. So let's fix the issue by adding a test on the method. Thanks to @zhanhb for the bug report and the analysis. This patch should fix the issue #3352. It must be backported as far as 3.0. --- diff --git a/src/http_htx.c b/src/http_htx.c index a0f7fc318..c870fa11b 100644 --- a/src/http_htx.c +++ b/src/http_htx.c @@ -1867,7 +1867,7 @@ int http_scheme_based_normalize(struct htx *htx) normalize = 1; } - if (!isttest(path)) { + if (!isttest(path) && sl->info.req.meth != HTTP_METH_OPTIONS) { path = ist("/"); normalize = 1; }