diff --git a/src/main/java/org/jboss/netty/handler/codec/http/HttpMessageEncoder.java b/src/main/java/org/jboss/netty/handler/codec/http/HttpMessageEncoder.java index 5f5b992c25..4cd002e8cc 100644 --- a/src/main/java/org/jboss/netty/handler/codec/http/HttpMessageEncoder.java +++ b/src/main/java/org/jboss/netty/handler/codec/http/HttpMessageEncoder.java @@ -63,7 +63,9 @@ public abstract class HttpMessageEncoder extends OneToOneEncoder { } else { return wrappedBuffer(header, content); } - } else if (msg instanceof HttpChunk) { + } + + if (msg instanceof HttpChunk) { HttpChunk chunk = (HttpChunk) msg; if (chunk.isLast()) { return LAST_CHUNK.duplicate();