aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller
diff options
context:
space:
mode:
authorMichael Koziarski <michael@koziarski.com>2007-08-12 22:32:19 +0000
committerMichael Koziarski <michael@koziarski.com>2007-08-12 22:32:19 +0000
commit55f444e69432aa9840406b3ad313eec39b6bbb87 (patch)
tree08a34fdcd8e3a3599e1b5b33bf8877e91291dc47 /actionpack/lib/action_controller
parent303d379dadaf8c5b0b4518173b2689b003c213a8 (diff)
downloadrails-55f444e69432aa9840406b3ad313eec39b6bbb87.tar.gz
rails-55f444e69432aa9840406b3ad313eec39b6bbb87.tar.bz2
rails-55f444e69432aa9840406b3ad313eec39b6bbb87.zip
Send freshness information when sending Etags. Without this internet explorer will not send conditional gets for a resource, but instead hold on to the responses for the current browser session.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7309 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller')
-rwxr-xr-xactionpack/lib/action_controller/response.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/response.rb b/actionpack/lib/action_controller/response.rb
index 429b3eff32..84edafd7bf 100755
--- a/actionpack/lib/action_controller/response.rb
+++ b/actionpack/lib/action_controller/response.rb
@@ -46,7 +46,7 @@ module ActionController
def handle_conditional_get!
if body.is_a?(String) && (headers['Status'] ? headers['Status'][0..2] == '200' : true) && !body.empty?
self.headers['ETag'] ||= %("#{Digest::MD5.hexdigest(body)}")
- self.headers['Cache-Control'] = 'private' if headers['Cache-Control'] == DEFAULT_HEADERS['Cache-Control']
+ self.headers['Cache-Control'] = 'private, max-age=0, must-revalidate' if headers['Cache-Control'] == DEFAULT_HEADERS['Cache-Control']
if request.headers['HTTP_IF_NONE_MATCH'] == headers['ETag']
self.headers['Status'] = '304 Not Modified'