-
Bug
-
Resolution: Done
-
Major
-
7.0.1.GA
-
None
If I configure `proxy-address-forwarding` for my http-listener, reqeust.getServerName and request.getServerPort still return the hostname/port from the Host header in the request. I would expect if `proxy-address-forwarding` is configured that the Apache proxy's hostname/port would be returned.
I noticed that when I make a curl request with an empty Host header (like below) that the X-Forwarded-* headers are picked up by getServerName/getServerPort.
Whereas, if I set Host header to empty it works:
# curl -H "Host:" -H "X-Forwarded-Host:myhost" -H "X-Forwarded-Port: 80" http://localhost:8080/sample_proxynameport/hello.jsp request.getServerName() => myhost request.getServerPort() => 80 request.getScheme() => http
However, not having a Host header is bad HTTP/1.1 and in future Undertow release the "workaround" above will not work (UNDERTOW-786).
- incorporates
-
JBEAP-6130 [GSS](7.1.0) proxy-address-forwarding has not effect when Host header is present
- Closed
- is caused by
-
UNDERTOW-756 Redirect Location header ignores X-Forwarded-Host and X-Forwarded-Port but honours X-Forwarded-Proto
- Resolved
- is cloned by
-
JBEAP-6130 [GSS](7.1.0) proxy-address-forwarding has not effect when Host header is present
- Closed
- is incorporated by
-
JBEAP-4849 [GSS](7.0.z) Upgrade Undertow from 1.3.24.Final to 1.3.25.Final
- Verified