Return-Path: X-Original-To: apmail-cxf-issues-archive@www.apache.org Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F1B3810E26 for ; Thu, 13 Jun 2013 13:07:22 +0000 (UTC) Received: (qmail 46980 invoked by uid 500); 13 Jun 2013 13:07:22 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 46877 invoked by uid 500); 13 Jun 2013 13:07:22 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 46830 invoked by uid 99); 13 Jun 2013 13:07:21 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Jun 2013 13:07:21 +0000 Date: Thu, 13 Jun 2013 13:07:21 +0000 (UTC) From: "Sergey Beryozkin (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CXF-5068) Getting a cached base url from UriInfo object MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CXF-5068?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13682214#comment-13682214 ] Sergey Beryozkin commented on CXF-5068: --------------------------------------- I think I know the reason for this issue. Try adding this servlet parameter {code:xml} disable-address-updates true {code} This can also be set as "org.apache.cxf.servlet.disable-address-updates" property. FYI, I'm also updating HTTP transport a bit so that the runtime will always get the correct current address irrespectively of whether this property is enabled or not. > 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 > Assignee: Sergey Beryozkin > > 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