Fixed a bug where HEAD response is not read completely if it's transfer encoding is 'chunked'.
This commit is contained in:
parent
2ac79dcb74
commit
5741721f71
@ -128,7 +128,11 @@ public class HttpClientCodec implements ChannelUpstreamHandler,
|
|||||||
// message-body, even though the presence of entity-header fields
|
// message-body, even though the presence of entity-header fields
|
||||||
// might lead one to believe they do.
|
// might lead one to believe they do.
|
||||||
if (HttpMethod.HEAD.equals(method)) {
|
if (HttpMethod.HEAD.equals(method)) {
|
||||||
return true;
|
// Interesting edge case:
|
||||||
|
// Zero-byte chunk will appear if Transfer-Encoding of the
|
||||||
|
// response is 'chunked'. This is probably because of the
|
||||||
|
// trailing headers.
|
||||||
|
return !msg.isChunked();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'C':
|
case 'C':
|
||||||
|
Loading…
Reference in New Issue
Block a user