You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Sergey Beryozkin (JIRA)" <ji...@apache.org> on 2013/06/07 12:57:20 UTC

[jira] [Commented] (CXF-5068) Getting a cached base url from UriInfo object

    [ https://issues.apache.org/jira/browse/CXF-5068?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13677950#comment-13677950 ] 

Sergey Beryozkin commented on CXF-5068:
---------------------------------------

What is interesting I've created https://issues.apache.org/jira/browse/CXF-5067 at exactly the same time you did this one :-)
                
> Getting a cached base url from UriInfo object
> ---------------------------------------------
>
>                 Key: CXF-5068
>                 URL: https://issues.apache.org/jira/browse/CXF-5068
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.7.5
>            Reporter: Stephan Klevenz
>
> We are using UriInfo.getBaseUriBuilder() to get the base URI of the request. It looks like that the base uri or at least the host name is cached which shouldn't be.
> Test Case:
> Perform following request sequence:
> 1) http://localhost/endpoint -> base uri returns localhost
> 2) http://127.0.0.1/endpoint -> base uri returns localhost
> Restart server and execute in reverse order then the base uri always returns 127.0.0.1 as host.
> Assumption: host name is cached in the 2nd request.
> This is an issue for servers supporting alias host names.
> Workaround: construct base url from HttpServletRequest.

--
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