In this patch we implement Alternator's support for gzip-compressed requests, i.e., requests with the "Content-Encoding: gzip" header, other uncompressed headers, and a gzip-compressed body. The server needs to verify the signature of the *compressed* content, and then uncompress the body before running the request. We only support gzip compression because this is what DynamoDB supports. But in the future we can easily add support for other compression algorithms like lz4 or zstd. This patch Refs #5041 but doesn't "Fixes" it because it only implements compressed requests (Content-Encoding), *not* compressed responses (Accept-Encoding). The next patch will enable several tests for this feature and make sure it behaves like DynamoDB. Note that while we will have now support in our server for compressed requests, just like DynamoDB does, the clients (AWS SDKs) will probably NOT make use of it because they do not enable request compression by default. For example, see the tests for some hoops one needs to jump through in boto3 (the Python SDK) to send compressed requests. However, we are hoping that in the future Alternator's modified clients will use compressed requests and enjoy this feature. Signed-off-by: Nadav Har'El <nyh@scylladb.com>
52 KiB
52 KiB