cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1494093 - in /cxf/branches/2.7.x-fixes: ./ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/UriBuilderImplTest.java
Date Tue, 18 Jun 2013 10:10:33 GMT
Author: sergeyb
Date: Tue Jun 18 10:10:33 2013
New Revision: 1494093

URL: http://svn.apache.org/r1494093
Log:
Merged revisions 1494092 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1494092 | sergeyb | 2013-06-18 11:07:50 +0100 (Tue, 18 Jun 2013) | 1 line
  
  [CXF-5084] Updating UriBuilderImpl to better detect HTTP scheme, applying a patch on behalf
of David Blevins
........

Modified:
    cxf/branches/2.7.x-fixes/   (props changed)
    cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java
    cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/UriBuilderImplTest.java

Propchange: cxf/branches/2.7.x-fixes/
------------------------------------------------------------------------------
  Merged /cxf/trunk:r1494092

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

Modified: cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java?rev=1494093&r1=1494092&r2=1494093&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java
Tue Jun 18 10:10:33 2013
@@ -718,7 +718,7 @@ public class UriBuilderImpl extends UriB
         // be supported though the use of non-http schemes for *building* new URIs
         // is pretty limited in the context of working with JAX-RS services
          
-        return path.startsWith("http");
+        return path.startsWith("http:") || path.startsWith("https:");
     }
     
     @Override

Modified: cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/UriBuilderImplTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/UriBuilderImplTest.java?rev=1494093&r1=1494092&r2=1494093&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/UriBuilderImplTest.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/UriBuilderImplTest.java
Tue Jun 18 10:10:33 2013
@@ -410,6 +410,13 @@ public class UriBuilderImplTest extends 
     }
     
     @Test
+    public void testReplacePathHttpString() throws Exception {
+        URI uri = new URI("http://foo/bar/baz;m1=m1value");
+        URI newUri = new UriBuilderImpl(uri).replacePath("httppnewpath").build();
+        assertEquals("URI is not built correctly", "http://foo/httppnewpath", newUri.toString());
+    }
+    
+    @Test
     public void testReplaceNullPath() throws Exception {
         URI uri = new URI("http://foo/bar/baz;m1=m1value");
         URI newUri = new UriBuilderImpl(uri).replacePath(null).build();



Mime
View raw message