You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2017/03/31 16:01:32 UTC

cxf git commit: [CXF-7304] Step1 - using UTF-8 for the decoded destinations given that HttpServletRequest.getPathInfo() uses it by default too and the earlier encooding was used to support a case where an endpoint address has percent-encoded reserved cha

Repository: cxf
Updated Branches:
  refs/heads/master 3c4396f4a -> b174e1d49


[CXF-7304] Step1 - using UTF-8 for the decoded destinations given that HttpServletRequest.getPathInfo() uses it by default too and the earlier encooding was used to support a case where an endpoint address has percent-encoded reserved chars which work fine with UTF-8 too


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/b174e1d4
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/b174e1d4
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/b174e1d4

Branch: refs/heads/master
Commit: b174e1d4976ef822be1c47d2e7c61b4b12ce9028
Parents: 3c4396f
Author: Sergey Beryozkin <sb...@gmail.com>
Authored: Fri Mar 31 17:01:18 2017 +0100
Committer: Sergey Beryozkin <sb...@gmail.com>
Committed: Fri Mar 31 17:01:18 2017 +0100

----------------------------------------------------------------------
 .../apache/cxf/transport/http/DestinationRegistryImpl.java   | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/b174e1d4/rt/transports/http/src/main/java/org/apache/cxf/transport/http/DestinationRegistryImpl.java
----------------------------------------------------------------------
diff --git a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/DestinationRegistryImpl.java b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/DestinationRegistryImpl.java
index 286b564..2e75059 100644
--- a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/DestinationRegistryImpl.java
+++ b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/DestinationRegistryImpl.java
@@ -50,9 +50,9 @@ public class DestinationRegistryImpl implements DestinationRegistry {
             throw new RuntimeException("Already a destination on " + path);
         }
         try {
-            String path2 = URLDecoder.decode(path, "ISO-8859-1");
+            String path2 = URLDecoder.decode(path, "UTF-8");
             if (!path.equals(path2)) {
-                decodedDestinations.put(URLDecoder.decode(path, "ISO-8859-1"), destination);
+                decodedDestinations.put(path2, destination);
             }
         } catch (UnsupportedEncodingException e) {
             throw new RuntimeException("Unsupported Encoding", e);
@@ -62,9 +62,9 @@ public class DestinationRegistryImpl implements DestinationRegistry {
     public synchronized void removeDestination(String path) {
         destinations.remove(path);
         try {
-            String path2 = URLDecoder.decode(path, "ISO-8859-1");
+            String path2 = URLDecoder.decode(path, "UTF-8");
             if (!path.equals(path2)) {
-                decodedDestinations.remove(URLDecoder.decode(path, "ISO-8859-1"));
+                decodedDestinations.remove(path2);
             }
         } catch (UnsupportedEncodingException e) {
             throw new RuntimeException("Unsupported Encoding", e);