diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2007-02-19 01:33:35 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2007-02-19 01:33:35 +0000 |
commit | 372db1cd9e96dfe19217c2cc57b1406564dc16d8 (patch) | |
tree | 405d4497c59693d2ecb73ec22795ecbd0b9b1193 | |
parent | 7ec0204ecd7557a63267ff64cc412338176a0805 (diff) | |
download | rails-372db1cd9e96dfe19217c2cc57b1406564dc16d8.tar.gz rails-372db1cd9e96dfe19217c2cc57b1406564dc16d8.tar.bz2 rails-372db1cd9e96dfe19217c2cc57b1406564dc16d8.zip |
Dont ask for no caching if we have a etag to base that decision on
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6166 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rwxr-xr-x | actionpack/lib/action_controller/response.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/response.rb b/actionpack/lib/action_controller/response.rb index 8c4aec8d61..b63b34c691 100755 --- a/actionpack/lib/action_controller/response.rb +++ b/actionpack/lib/action_controller/response.rb @@ -45,6 +45,7 @@ module ActionController def handle_conditional_get! if body.is_a?(String) && headers['Status'][0..2] == '200' && !body.empty? self.headers['Etag'] ||= %("#{Digest::MD5.hexdigest(body)}") + headers.delete('Cache-Control') if headers['Cache-Control'] == DEFAULT_HEADERS['Cache-Control'] if request.headers['HTTP_IF_NONE_MATCH'] == headers['Etag'] self.headers['Status'] = '304 Not Modified' |