Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 6166

Show
Ignore:
Timestamp:
02/19/07 01:33:35 (2 years ago)
Author:
david
Message:

Dont ask for no caching if we have a etag to base that decision on

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionpack/lib/action_controller/response.rb

    r6165 r6166  
    4646        if body.is_a?(String) && headers['Status'][0..2] == '200' && !body.empty? 
    4747          self.headers['Etag'] ||= %("#{Digest::MD5.hexdigest(body)}") 
     48          headers.delete('Cache-Control') if headers['Cache-Control'] == DEFAULT_HEADERS['Cache-Control'] 
    4849 
    4950          if request.headers['HTTP_IF_NONE_MATCH'] == headers['Etag']