liubao68 commented on a change in pull request #1561: [SCB-1748] support colon 
in path value
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/1561#discussion_r377999033
 
 

 ##########
 File path: 
foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/http/HttpUtils.java
 ##########
 @@ -94,6 +97,14 @@ public static String encodePathParam(String pathParam) {
     return UrlEscapers.urlPathSegmentEscaper().escape(pathParam);
   }
 
+  public static String decodePathParam(String pathParam) throws 
UnsupportedEncodingException {
+    String res = uriDecodePath(pathParam);
+    if (StringUtils.isEmpty(res)) {
+      return URLDecoder.decode(pathParam, "UTF-8");
+    }
+    return res;
+  }
+
   public static String uriDecodePath(String path) {
     if (path == null) {
 
 Review comment:
   This function seems not correct. According to the java docs, URL(path) will 
not parse the path, users should use 
   ```new URI(null, null, path, null);``` to parse the parse

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to