diff --git a/actionpack/lib/action_controller/response.rb b/actionpack/lib/action_controller/response.rb index 8c4aec8d6124f9c44461281eece28dbdf14abc57..b63b34c691164c23fec41394c401960d1463c24d 100755 --- a/actionpack/lib/action_controller/response.rb +++ b/actionpack/lib/action_controller/response.rb @@ -45,6 +45,7 @@ def prepare! 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'