[ 
https://issues.apache.org/jira/browse/CXF-4631?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Beryozkin resolved CXF-4631.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 2.7.1
                   2.6.4
                   2.5.7
         Assignee: Sergey Beryozkin
    
> HttpUtils.toAbsoluteUri should use request.getServerPort() instead of 
> request.getLocalPort()
> --------------------------------------------------------------------------------------------
>
>                 Key: CXF-4631
>                 URL: https://issues.apache.org/jira/browse/CXF-4631
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.7.0
>            Reporter: Jakub Bocheński
>            Assignee: Sergey Beryozkin
>            Priority: Minor
>             Fix For: 2.5.7, 2.6.4, 2.7.1
>
>
> I believe the toAbsoluteUri() helper method should use the getServerPort() 
> method of HttpServletRequest.
> The host name is already taken from the Host header, so it's inconsistent to 
> return the port number of the interface on which the request was received, 
> instead of the port value contained in the Host header.
> Anyhow I'd presume that the client would expect to receive an URL based on 
> the address it used.
> I run into this when I put an SSH tunnel to a server where the CXF-based 
> application was running:
> {{ssh -L 5555:localhost:80 myappserver}}
> Although I send requests to:
>  {{http://myapp:5555/path}}
> the returned URLs are like:
>  {{http://myapp/path2}}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to