Changeset 7309
- Timestamp:
- 08/12/07 22:32:19 (11 months ago)
- Files:
-
- trunk/actionpack/lib/action_controller/response.rb (modified) (1 diff)
- trunk/actionpack/test/controller/render_test.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/lib/action_controller/response.rb
r6350 r7309 47 47 if body.is_a?(String) && (headers['Status'] ? headers['Status'][0..2] == '200' : true) && !body.empty? 48 48 self.headers['ETag'] ||= %("#{Digest::MD5.hexdigest(body)}") 49 self.headers['Cache-Control'] = 'private ' if headers['Cache-Control'] == DEFAULT_HEADERS['Cache-Control']49 self.headers['Cache-Control'] = 'private, max-age=0, must-revalidate' if headers['Cache-Control'] == DEFAULT_HEADERS['Cache-Control'] 50 50 51 51 if request.headers['HTTP_IF_NONE_MATCH'] == headers['ETag'] trunk/actionpack/test/controller/render_test.rb
r7190 r7309 321 321 get :render_hello_world_from_variable 322 322 assert_equal etag_for("hello david"), @response.headers['ETag'] 323 assert_equal "private, max-age=0, must-revalidate", @response.headers['Cache-Control'] 323 324 end 324 325