lhsoft commented on code in PR #2387:
URL: https://github.com/apache/brpc/pull/2387#discussion_r1330925273


##########
test/brpc_http_rpc_protocol_unittest.cpp:
##########
@@ -1544,7 +1544,7 @@ TEST_F(HttpTest, http2_header_after_data) {
     ASSERT_EQ(res_header.content_type(), "application/proto");
     // Check overlapped header is overwritten by the latter.
     const std::string* user_defined1 = res_header.GetHeader("user-defined1");
-    ASSERT_EQ(*user_defined1, "overwrite-a");
+    ASSERT_EQ(*user_defined1, "a,overwrite-a");

Review Comment:
   The test case is `http2_header_after_data`.  
   For http2,  according to the rfc : [ 
https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2](url), it 
shouldn't be expected to be overwritten.
   The 
[grpc](https://github.com/grpc/grpc-go/blob/master/Documentation/grpc-metadata.md)
 use map[string][]string for header:
   ```
   md := metadata.Pairs(
       "key1", "val1",
       "key1", "val1-2", // "key1" will have map value []string{"val1", 
"val1-2"}
       "key2", "val2",
   )
   ```



-- 
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-unsubscr...@brpc.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org

Reply via email to