This is an automated email from the ASF dual-hosted git repository.
jiashunzhu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-brpc.git
The following commit(s) were added to refs/heads/master by this push:
new a5aa7768 Fix(h2 protocol): ProcessHttpRequest
new ff6c5227 Merge pull request #1868 from dandyhuang/master
a5aa7768 is described below
commit a5aa7768389280b3795e076ea942d2167e5bd415
Author: dandyhuang <[email protected]>
AuthorDate: Tue Aug 2 15:52:51 2022 +0800
Fix(h2 protocol): ProcessHttpRequest
---
src/brpc/policy/http_rpc_protocol.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/brpc/policy/http_rpc_protocol.cpp
b/src/brpc/policy/http_rpc_protocol.cpp
index 09ff9a8d..22b79ca9 100644
--- a/src/brpc/policy/http_rpc_protocol.cpp
+++ b/src/brpc/policy/http_rpc_protocol.cpp
@@ -1275,7 +1275,7 @@ void ProcessHttpRequest(InputMessageBase *msg) {
.set_remote_side(user_addr)
.set_local_side(socket->local_side())
.set_auth_context(socket->auth_context())
- .set_request_protocol(PROTOCOL_HTTP)
+ .set_request_protocol(is_http2 ? PROTOCOL_H2 : PROTOCOL_HTTP)
.set_begin_time_us(msg->received_us())
.move_in_server_receiving_sock(socket_guard);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]