cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1399182 - in /cxf/branches/2.6.x-fixes: ./ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/HttpUtils.java
Date Wed, 17 Oct 2012 11:28:47 GMT
Author: sergeyb
Date: Wed Oct 17 11:28:46 2012
New Revision: 1399182

URL: http://svn.apache.org/viewvc?rev=1399182&view=rev
Log:
Merged revisions 1399181 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1399181 | sergeyb | 2012-10-17 12:24:41 +0100 (Wed, 17 Oct 2012) | 1 line
  
  Trying HTTPServletRequest.getLocalAddr if getServerName returns 0.0.0.0
........

Modified:
    cxf/branches/2.6.x-fixes/   (props changed)
    cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/HttpUtils.java

Propchange: cxf/branches/2.6.x-fixes/
------------------------------------------------------------------------------
  Merged /cxf/trunk:r1399181

Propchange: cxf/branches/2.6.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/HttpUtils.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/HttpUtils.java?rev=1399182&r1=1399181&r2=1399182&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/HttpUtils.java
(original)
+++ cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/HttpUtils.java
Wed Oct 17 11:28:46 2012
@@ -209,6 +209,10 @@ public final class HttpUtils {
         boolean absolute = u.isAbsolute();
         if (request != null && (!absolute || u.toString().contains(ANY_IP_ADDRESS_START)))
{
             String serverAndPort = request.getServerName();
+            if (absolute && ANY_IP_ADDRESS.equals(serverAndPort)) {
+                serverAndPort = request.getLocalAddr();
+            }
+                
             int port = request.getLocalPort();
             if (port != DEFAULT_HTTP_PORT) {
                 serverAndPort += ":" + port;



Mime
View raw message