You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/12/05 11:23:40 UTC

[GitHub] [dubbo] EarthChen commented on a diff in pull request #11075: Fix tri convert upper header

EarthChen commented on code in PR #11075:
URL: https://github.com/apache/dubbo/pull/11075#discussion_r1039467817


##########
dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/stream/StreamUtils.java:
##########
@@ -88,27 +101,26 @@ public static void convertAttachment(DefaultHttp2Headers headers,
         if (attachments == null) {
             return;
         }
-
+        Map<String, String> needConvertKey = new HashMap<>();
         for (Map.Entry<String, Object> entry : attachments.entrySet()) {
-            final String key = entry.getKey().toLowerCase(Locale.ROOT);
-            if (Http2Headers.PseudoHeaderName.isPseudoHeader(key)) {
-                continue;
+            String key = lruHeaderMap.get(entry.getKey());
+            if (key == null) {
+                final String lowerCaseKey = entry.getKey().toLowerCase(Locale.ROOT);
+                lruHeaderMap.put(entry.getKey(), lowerCaseKey);

Review Comment:
   The concurrency problem here is ignored and does not affect the final 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: notifications-unsubscribe@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org