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 14CCD19291 for ; Wed, 30 Mar 2016 14:16:29 +0000 (UTC) Received: (qmail 93324 invoked by uid 500); 30 Mar 2016 14:16:29 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 93262 invoked by uid 500); 30 Mar 2016 14:16:28 -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 93253 invoked by uid 99); 30 Mar 2016 14:16:28 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Mar 2016 14:16:28 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id A7B63DFC6C; Wed, 30 Mar 2016 14:16:28 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sergeyb@apache.org To: commits@cxf.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: cxf git commit: [CXF-6853] Reverting HttpUtils change, adding a test Date: Wed, 30 Mar 2016 14:16:28 +0000 (UTC) Repository: cxf Updated Branches: refs/heads/master 30158d39a -> e4de8e215 [CXF-6853] Reverting HttpUtils change, adding a test Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/e4de8e21 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/e4de8e21 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/e4de8e21 Branch: refs/heads/master Commit: e4de8e215d4be63cb54a591eed0e457674fd31d3 Parents: 30158d3 Author: Sergey Beryozkin Authored: Wed Mar 30 15:16:09 2016 +0100 Committer: Sergey Beryozkin Committed: Wed Mar 30 15:16:09 2016 +0100 ---------------------------------------------------------------------- .../main/java/org/apache/cxf/jaxrs/utils/HttpUtils.java | 10 ---------- .../org/apache/cxf/systest/jaxrs/BookApplication2.java | 2 +- .../org/apache/cxf/systest/jaxrs/BookStorePerRequest.java | 6 ++++++ .../systest/jaxrs/JAXRSClientServerNonSpringBookTest.java | 2 +- 4 files changed, 8 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/e4de8e21/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/HttpUtils.java ---------------------------------------------------------------------- diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/HttpUtils.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/HttpUtils.java index 05b3538..e945943 100644 --- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/HttpUtils.java +++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/HttpUtils.java @@ -22,7 +22,6 @@ package org.apache.cxf.jaxrs.utils; import java.io.UnsupportedEncodingException; import java.net.URI; import java.net.URISyntaxException; -import java.net.URLDecoder; import java.nio.charset.StandardCharsets; import java.text.ParseException; import java.text.SimpleDateFormat; @@ -500,15 +499,6 @@ public final class HttpUtils { public static String getPathToMatch(String path, String address, boolean addSlash) { int ind = path.indexOf(address); - try { - String decodeAddr = URLDecoder.decode(address, "UTF-8"); - if (ind == -1 && !address.equals(decodeAddr)) { - address = decodeAddr; - ind = path.indexOf(address); - } - } catch (UnsupportedEncodingException e) { - // - } if (ind == -1 && address.equals(path + "/")) { path += "/"; ind = 0; http://git-wip-us.apache.org/repos/asf/cxf/blob/e4de8e21/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookApplication2.java ---------------------------------------------------------------------- diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookApplication2.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookApplication2.java index c89bed2..b424f7d 100644 --- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookApplication2.java +++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookApplication2.java @@ -22,7 +22,7 @@ import javax.servlet.ServletContext; import javax.ws.rs.ApplicationPath; import javax.ws.rs.core.Context; -@ApplicationPath("/thebooks2") +@ApplicationPath("/the%20books2") public class BookApplication2 extends BookApplication { public BookApplication2(@Context ServletContext sc) { super(sc); http://git-wip-us.apache.org/repos/asf/cxf/blob/e4de8e21/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStorePerRequest.java ---------------------------------------------------------------------- diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStorePerRequest.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStorePerRequest.java index c524b81..1b42dd5 100644 --- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStorePerRequest.java +++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStorePerRequest.java @@ -82,6 +82,12 @@ public class BookStorePerRequest { } @GET + @Path("/book%20headers/") + public Book getBookByHeader2() throws Exception { + return getBookByHeader(); + } + + @GET @Path("/bookheaders/") public Book getBookByHeader() throws Exception { http://git-wip-us.apache.org/repos/asf/cxf/blob/e4de8e21/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerNonSpringBookTest.java ---------------------------------------------------------------------- diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerNonSpringBookTest.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerNonSpringBookTest.java index b8b3ec9..75e966e 100644 --- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerNonSpringBookTest.java +++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerNonSpringBookTest.java @@ -183,7 +183,7 @@ public class JAXRSClientServerNonSpringBookTest extends AbstractBusClientServerT @Test public void testGetBook123TwoApplications() throws Exception { doTestPerRequest("http://localhost:" + PORT + "/application6/thebooks/bookstore2/bookheaders"); - doTestPerRequest("http://localhost:" + PORT + "/application6/thebooks2/bookstore2/bookheaders"); + doTestPerRequest("http://localhost:" + PORT + "/application6/the%20books2/bookstore2/book%20headers"); } private Response doTestPerRequest(String address) throws Exception {