You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/06/17 03:13:11 UTC

[GitHub] [rocketmq] lizhanhui commented on a diff in pull request #4473: Generate legal JSON response conditionally

lizhanhui commented on code in PR #4473:
URL: https://github.com/apache/rocketmq/pull/4473#discussion_r899726797


##########
namesrv/src/main/java/org/apache/rocketmq/namesrv/processor/DefaultRequestProcessor.java:
##########
@@ -363,9 +364,16 @@ public RemotingCommand getRouteInfoByTopic(ChannelHandlerContext ctx,
                 topicRouteData.setOrderTopicConf(orderTopicConf);
             }
 
-            byte[] content = topicRouteData.encode(SerializerFeature.BrowserCompatible,
+            byte[] content;
+            Boolean standardJsonOly = requestHeader.getAcceptStandardJsonOnly();
+            if (request.getVersion() >= Version.V4_9_3.ordinal() || (null != standardJsonOly && standardJsonOly)) {
+                content = topicRouteData.encode(SerializerFeature.BrowserCompatible,

Review Comment:
   Ahh... MQVersion#current should have been bumped up in the "develop" branch.



-- 
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: dev-unsubscribe@rocketmq.apache.org

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