do not encode if empty content
This commit is contained in:
parent
5579a91e1d
commit
46c9a5f094
@ -102,7 +102,8 @@ public abstract class HttpContentEncoder extends SimpleChannelHandler {
|
|||||||
throw new IllegalStateException("cannot send more responses than requests");
|
throw new IllegalStateException("cannot send more responses than requests");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((encoder = newContentEncoder(acceptEncoding)) != null) {
|
boolean hasContent = m.isChunked() || m.getContent().readable();
|
||||||
|
if (hasContent && (encoder = newContentEncoder(acceptEncoding)) != null) {
|
||||||
// Encode the content and remove or replace the existing headers
|
// Encode the content and remove or replace the existing headers
|
||||||
// so that the message looks like a decoded message.
|
// so that the message looks like a decoded message.
|
||||||
m.setHeader(
|
m.setHeader(
|
||||||
|
Loading…
Reference in New Issue
Block a user