HttpChunk is mutable so no need to create a new chunk
This commit is contained in:
parent
8eb353eb5d
commit
3f7fff3fa5
@ -133,10 +133,8 @@ public abstract class HttpContentEncoder extends SimpleChannelHandler {
|
||||
if (!c.isLast()) {
|
||||
content = encode(content);
|
||||
if (content.readable()) {
|
||||
// Note that HttpChunk is immutable unlike HttpMessage.
|
||||
// XXX API inconsistency? I can live with it though.
|
||||
Channels.write(
|
||||
ctx, e.getFuture(), new DefaultHttpChunk(content), e.getRemoteAddress());
|
||||
c.setContent(content);
|
||||
ctx.sendDownstream(e);
|
||||
}
|
||||
} else {
|
||||
ChannelBuffer lastProduct = finishEncode();
|
||||
|
Loading…
x
Reference in New Issue
Block a user