Skip to content

Commit 499b9f5

Browse files
author
Stephane Landelle
committed
Fix BodyChunkedInput when Transfer-Encoding is chunked (unknown Content-Length)
1 parent b34094d commit 499b9f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/ning/http/client/providers/netty/BodyChunkedInput.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public Object nextChunk() throws Exception {
5858
endOfInput = true;
5959
return null;
6060
} else {
61-
endOfInput = r == contentLength || r < chunkSize;
61+
endOfInput = r == contentLength || r < chunkSize && contentLength > 0;
6262
buffer.flip();
6363
return ChannelBuffers.wrappedBuffer(buffer);
6464
}

0 commit comments

Comments
 (0)