Fixed issue: NETTY-272 HttpMessageEncoder should not prepend/append extra data around HttpChunk content if Transfer-Encoding is not chunked.

* OneToOneEncoder should ignore null because HttpMessageEncoder returns null when HttpChunk.isLast() is true.
This commit is contained in:
Trustin Lee 2010-01-07 09:08:15 +00:00
parent 661acd24c8
commit 46e9fe364a

View File

@ -66,7 +66,7 @@ public abstract class OneToOneEncoder implements ChannelDownstreamHandler {
Object encodedMessage = encode(ctx, e.getChannel(), originalMessage);
if (originalMessage == encodedMessage) {
ctx.sendDownstream(evt);
} else {
} else if (encodedMessage != null) {
write(ctx, e.getFuture(), encodedMessage, e.getRemoteAddress());
}
}