liubao68 commented on code in PR #3009:
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/3009#discussion_r885127883


##########
transports/transport-rest/transport-rest-client/src/main/java/org/apache/servicecomb/transport/rest/client/http/RestClientInvocation.java:
##########
@@ -274,7 +274,7 @@ protected void fail(ConnectionBase connection, Throwable e) 
{
 
   protected void setCseContext() {
     try {
-      String cseContext = 
JsonUtils.writeValueAsString(invocation.getContext());
+      String cseContext = 
JsonUtils.writeUnicodeValueAsString(invocation.getContext());

Review Comment:
   Can you add some unit test case for this and create a PR for master? I'd 
prefer not merge this for 1.x.
   
   test cases:
   
   1. encode(ascii or unicode) with this feature enabled, decode with this 
feature disabled
   2. encode(ascii or unicode) with this feature disabled, decode with this 
feature disabled (1, 2 will get same result)
   3. while users encode unicode first, and add to context,  encode(ascii or 
unicode) with this feature disabled
   4. while users encode unicode first, and add to context,  encode(ascii or 
unicode) with this feature enabled (3, 4 will get same result)



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to