cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut-Olav Hoven (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CXF-4109) UriInfo getHost caches first request's host and always returns that on subsequent calls
Date Mon, 13 Apr 2015 09:52:12 GMT

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

Knut-Olav Hoven edited comment on CXF-4109 at 4/13/15 9:51 AM:
---------------------------------------------------------------

I tried to look at the code in Fisheye, but I just can't make sense of the presentation of
the commit on the link you posted...
Looks to me that the commit has no changes... or might be just me not understanding hos Fisheye
works... ;)

We worked around the issue by supplying a init-param *disable-address-updates=true* in web.xml:
{code}
	<servlet>
		<servlet-name>CXFServlet</servlet-name>
		<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
		<init-param>
			<param-name>disable-address-updates</param-name>
			<param-value>true</param-value>
		</init-param>
		<load-on-startup>1</load-on-startup>
	</servlet>
{code}


As a side note... this init-param seems to have a logical flaw... since I in any other situation
would read the name of the init-param as functioning the other way around, that updating of
the address would now be disabled (aka cached), instead of forcing it to be updated.


was (Author: hovenko):
I tried to look at the code in Fisheye, but I just can't make sense of the presentation of
the commit on the link you posted...
Looks to me that the commit has no changes... or might be just me not understanding hos Fisheye
works... ;)

We worked around the issue by supplying a init-param *disable-address-updates=true* in web.xml:
{code}
	<servlet>
		<servlet-name>CXFServlet</servlet-name>
		<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
		<init-param>
			<param-name>disable-address-updates</param-name>
			<param-value>true</param-value>
		</init-param>
		<load-on-startup>1</load-on-startup>
	</servlet>
{code}

> UriInfo getHost caches first request's host and always returns that on subsequent calls
> ---------------------------------------------------------------------------------------
>
>                 Key: CXF-4109
>                 URL: https://issues.apache.org/jira/browse/CXF-4109
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.5.2
>         Environment: Linux CentOS 6
>            Reporter: Dan Hintz
>            Assignee: Sergey Beryozkin
>             Fix For: 2.4.7, 2.5.3, 2.6
>
>
> The call to UriInfo.getHost() is caching the first request's host and always returning
that on all subsequent calls.
> For example, Tomcat starts up and a request is made to the server using a URL of "http://1.2.3.4/apicall",
getHost() returns "1.2.3.4", the next request is made using a URL of "http://mydomainname.com/apicall",
getHost() still returns "1.2.3.4", where "mydomainname.com" is expected.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message