Fixed a problem where HttpMessageDecoder doesn't finish decoding immediately when content-length is 0 (or there's no content)
This commit is contained in:
parent
7b69bf371b
commit
e213b54b71
@ -73,6 +73,10 @@ public abstract class HttpMessageDecoder extends ReplayingDecoder<HttpMessageDec
|
|||||||
}
|
}
|
||||||
case READ_HEADER: {
|
case READ_HEADER: {
|
||||||
readHeaders(buffer);
|
readHeaders(buffer);
|
||||||
|
if (message.getContentLength() == 0) {
|
||||||
|
content = ChannelBuffers.EMPTY_BUFFER;
|
||||||
|
return reset();
|
||||||
|
}
|
||||||
//we return null here, this forces decode to be called again where we will decode the content
|
//we return null here, this forces decode to be called again where we will decode the content
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user