diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-03-02 01:48:56 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-03-02 01:48:56 +0000 |
commit | 3574ab30596ad3313607927505aed115b740fc87 (patch) | |
tree | 02f116b9ab80743ec1a961853b89607e6c57f438 /actionpack/lib/action_controller/caching.rb | |
parent | f62b8af6883188bf340e27b2789b34a2fe0730b9 (diff) | |
download | rails-3574ab30596ad3313607927505aed115b740fc87.tar.gz rails-3574ab30596ad3313607927505aed115b740fc87.tar.bz2 rails-3574ab30596ad3313607927505aed115b740fc87.zip |
Added that page caching will only happen if the response code is less than 400 (closes #4033) [g.bucher@teti.ch]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3738 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller/caching.rb')
-rw-r--r-- | actionpack/lib/action_controller/caching.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/caching.rb b/actionpack/lib/action_controller/caching.rb index e6849596db..a2259de46b 100644 --- a/actionpack/lib/action_controller/caching.rb +++ b/actionpack/lib/action_controller/caching.rb @@ -134,7 +134,7 @@ module ActionController #:nodoc: private def caching_allowed - !@request.post? + !@request.post? && @response.headers['Status'] && @response.headers['Status'].to_i < 400 end end |