DMwangnima commented on code in PR #2589: URL: https://github.com/apache/dubbo-go/pull/2589#discussion_r1475588826
########## protocol/triple/server.go: ########## @@ -409,3 +422,14 @@ func createServiceInfoWithReflection(svc common.RPCService) *server.ServiceInfo return &info } + +// generateAttachments transfer http.Header to map[string]interface{} and make all keys lowercase +func generateAttachments(header http.Header) map[string]interface{} { + attachments := make(map[string]interface{}, len(header)) + for key, val := range header { + lowerKey := strings.ToLower(key) + attachments[lowerKey] = val + } + + return attachments +} Review Comment: Old triple would expose HTTP protocol headers too. -- 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-unsubscr...@dubbo.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org For additional commands, e-mail: notifications-h...@dubbo.apache.org