[#1346] Make sure HttpPostRequestEncoder.nextChunk() return LastHttpContent once all chunks are read
This commit is contained in:
parent
e48bc9c086
commit
c07234ed72
@ -974,7 +974,7 @@ public class HttpPostRequestEncoder implements ChunkedMessageInput<HttpContent>
|
|||||||
private HttpContent nextChunk() throws ErrorDataEncoderException {
|
private HttpContent nextChunk() throws ErrorDataEncoderException {
|
||||||
if (isLastChunk) {
|
if (isLastChunk) {
|
||||||
isLastChunkSent = true;
|
isLastChunkSent = true;
|
||||||
return new DefaultHttpContent(EMPTY_BUFFER);
|
return LastHttpContent.EMPTY_LAST_CONTENT;
|
||||||
}
|
}
|
||||||
ByteBuf buffer;
|
ByteBuf buffer;
|
||||||
int size = HttpPostBodyUtil.chunkSize;
|
int size = HttpPostBodyUtil.chunkSize;
|
||||||
@ -1032,7 +1032,7 @@ public class HttpPostRequestEncoder implements ChunkedMessageInput<HttpContent>
|
|||||||
if (currentBuffer == null) {
|
if (currentBuffer == null) {
|
||||||
isLastChunkSent = true;
|
isLastChunkSent = true;
|
||||||
// LastChunk with no more data
|
// LastChunk with no more data
|
||||||
return new DefaultHttpContent(EMPTY_BUFFER);
|
return LastHttpContent.EMPTY_LAST_CONTENT;
|
||||||
}
|
}
|
||||||
// Previous LastChunk with no more data
|
// Previous LastChunk with no more data
|
||||||
buffer = currentBuffer;
|
buffer = currentBuffer;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user