Merge lp://staging/~gz/charms/trusty/apache2-reverseproxy/gzip_encoded_extensions into lp://staging/~abentley/charms/trusty/apache2-reverseproxy/apache-website-interface
Status: | Merged |
---|---|
Merged at revision: | 22 |
Proposed branch: | lp://staging/~gz/charms/trusty/apache2-reverseproxy/gzip_encoded_extensions |
Merge into: | lp://staging/~abentley/charms/trusty/apache2-reverseproxy/apache-website-interface |
Diff against target: |
130 lines (+52/-6) 3 files modified
README.md (+8/-0) config.yaml (+4/-0) scripts/config-changed (+40/-6) |
To merge this branch: | bzr merge lp://staging/~gz/charms/trusty/apache2-reverseproxy/gzip_encoded_extensions |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Aaron Bentley | Approve | ||
Review via email: mp+261139@code.staging.launchpad.net |
Description of the change
Adds a new configuration option to serve gzip encoded files with the correct content-encoding header
Two main things of interest:
* We should arguably set the content encoding in S3. This branch does not preclude doing that as well. Unfortunately s3cmd doesn't make it easy, and we'd have to fix up the previous files. See:
<https:/
Which also raises the other side, if we have Content-Encoding set in S3, we really want the reverse proxy to *always* set accept gzip, and handle the vary/not vary stuff locally - rather than passing through to S3 and letting them decode and transfer uncompressed data.
* Rather than juse using mod_mime AddEncoding, this branch takes a more convoluted approach so it's possible to limit on multiple extensions. This should address Aaron's previous concern as we can then configure just ".log.gz" to be marked, we we know is safe to be displayed in browser.
In the LocationMatch block, we're first disabling mod_deflate (which otherwise futzes with things), then just setting the Content-Encoding header. No Vary business going on, we'd prefer that browsers and other tools get the encoded version.
It would be nice to add some unit tests, we can maybe refactor a bit later?
Please add docs to the README. See also inline comments.