cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1492687 - in /cxf/trunk: rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletController.java systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSUriInfoTest.java
Date Thu, 13 Jun 2013 14:34:07 GMT
Author: sergeyb
Date: Thu Jun 13 14:34:07 2013
New Revision: 1492687

URL: http://svn.apache.org/r1492687
Log:
[CXF-5067,CXF-5068] Always setting the current endpoint URI as HTTP attribute too

Modified:
    cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletController.java
    cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSUriInfoTest.java

Modified: cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletController.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletController.java?rev=1492687&r1=1492686&r2=1492687&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletController.java
(original)
+++ cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletController.java
Thu Jun 13 14:34:07 2013
@@ -93,11 +93,11 @@ public class ServletController {
             // Using HTTP_PREFIX check is safe for ServletController
             // URI.create(ad).isRelative() can be used - a bit more expensive though
             if (ad != null && !ad.startsWith(HTTP_PREFIX)) {
-                if (disableAddressUpdates) {
-                    request.setAttribute("org.apache.cxf.transport.endpoint.address", 
-                                         base + ad);
-                } else {
-                    BaseUrlHelper.setAddress(d, base + ad);
+                String endpointAddress = base + ad;
+                request.setAttribute("org.apache.cxf.transport.endpoint.address", 
+                                     endpointAddress);
+                if (!disableAddressUpdates) {
+                    BaseUrlHelper.setAddress(d, endpointAddress);
                 }
             }
         }

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSUriInfoTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSUriInfoTest.java?rev=1492687&r1=1492686&r2=1492687&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSUriInfoTest.java
(original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSUriInfoTest.java
Thu Jun 13 14:34:07 2013
@@ -61,6 +61,7 @@ public class JAXRSUriInfoTest extends Ab
      */
     @Test
     public void testBasePathAndPathAndPathParam() throws Exception {
+        checkUriInfo("http://127.0.0.1:" + PORT + "/app/v1", "\"\"", "/");
         checkUriInfo("http://localhost:" + PORT + "/app/v1", "\"\"", "/");
         checkUriInfo("http://localhost:" + PORT + "/app/v1/", "\"\"", "/");
         checkUriInfo("http://localhost:" + PORT + "/app/v1/test", "\"test\"", "test");



Mime
View raw message