aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/http/cache.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2015-08-24 15:59:30 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2015-08-24 15:59:30 -0700
commita1ff5585bd537bf5005cca11442566abb7422311 (patch)
tree81124dbc8785bac98aace8fb0710a8d5ff4c6dfb /actionpack/lib/action_dispatch/http/cache.rb
parentf5f4d135a23dc084be66659222e030de94d62dc6 (diff)
downloadrails-a1ff5585bd537bf5005cca11442566abb7422311.tar.gz
rails-a1ff5585bd537bf5005cca11442566abb7422311.tar.bz2
rails-a1ff5585bd537bf5005cca11442566abb7422311.zip
fewer calls to `env`
We don't want to directly access the env hash
Diffstat (limited to 'actionpack/lib/action_dispatch/http/cache.rb')
-rw-r--r--actionpack/lib/action_dispatch/http/cache.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/http/cache.rb b/actionpack/lib/action_dispatch/http/cache.rb
index cc1cb3f0f0..be87343b20 100644
--- a/actionpack/lib/action_dispatch/http/cache.rb
+++ b/actionpack/lib/action_dispatch/http/cache.rb
@@ -8,13 +8,13 @@ module ActionDispatch
HTTP_IF_NONE_MATCH = 'HTTP_IF_NONE_MATCH'.freeze
def if_modified_since
- if since = env[HTTP_IF_MODIFIED_SINCE]
+ if since = get_header(HTTP_IF_MODIFIED_SINCE)
Time.rfc2822(since) rescue nil
end
end
def if_none_match
- env[HTTP_IF_NONE_MATCH]
+ get_header HTTP_IF_NONE_MATCH
end
def if_none_match_etags