aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/caching.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2006-12-19 20:25:52 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2006-12-19 20:25:52 +0000
commite56bd3a121d1b9ae1d89a335cc39ff9aef36789e (patch)
treea40e38ab24cca3d63a74a0bab181bfecaee2be68 /actionpack/lib/action_controller/caching.rb
parent7277c518912e08d125cef0f0a890a72bd7283cf5 (diff)
downloadrails-e56bd3a121d1b9ae1d89a335cc39ff9aef36789e.tar.gz
rails-e56bd3a121d1b9ae1d89a335cc39ff9aef36789e.tar.bz2
rails-e56bd3a121d1b9ae1d89a335cc39ff9aef36789e.zip
Only cache GET requests with a 200 OK response. Closes #6514, #6743.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5755 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller/caching.rb')
-rw-r--r--actionpack/lib/action_controller/caching.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/caching.rb b/actionpack/lib/action_controller/caching.rb
index 28dc45139a..c7f3e95617 100644
--- a/actionpack/lib/action_controller/caching.rb
+++ b/actionpack/lib/action_controller/caching.rb
@@ -135,7 +135,7 @@ module ActionController #:nodoc:
private
def caching_allowed
- !request.post? && response.headers['Status'] && response.headers['Status'].to_i < 400
+ request.get? && response.headers['Status'].to_i == 200
end
end