Fix the bug that the grpc protocol is incompatible with authentication(issue:#3001)
…y could not be parsed by the client to get the correct error code after authentication failed
What problem does this PR solve?
Issue Number: #3001
Problem Summary:
What is changed and the side effects?
Changed:
- grpc协议和http协议当前共用同一个鉴权函数,所以在鉴权函数中增加了对http协议类型的判断,如果是http2.0版本,按grpc格式返回错误
Side effects:
-
Performance effects:
-
Breaking backward compatibility:
Check List:
- Please make sure your changes are compilable.
- When providing us with a new feature, it is best to add related tests.
- Please follow Contributor Covenant Code of Conduct.
Close #3001
@chenBright please take a look :)
Please add unit test for this case in test/brpc_server_unittest.cpp.
Please add unit test for this case in test/brpc_server_unittest.cpp.
@chenBright done
@chenBright @wwbmmm please take a look, thx
@chenBright hello, can this PR be merged