You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by GitBox <gi...@apache.org> on 2021/11/19 14:33:58 UTC

[GitHub] [incubator-brpc] serverglen edited a comment on issue #1610: 在brpc server中返回204时,body不为空

serverglen edited a comment on issue #1610:
URL: https://github.com/apache/incubator-brpc/issues/1610#issuecomment-974123240


   > > ```c++
   > > if (some_condition) {
   > >     cntl->http_response().set_status_code(brpc::HTTP_STATUS_NO_CONTENT);
   > >     return ;
   > > }
   > > ```
   > 
   > 我这么实现也不行,body会有{}占用两个字节
   
   那你可以尝试修改~HttpResponseSender()的实现
   https://github.com/apache/incubator-brpc/blob/master/src/brpc/policy/http_rpc_protocol.cpp#L706 
   


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

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



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