-
Notifications
You must be signed in to change notification settings - Fork 15
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
Support rails 5 #24
base: master
Are you sure you want to change the base?
Support rails 5 #24
Conversation
This should solve #23 |
@@ -42,7 +42,7 @@ def call(env) | |||
headers['Content-Type'] = Rack::Mime.mime_type(File.extname(path), 'text/plain') | |||
|
|||
# Update cache-control to add directive telling Rack::Deflate to leave it alone. | |||
cache_control = headers['Cache-Control'].try(:to_s).try(:downcase) | |||
cache_control = headers['Cache-Control']&.to_s&.downcase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a maintainer or anything but would love to see this merged as I'm working on migrating a codebase to rails 5 that uses it.
I'm pretty sure this use of try
still works fine in rails 5 though, so this change doesn't seem necessary and it would break support for ruby < 2.3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Please do fix the Rails 5 incompatibility. This problem has been noted elsewhere: On a project I'm on we've had to drop using heroku_rails_deflate because we're transitioning to Rails 5: |
Curious, is there anything hold up this PR? |
No description provided.