1
0
mirror of https://github.com/apple/swift-nio-extras.git synced 2025-05-21 04:54:28 +08:00

1 Commits

Author SHA1 Message Date
Caleb Kleveter
0584020dca Gzip request decompress ()
### Motivation:

There will be times when a client wishes to send larger requests with gzipped bodies to save on network traffic. This PR adds a `NIOHTTPRequestDecompressor` which can be added to the server's channel pipeline so those requests are automatically inflated.

### Modifications:

- Added a `CNIOExtrasZlib_voidPtr_to_BytefPtr` C method.
- Added a `NIOHTTPRequestDecompressor` type.
- Added a `HTTPResponseDecompressorTest` test case.

### Result:

Now you don't have to manually check the `Content-Encoding` header and decompress the body on each incoming request.
2019-10-10 13:51:07 +01:00