You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2023/08/31 09:12:05 UTC
[Bug 67086] New: Port address is removed in HTTP2 authority header when proxy out the HTTP2 request
https://bz.apache.org/bugzilla/show_bug.cgi?id=67086
Bug ID: 67086
Summary: Port address is removed in HTTP2 authority header when
proxy out the HTTP2 request
Product: Apache httpd-2
Version: 2.4.57
Hardware: Other
OS: Linux
Status: NEW
Severity: major
Priority: P2
Component: mod_proxy_http2
Assignee: bugs@httpd.apache.org
Reporter: paulrbk@gmail.com
Target Milestone: ---
Environment is a Reserve HTTP2 proxy, incoming request is in HTTP2, and
outgoing request of HTTP2
incoming authority header: 10.10.10.10.:8080
It found that the outgoing authority header sometimes with port and sometimes
being removed.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 67086] Port address is removed in HTTP2 authority header when proxy out the HTTP2 request
Posted by "bugzilla.apache.org via bugs" <bu...@httpd.apache.org>.
https://bz.apache.org/bugzilla/show_bug.cgi?id=67086
--- Comment #5 from abernal <ab...@apache.org> ---
Reproduced on trunk with ProxyPreserveHost on and an h2c backend that closes
the first connection after the request HEADERS arrive. mod_proxy_http2 retries
the request on a new connection, and the retry sends ":authority:
www.example.org" instead of "www.example.org:8080". X-Forwarded-Host loses the
port the same way. This matches packets #27 and #63 in the attached trace.
The cause is that the first attempt removes Host from the request headers, so
the retry falls back to the hostname without the port.
Fix with tests: https://github.com/apache/httpd/pull/1056
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 67086] Port address is removed in HTTP2 authority header when proxy out the HTTP2 request
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=67086
--- Comment #1 from RBK <pa...@gmail.com> ---
packet trace is provided.
client: 10.165.164.139
Apache Reverse proxy: 10.165.164.142
server: 10.165.164.145
(packet #10)
incoming :authority header: 10.165.164.142:8080
(packet #27)
outgoing :authority header: 10.165.164.142 <- no port info
(packet #56)
incoming :authority header: 10.165.164.142:8080
(packet #63)
outgoing :authority header: 10.165.164.142:8080 <- port info maintain
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 67086] Port address is removed in HTTP2 authority header when proxy out the HTTP2 request
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=67086
Bjoern Voigt <bj...@arcor.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bjoernv@arcor.de
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 67086] Port address is removed in HTTP2 authority header when proxy out the HTTP2 request
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=67086
--- Comment #4 from kalbaco <wa...@gmail.com> ---
The debug statement indicates that there is an issue where the port address is
being removed from the HTTP2 authority header when proxying out the HTTP2
request. In HTTP2, the authority header is used to specify the target server's
authority (usually in the form of host:port). However, in this case, the port
address is being omitted from the header, which can lead to connection errors
or misrouting of the request.
To fix this issue, you need to ensure that the port address is correctly
included in the authority header when proxying out the HTTP2 request. Check the
configuration settings of your proxy server or the code responsible for
handling the HTTP2 requests to make sure that it properly includes the port
information in the authority header. This ensures that the request is directed
to the correct server and port, resolving the problem you are encountering.
https://www.kalbaco.com/
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 67086] Port address is removed in HTTP2 authority header when proxy out the HTTP2 request
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=67086
--- Comment #2 from RBK <pa...@gmail.com> ---
Created attachment 38939
--> https://bz.apache.org/bugzilla/attachment.cgi?id=38939&action=edit
reference packet trace
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 67086] Port address is removed in HTTP2 authority header when proxy out the HTTP2 request
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=67086
Stefan Eissing <st...@eissing.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--- Comment #3 from Stefan Eissing <st...@eissing.org> ---
Do you have `ProxyPreserveHost on` configured? I assume not.
If you set `LogLevel proxy_http2:trace2` we can observer what authority is
constructed from what input. The error.log then contains lines
authority=%s from uri.hostname=%s and uri.port=%d
The only way I could see the code not adding the port is when ipv6 addresses
are involved. Is that used in your setup?
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org