-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
非http包进入到http协议解码,不抛出BadSchema,反而bad-request进入到encodeResponse抛出空指针了 #104
Comments
http协议不应该是 |
@dhhua http协议是可以和已存在的其他协议共存的,比如可用于brpc标准协议和http协议并存。 |
@wenweihu86 我是写了自定义协议,而且要和brpc协议并存,原本写的优先级比较低,接收的包在httpProtocol就报错了,还没到自定义协议解包,现在我是调高优先级解决了,建议以后可以配置要使用的protocol,现在只能配一个主协议,配了就只能用单协议了,不过就是可以用多端口解决,多端口注册服务对我这边不太好 |
@dhhua 在httpProtocol报错了,HttpRpcProtocol.decode返回BadSchema的呀。 |
@wenweihu86 BrpcHttpObjectDecoder在decode的时候用了HttpObjectDecoder,HttpObjectDecoder把异常直接捕获返回了bad-request了,所以不会抛出BadSchema |
…d input message. Fixes baidu#104
java.lang.NullPointerException: null
at com.baidu.brpc.protocol.http.HttpRpcProtocol.encodeResponse(HttpRpcProtocol.java:410) ~[brpc-java-2.5.1.jar:na]
at com.baidu.brpc.server.handler.DecodeWorkTask.run(DecodeWorkTask.java:130) ~[brpc-java-2.5.1.jar:na]
at com.baidu.brpc.utils.ThreadPool.consume(ThreadPool.java:130) [brpc-java-2.5.1.jar:na]
at com.baidu.brpc.utils.ThreadPool.access$000(ThreadPool.java:37) [brpc-java-2.5.1.jar:na]
at com.baidu.brpc.utils.ThreadPool$1.run(ThreadPool.java:78) [brpc-java-2.5.1.jar:na]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [netty-all-4.1.36.Final.jar:4.1.36.Final]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_05]
The text was updated successfully, but these errors were encountered: