-
Notifications
You must be signed in to change notification settings - Fork 765
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
log-format %HPO variable should log default value (/) when request path is missing #2573
Comments
Thanks for this report! I'm wondering if it's %HPO or if there are other places internally where we're missing the path due to this. For example I'm wondering what %[path] retrieves or what is sent in |
indeed, there is no path. |
What I'm particularly interested in is to be certain that the recent restrictions on 3.0 will not break this. |
I tested on the 3.0-HEAD. So it still works as before: |
OK thanks! At least it's not rejected as invalid :-) |
…zation As stated in RFC3986, for an absolute-form URI, an empty path should be normalized to a path of "/". This is part of scheme based normalization rules. This kind of normalization is already performed for default ports. So we might as well deal with the case of empty path. The associated reg-tests was updated accordingly. This patch should fix the issue #2573. It may be backported as far as 2.4 if necessary.
It should be fixed now. |
…zation As stated in RFC3986, for an absolute-form URI, an empty path should be normalized to a path of "/". This is part of scheme based normalization rules. This kind of normalization is already performed for default ports. So we might as well deal with the case of empty path. The associated reg-tests was updated accordingly. This patch should fix the issue haproxy#2573. It may be backported as far as 2.4 if necessary. (cherry picked from commit 8d2514e) Signed-off-by: Amaury Denoyelle <adenoyelle@haproxy.com>
…zation As stated in RFC3986, for an absolute-form URI, an empty path should be normalized to a path of "/". This is part of scheme based normalization rules. This kind of normalization is already performed for default ports. So we might as well deal with the case of empty path. The associated reg-tests was updated accordingly. This patch should fix the issue haproxy#2573. It may be backported as far as 2.4 if necessary. (cherry picked from commit 8d2514e) Signed-off-by: Amaury Denoyelle <adenoyelle@haproxy.com> (cherry picked from commit eff074a) Signed-off-by: Amaury Denoyelle <adenoyelle@haproxy.com>
…zation As stated in RFC3986, for an absolute-form URI, an empty path should be normalized to a path of "/". This is part of scheme based normalization rules. This kind of normalization is already performed for default ports. So we might as well deal with the case of empty path. The associated reg-tests was updated accordingly. This patch should fix the issue haproxy#2573. It may be backported as far as 2.4 if necessary. (cherry picked from commit 8d2514e) Signed-off-by: Amaury Denoyelle <adenoyelle@haproxy.com> (cherry picked from commit eff074a) Signed-off-by: Amaury Denoyelle <adenoyelle@haproxy.com> (cherry picked from commit 98b157e) Signed-off-by: Amaury Denoyelle <adenoyelle@haproxy.com>
Finally not backported to 2.4. |
thank you so much! |
Detailed Description of the Problem
Using the
%HPO
log-format
variable doesn't log default path (/
) in requests with missing path.While these requests are quite uncommon, it could happen that some requests are formed just by the URL in absolute form, eg.
In this case the
%HPO
is logged just as blank space.Expected Behavior
In case of missing path in a (absolute-form) request, the default behavior should be to interpret it as
/
, as also suggested by https://datatracker.ietf.org/doc/html/rfc3986#section-6.2.3Comparing also this behavior with the
path
fetch:In this case a missing path in the request is logged as
GET - HTTP/1.1
Steps to Reproduce the Behavior
The log line (see configuration below) in this case should be
GET / HTTP/1.1
while it's actuallyGET HTTP/1.1
Do you have any idea what may have caused this?
No response
Do you have an idea how to solve the issue?
No response
What is your configuration?
Output of
haproxy -vv
Last Outputs and Backtraces
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: