You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2018/09/27 09:33:47 UTC

[GitHub] yhs0092 commented on a change in pull request #924: [SCB-936] encode slash in path param

yhs0092 commented on a change in pull request #924: [SCB-936] encode slash in path param
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/924#discussion_r220855988
 
 

 ##########
 File path: integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/testcase/TestDataTypePrimitive.java
 ##########
 @@ -395,9 +390,9 @@ public void intPath_springmvc_rt() {
 
   @Test
   public void stringPath_springmvc_rt() {
-    String expect = "serviceComb";
+    String expect = "serviceComb%2FserviceComb";
     assertEquals(expect,
-        (String) consumersSpringmvc.getSCBRestTemplate().getForObject("/stringPath/" + expect, String.class));
+        consumersSpringmvc.getSCBRestTemplate().getForObject("/stringPath/" + expect, String.class));
 
 Review comment:
   Spring `HierarchicalUriComponents` does duplicated encoding. As a result, the path param actually sent is "serviceComb%252FserviceComb".
   To send an encoded slash, we need to build a Uri to specify path param.

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


With regards,
Apache Git Services