Fixed a bug where HttpMessage's content becomes an EMPTY_BUFFER after messageReceive event is already fired to process chunked encoding

This commit is contained in:
Trustin Lee 2009-03-10 08:37:45 +00:00
parent 445be963ae
commit 23a73f20d6

View File

@ -297,13 +297,13 @@ public abstract class HttpMessageDecoder extends ReplayingDecoder<HttpMessageDec
private Object reset() {
HttpMessage message = this.message;
ChannelBuffer content = this.content;
if (content == null) {
content = ChannelBuffers.EMPTY_BUFFER;
}
message.setContent(content);
if (content != null) {
message.setContent(content);
this.content = null;
}
this.message = null;
this.content = null;
checkpoint(State.SKIP_CONTROL_CHARS);
return message;
}