src/java.management.rest/share/classes/com/oracle/jmx/remote/rest/http/MBeanServerResource.java
branchjmx-rest-api
changeset 56006 352a4f213fc6
parent 56002 60ab3b595a8e
--- a/src/java.management.rest/share/classes/com/oracle/jmx/remote/rest/http/MBeanServerResource.java	Tue Jan 02 15:03:52 2018 +0530
+++ b/src/java.management.rest/share/classes/com/oracle/jmx/remote/rest/http/MBeanServerResource.java	Thu Jan 04 14:39:04 2018 +0530
@@ -50,6 +50,8 @@
 import java.lang.reflect.Method;
 import java.lang.reflect.Proxy;
 import java.net.HttpURLConnection;
+import java.net.URLDecoder;
+import java.nio.charset.StandardCharsets;
 import java.security.AccessControlContext;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
@@ -157,7 +159,7 @@
             }
         }
 
-        String path = exchange.getRequestURI().getPath();
+        String path = URLDecoder.decode(exchange.getRequestURI().getPath(), StandardCharsets.UTF_8.displayName());
         String pathPrefix = httpContext.getPath();
         // Route request to appropriate resource
         if (path.matches(pathPrefix + "/?$")) {