chenBright commented on code in PR #3002: URL: https://github.com/apache/brpc/pull/3002#discussion_r2176314027
########## src/brpc/policy/http_rpc_protocol.cpp: ########## @@ -1331,7 +1331,26 @@ ParseResult ParseHttpMessage(butil::IOBuf *source, Socket *socket, } } -static void SendUnauthorizedResponse(const std::string& user_error_text, Socket* socket) { +static void SendUnauthorizedResponse(const std::string& user_error_text, Socket* socket, const InputMessageBase* msg) { + HttpContext* http_request = (HttpContext*)msg; + const bool is_http2 = http_request->header().is_http2(); + if (is_http2) { + // for grpc client + const H2StreamContext* h2_sctx = static_cast<const H2StreamContext*>(msg); + brpc::Controller* cntl = new brpc::Controller(); Review Comment: Yeah, `Controller cntl;` already meets the need. -- 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