diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2007-02-19 02:25:01 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2007-02-19 02:25:01 +0000 |
commit | 9e4c8b88584ba09c46abcd484969da6244416946 (patch) | |
tree | d09b4b372c66fe1e07770b8d6fcfa3575f39122c /actionpack/lib | |
parent | 94fa0ed053a92b4dc48501d7dc7e7ebcec7e1ca6 (diff) | |
download | rails-9e4c8b88584ba09c46abcd484969da6244416946.tar.gz rails-9e4c8b88584ba09c46abcd484969da6244416946.tar.bz2 rails-9e4c8b88584ba09c46abcd484969da6244416946.zip |
Fix tests depending too deep
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6169 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-rwxr-xr-x | actionpack/lib/action_controller/response.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/response.rb b/actionpack/lib/action_controller/response.rb index 22dc502395..38647670f2 100755 --- a/actionpack/lib/action_controller/response.rb +++ b/actionpack/lib/action_controller/response.rb @@ -41,9 +41,10 @@ module ActionController set_content_length! end + private def handle_conditional_get! - if body.is_a?(String) && headers['Status'][0..2] == '200' && !body.empty? + 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'] |