Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre-compressed .gz files support #4

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

vizanto
Copy link

@vizanto vizanto commented Jun 11, 2015

Middleware that returns pre-compressed files (if available) for supported user-agents.
Inspired by the NGiNX module: http://nginx.org/en/docs/http/ngx_http_gzip_static_module.html

(Google pagespeed happens to be such a client.)

Fixes:

java.lang.ClassCastException: clojure.lang.PersistentList cannot be cast to java.lang.CharSequence
 at clojure.core$re_matcher.invoke (core.clj:4475)
    clojure.core$re_seq.invoke (core.clj:4500)
    ring.middleware.gzip$accepts_gzip_QMARK_.invoke (gzip.clj:17)
@Engelberg
Copy link

This pull request looks really useful!

@bertrandk
Copy link
Owner

I agree. @vizanto could you fix the merge conflict and I'll bring this in and cut a release. Let me know if I can help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants