hiberabyss commented on a change in pull request #1690:
URL: https://github.com/apache/incubator-brpc/pull/1690#discussion_r800721619



##########
File path: src/brpc/policy/http_rpc_protocol.cpp
##########
@@ -757,6 +772,10 @@ HttpResponseSender::~HttpResponseSender() {
             if (!res->SerializeToZeroCopyStream(&wrapper)) {
                 cntl->SetFailed(ERESPONSE, "Fail to serialize %s", 
res->GetTypeName().c_str());
             }
+        } else if (content_type == HTTP_CONTENT_PROTO_TEXT) {
+            if (!google::protobuf::TextFormat::Print(*res, &wrapper)) {
+                cntl->SetFailed(ERESPONSE, "Fail to print %s", 
res->GetTypeName().c_str());

Review comment:
       Done

##########
File path: src/brpc/policy/http_rpc_protocol.cpp
##########
@@ -1470,6 +1489,12 @@ void ProcessHttpRequest(InputMessageBase *msg) {
                                     req->GetDescriptor()->full_name().c_str());
                     return;
                 }
+            } else if (content_type == HTTP_CONTENT_PROTO_TEXT) {
+                if (!ParsePbTextFromIOBuf(req, req_body)) {
+                    cntl->SetFailed(EREQUEST, "Fail to parse http body as %s",

Review comment:
       Done




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to