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 2022/05/30 03:13:29 UTC

[GitHub] [servicecomb-java-chassis] demonbug commented on a diff in pull request #3009: [SCB-2533] encode invocation context before add to http header

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


##########
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:
   I think it is compatible, Jackson will automatic decode unicode string in deserialization.
   In testcase, use writeUnicodeValueAsString to serialize and use the old OBJ_MAPPER to deserialize, the value is not changed



-- 
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: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org