cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asold...@apache.org
Subject svn commit: r1174836 - in /cxf/branches/2.4.x-fixes: ./ rt/frontend/jaxws/src/main/jaxws22/org/apache/cxf/transport/http_jaxws_spi/HttpServletRequestAdapter.java
Date Fri, 23 Sep 2011 15:33:01 GMT
Author: asoldano
Date: Fri Sep 23 15:33:01 2011
New Revision: 1174836

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

........
  r1174824 | asoldano | 2011-09-23 17:05:12 +0200 (Fri, 23 Sep 2011) | 2 lines
  
  [CXF-3787] Applying patch from Magesh Kumar Bojan to the http_jaxws_spi HttpServletRequestAdapter
........

Modified:
    cxf/branches/2.4.x-fixes/   (props changed)
    cxf/branches/2.4.x-fixes/rt/frontend/jaxws/src/main/jaxws22/org/apache/cxf/transport/http_jaxws_spi/HttpServletRequestAdapter.java

Propchange: cxf/branches/2.4.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Sep 23 15:33:01 2011
@@ -1 +1 @@
-/cxf/trunk:1173863-1173871,1174109,1174210,1174404,1174502
+/cxf/trunk:1173863-1173871,1174109,1174210,1174404,1174502,1174824

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

Modified: cxf/branches/2.4.x-fixes/rt/frontend/jaxws/src/main/jaxws22/org/apache/cxf/transport/http_jaxws_spi/HttpServletRequestAdapter.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/frontend/jaxws/src/main/jaxws22/org/apache/cxf/transport/http_jaxws_spi/HttpServletRequestAdapter.java?rev=1174836&r1=1174835&r2=1174836&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/frontend/jaxws/src/main/jaxws22/org/apache/cxf/transport/http_jaxws_spi/HttpServletRequestAdapter.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/frontend/jaxws/src/main/jaxws22/org/apache/cxf/transport/http_jaxws_spi/HttpServletRequestAdapter.java
Fri Sep 23 15:33:01 2011
@@ -333,15 +333,20 @@ class HttpServletRequestAdapter implemen
         StringBuffer sb = new StringBuffer();
         sb.append(exchange.getScheme());
         sb.append("://");
-        InetSocketAddress la = exchange.getLocalAddress();
-        if (la != null) {
-            sb.append(la.getHostName());
-            if (la.getPort() > 0) {
-                sb.append(":");
-                sb.append(la.getPort());
-            }
+        String host = this.getHeader("Host");
+        if (host != null) {
+            sb.append(host);
         } else {
-            sb.append("localhost");
+            InetSocketAddress la = exchange.getLocalAddress();
+            if (la != null) {
+                sb.append(la.getHostName());
+                if (la.getPort() > 0) {
+                    sb.append(":");
+                    sb.append(la.getPort());
+                }
+            } else {
+                sb.append("localhost");
+            }
         }
         sb.append(exchange.getContextPath());
         sb.append(context.getPath());



Mime
View raw message