HttpObjectDecoder.invalidChunk() should return LastHttpChunk

because the decoder will enter 'BAD_MESSAGE' state and will not produce any chunk since then.
This commit is contained in:
Trustin Lee 2014-02-19 14:58:51 -08:00
parent 34e11d2e16
commit 3fb65db8d1

View File

@ -455,7 +455,7 @@ public abstract class HttpObjectDecoder extends ReplayingDecoder<HttpObjectDecod
private HttpContent invalidChunk(Exception cause) {
checkpoint(State.BAD_MESSAGE);
HttpContent chunk = new DefaultHttpContent(Unpooled.EMPTY_BUFFER);
HttpContent chunk = new DefaultLastHttpContent(Unpooled.EMPTY_BUFFER);
chunk.setDecoderResult(DecoderResult.failure(cause));
return chunk;
}