-
Bug
-
Resolution: Done
-
Major
-
2.0.0.Beta1
-
None
HttpServletRequest.getLocalPort() method does not reflect case when Forwarded ~ by header is defined in request.
Header value in request:
Forwarded=for=192.121.210.60:455;proto=https;by=203.0.113.43:777
What particular methods return in case of handler usage:
HttpServerExchange.getSourceAddress() = /192.121.210.60:455
HttpServerExchange.getRequestScheme() = https
HttpServerExchange.getDestinationAddress() = /203.0.113.43:777Those are correct.
Servlet case:
HttpServletRequest.getRemoteAddr() = 192.121.210.60
HttpServletRequest.getRemoteHost() = 192.121.210.60
HttpServletRequest.getRemotePort() = 455
HttpServletRequest.getScheme() = https
HttpServletRequest.getLocalName() = 203.0.113.43
HttpServletRequest.getLocalAddr() = 127.0.0.1 <--- this is fixed byUNDERTOW-1280
HttpServletRequest.getLocalPort() = 8080
Returned value of getLocalPort() does not reflect Forwarded ~ by header value. Correct value in this case should be 777.
- relates to
-
UNDERTOW-1280 HttpServletRequest.getLocalAddr and HttpServletRequest.getLocalName may return different results
- Resolved