Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 10409C3FD for ; Tue, 18 Jun 2013 11:10:57 +0000 (UTC) Received: (qmail 42979 invoked by uid 500); 18 Jun 2013 10:10:55 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 42865 invoked by uid 500); 18 Jun 2013 10:10:55 -0000 Mailing-List: contact commits-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 commits@cxf.apache.org Received: (qmail 42856 invoked by uid 99); 18 Jun 2013 10:10:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Jun 2013 10:10:54 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Jun 2013 10:10:53 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 1E5FB2388906; Tue, 18 Jun 2013 10:10:34 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@cxf.apache.org From: sergeyb@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130618101034.1E5FB2388906@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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();