本文介绍了意外的消息类型:HttpClientCodec管道上的DefaultHttpRequest的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
频道上的第二个.write
导致异常
A second .write
on the channel, results in an exception
抓挠我的脑袋应该做些不同的事情,因为管道上只有HttpClientCodec
.通过从 Github 克隆并运行main(运行客户端和服务器端)来重现错误. /p>
Scratching my head what should be done differently, given that the pipeline only has HttpClientCodec
on it. Reproduces by cloning from Github and running main, which runs the client and server sides, reproducing the error.
推荐答案
您必须编写DefaultFullHttpResponse
. DefaultHttpResponse
缺少内容,并且HttpContent
和LastHttpContent
必须紧随其后.我同意这确实令人困惑.
You have to write a DefaultFullHttpResponse
. DefaultHttpResponse
lacks content and HttpContent
s and a LastHttpContent
must follow. I agree this is confusing indeed.
这篇关于意外的消息类型:HttpClientCodec管道上的DefaultHttpRequest的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!