diff options
author | abhishek <bigbeliever@gmail.com> | 2014-11-10 10:53:31 +0530 |
---|---|---|
committer | Abhishek Yadav <zerothabhishek@gmail.com> | 2016-01-20 07:57:30 +0530 |
commit | e362c31b342927361f3e81f36d12e245bca624c2 (patch) | |
tree | ef83bd56c8c84fd65403b04f6c611b7b9556cb3d /actionpack/lib | |
parent | fe55163f111bb20309f20c4d18959bd6aacb41af (diff) | |
download | rails-e362c31b342927361f3e81f36d12e245bca624c2.tar.gz rails-e362c31b342927361f3e81f36d12e245bca624c2.tar.bz2 rails-e362c31b342927361f3e81f36d12e245bca624c2.zip |
Response etags to always be weak: Prefixed W/ to value returned by ActionDispatch::Http::Cache::Response#etag= such that etags set in fresh_when and stale? are weak. For #17556.
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_dispatch/http/cache.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/http/cache.rb b/actionpack/lib/action_dispatch/http/cache.rb index 842dfa5827..0f7898a3f8 100644 --- a/actionpack/lib/action_dispatch/http/cache.rb +++ b/actionpack/lib/action_dispatch/http/cache.rb @@ -82,7 +82,7 @@ module ActionDispatch def etag=(etag) key = ActiveSupport::Cache.expand_cache_key(etag) - super %("#{Digest::MD5.hexdigest(key)}") + super %(W/"#{Digest::MD5.hexdigest(key)}") end def etag?; etag; end |