netty5/codec-http/src
Violeta Georgieva 08748344d8 Fix NPEs in HttpPostRequestEncoder#nextChunk
Motivation:

HttpPostRequestEncoder maintains an internal buffer that holds the
current encoded data. There are use cases when this internal buffer
becomes null, the next chunk processing implementation should take
this into consideration.

Modifications:

- When preparing the last chunk if currentBuffer is null, mark
isLastChunkSent as true and send LastHttpContent.EMPTY_LAST_CONTENT
- When calculating the remaining size take into consideration that the
currentBuffer might be null
- Tests are based on those provided in the issue by @nebhale and @bfiorini

Result:

Fixes #5478
2017-07-19 14:35:51 +02:00
..
main/java/io/netty/handler/codec Fix NPEs in HttpPostRequestEncoder#nextChunk 2017-07-19 14:35:51 +02:00
test Fix NPEs in HttpPostRequestEncoder#nextChunk 2017-07-19 14:35:51 +02:00