Do not remove 'Content-Length' header even for a message with empty content - HEAD requires that

This commit is contained in:
Trustin Lee 2010-03-31 02:50:19 +00:00
parent 745b8300f0
commit b210c36ef9

View File

@ -210,7 +210,6 @@ public abstract class HttpMessageDecoder extends ReplayingDecoder<HttpMessageDec
// No content is expected.
// Remove the headers which are not supposed to be present not
// to confuse subsequent handlers.
message.removeHeader(HttpHeaders.Names.CONTENT_LENGTH);
message.removeHeader(HttpHeaders.Names.TRANSFER_ENCODING);
return message;
} else {