Skip to content
This repository has been archived by the owner on Sep 12, 2021. It is now read-only.

Don't try to compress gzipped assets. #40

Merged
merged 1 commit into from Oct 1, 2015
Merged

Conversation

cemcatik
Copy link
Contributor

This filter tries to compress any assets with 'Content-Type: text/html'.
When using with sbt-gzip pipeline stage, the Assets controller will
serve pre-gzipped assets. The pre-gzipped assets have the text/html
content type, therefore the HtmlCompressorFilter picks them up.

This PR skips pre-gzipped assets by checking 'Content-Encoding: gzip'
header.

This filter tries to compress any assets with 'Content-Type: text/html'.
When using with sbt-gzip pipeline stage, the Assets controller will
serve pre-gzipped assets. The pre-gzipped assets have the text/html
content type, therefore the HtmlCompressorFilter picks them up.

This PR skips pre-gzipped assets by checking 'Content-Encoding: gzip'
header.
akkie added a commit that referenced this pull request Oct 1, 2015
Don't try to compress gzipped assets.
@akkie akkie merged commit dedc3c6 into mohiva:master Oct 1, 2015
@akkie
Copy link
Contributor

akkie commented Oct 1, 2015

Thanks, very nice 👍

@cemcatik
Copy link
Contributor Author

cemcatik commented Oct 1, 2015

Any time!

@cemcatik cemcatik deleted the gzip branch October 1, 2015 08:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants