Optional gzip compression of responses#157
Conversation
|
Thanks for the contribution! Here are my suggestions.
|
|
There are a few formatting issues. Could you run |
Yup will do shortly! Thanks for the quick feedback, that's very refreshing! |
Ha ha... nope... |
|
E2Es added, unsafe removed, env var renamed, formatting fixed, and docs updated. I think this is ready for a deploy run and for review. |
|
@bnusunny any chance this can be released quickly? I'm really wanting to use it in a project. |
|
Just need one minor update in the README. See my last comment above. |
I only see two comments? One about cargo fmt and the one answering my 4 questions? |
Sorry, I forgot to summit the review comments. |
No problem! All issues addressed, thanks for the feedback! |
|
Release v0.6.2 is out. The layers and docker images are published. |
|
I can confirm this is working. I'm using it in a few projects already! |
Issue #, if available: None
Description of changes:
COMPRESSIONenv var istrue, when the response is not already compressed, and when thecontent-typestarts withtext/or is one of a few known types such asapplication/javascriptContent-Lengthresponse header to have the correct compressed lengthContent-Encodingresponse header togzipif compression is performedMotivations
To-Do / Seeking Input
COMPRESSIONenv var name be the first name-spaced env var such asLAMBDA_ADAPTER_COMPRESSION?unsafein one of the tests (not deployed code) was gross, but there does not appear to be a body function that takes a byte array so I had to fake it as a non-validated string - Any suggestions for that test would be welcomeBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.