Skip to content
This repository was archived by the owner on May 28, 2018. It is now read-only.

Fix Netty for unsized large responses #3790

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,7 @@ public synchronized OutputStream writeResponseStatusAndHeaders(long contentLengt
if (req.method() != HttpMethod.HEAD && (contentLength > 0 || contentLength == -1)) {

JerseyChunkedInput jerseyChunkedInput = new JerseyChunkedInput(ctx.channel());

if (HttpUtil.isTransferEncodingChunked(response)) {
ctx.write(new HttpChunkedInput(jerseyChunkedInput)).addListener(FLUSH_FUTURE);
} else {
ctx.write(new HttpChunkedInput(jerseyChunkedInput)).addListener(FLUSH_FUTURE);
}
ctx.writeAndFlush(new HttpChunkedInput(jerseyChunkedInput));
return jerseyChunkedInput;

} else {
Expand Down