writing HttpChunk.LAST_CHUNK future never completes

Martin Ždila m.zdila at gmail.com
Wed May 18 11:01:20 EDT 2011


Hello

HttpMessageDecoder sets HttpMessage.setChunked(true) if the
Content-Length is greater than specified limit. It doesn't add the TE
header to the HttpMessage.

HttpMessageEncoder checks if HttpMessage contains
HttpHeaders.Names.TRANSFER_ENCODING. It doesn't read
HttpMessage.isChunked() to check it.

This is not very symetric. I am writing HTTP proxy and this way I
can't pass HttpMessage and following HttpChunk-s generated by
HttpMessageDecoder to HttpMessageEncoder because it won't detect the
message as chunked. There is some fallback "else" branch in the
HttpMessageEncoder that returns null on for the last chunk in this
case and this causes that future of the write never completes.

Is this design an intent or is it a bug?

Thanks in advance
-- 
Ing. Martin Ždila
tel:+421-908-363-848
mailto:martin at zdila.sk
http://www.zdila.sk/



More information about the netty-users mailing list