aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/response.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller/response.rb')
-rwxr-xr-xactionpack/lib/action_controller/response.rb1
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'