zyearn commented on code in PR #2387: URL: https://github.com/apache/brpc/pull/2387#discussion_r1339124802
########## 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: RFC doesn't mention overwritten. It says: Multiple message-header fields with the same field-name MAY be present in a message if and only if the entire field-value for that header field is defined as a comma-separated list [i.e., #(values)]. In brpc implementation, if the incoming header is in the format of "key:value1,value2,value3", brpc won't overwrite cases like this. But combining headers seems reasonable otherwise the previous header would be lost. ########## 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: LGTM -- 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