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 eb143d6d6e
commit b1f27d9aa8

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;
}