mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-05-04 20:46:11 +02:00
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.
This commit is contained in:
parent
57faf09715
commit
77a6f11578
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user