cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject 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
Date Fri, 31 Mar 2017 16:03:38 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 91b2c2012 -> 12a4e8c0b


[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/12a4e8c0
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/12a4e8c0
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/12a4e8c0

Branch: refs/heads/3.1.x-fixes
Commit: 12a4e8c0b55e55231d020df2510333efc8bde81a
Parents: 91b2c20
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Fri Mar 31 17:01:18 2017 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Fri Mar 31 17:03: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/12a4e8c0/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 7d01b17..78f0803 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);


Mime
View raw message