From 653942db42912ca40a5d4c2dcd8c777bb122c9f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=96=9B=E4=BC=A0=E5=AE=87?= Date: Tue, 13 Sep 2022 14:43:58 +0800 Subject: [PATCH 1/2] fix a typo in grpc protocol --- 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 22b79ca929..92b7953745 100644 --- a/src/brpc/policy/http_rpc_protocol.cpp +++ b/src/brpc/policy/http_rpc_protocol.cpp @@ -1457,7 +1457,7 @@ void ProcessHttpRequest(InputMessageBase *msg) { if (is_grpc_ct) { bool grpc_compressed = false; if (!RemoveGrpcPrefix(&req_body, &grpc_compressed)) { - cntl->SetFailed(ERESPONSE, "Invalid gRPC response"); + cntl->SetFailed(ERESPONSE, "Invalid gRPC request"); return; } if (grpc_compressed) { From cde9b80adbe2b13f86507faa1e69dbe0cd0df0a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=96=9B=E4=BC=A0=E5=AE=87?= Date: Thu, 15 Sep 2022 15:18:20 +0800 Subject: [PATCH 2/2] ERESPONSE->EREQUEST --- 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 92b7953745..7ae08cb70a 100644 --- a/src/brpc/policy/http_rpc_protocol.cpp +++ b/src/brpc/policy/http_rpc_protocol.cpp @@ -1457,7 +1457,7 @@ void ProcessHttpRequest(InputMessageBase *msg) { if (is_grpc_ct) { bool grpc_compressed = false; if (!RemoveGrpcPrefix(&req_body, &grpc_compressed)) { - cntl->SetFailed(ERESPONSE, "Invalid gRPC request"); + cntl->SetFailed(EREQUEST, "Invalid gRPC request"); return; } if (grpc_compressed) {