Files
swift-nio-extras/Sources/NIOHTTPCompression
Cory Benfield d02584d64b Backport #177 to 1.10 release (#178)
Motivation

Currently we don't confirm that the decompression has completed
successfully. This means that we can incorrectly spin forever attempting
to decompress past the end of a message, and that we can fail to notice
that a message is truncated. Neither of these is good.

Modifications

Propagate the message zlib gives us as to whether or not decompression
is done, and keep track of it.
Add some tests written by @vojtarylko to validate the behaviour.

Result

Correctly police the bounds of the messages.

(cherry picked from commit 6c84d24775)
2022-09-16 09:29:47 +01:00
..