Gateway emulator appears to not work correctly when the server can return GZIP encoded responses
Observed incorrect behaviour when connecting to a Django app that uses the gzip
. Making requests using a client that supports gzip
content encoding will cause the requests to fail client-side with a content decoding error.
Steps to reproduce:
- Connect API gateway through to an local development API which uses encoding (e.g. the Photo API)
- Make any request via a client which supports
GZip
encoding (e.g. chrome/most browsers). - System will return a 200, but content will not be able to be decoded.
Proposed solution:
The returned_response
needs to have the enable_compression
function called before the call to prepare
- see aiohttp reference.