aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/request.rb
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2008-12-23 13:36:05 -0600
committerJoshua Peek <josh@joshpeek.com>2008-12-23 13:36:05 -0600
commit9c1e48eaea921efa67fbeed1ff1876dc710f8fd2 (patch)
tree9afb77428da5d309664e9e09960e95a5277faa98 /actionpack/lib/action_controller/request.rb
parent3562d54d18bf6c87384436c63383666617a2a1eb (diff)
downloadrails-9c1e48eaea921efa67fbeed1ff1876dc710f8fd2.tar.gz
rails-9c1e48eaea921efa67fbeed1ff1876dc710f8fd2.tar.bz2
rails-9c1e48eaea921efa67fbeed1ff1876dc710f8fd2.zip
ActionController::VerbPiggybacking middleware
Diffstat (limited to 'actionpack/lib/action_controller/request.rb')
-rwxr-xr-xactionpack/lib/action_controller/request.rb20
1 files changed, 9 insertions, 11 deletions
diff --git a/actionpack/lib/action_controller/request.rb b/actionpack/lib/action_controller/request.rb
index 2cad7bc84c..d9eb5af849 100755
--- a/actionpack/lib/action_controller/request.rb
+++ b/actionpack/lib/action_controller/request.rb
@@ -45,8 +45,6 @@ module ActionController
# UnknownHttpMethod is raised for invalid methods not listed in ACCEPTED_HTTP_METHODS.
def request_method
method = @env['REQUEST_METHOD']
- method = parameters[:_method] if method == 'POST' && !parameters[:_method].blank?
-
HTTP_METHOD_LOOKUP[method] || raise(UnknownHttpMethod, "#{method}, accepted HTTP methods are #{HTTP_METHODS.to_sentence}")
end
memoize :request_method
@@ -143,15 +141,15 @@ module ActionController
# supplied, both must match, or the request is not considered fresh.
def fresh?(response)
case
- when if_modified_since && if_none_match
- not_modified?(response.last_modified) && etag_matches?(response.etag)
- when if_modified_since
- not_modified?(response.last_modified)
- when if_none_match
- etag_matches?(response.etag)
- else
- false
- end
+ when if_modified_since && if_none_match
+ not_modified?(response.last_modified) && etag_matches?(response.etag)
+ when if_modified_since
+ not_modified?(response.last_modified)
+ when if_none_match
+ etag_matches?(response.etag)
+ else
+ false
+ end
end
# Returns the Mime type for the \format used in the request.