summary refs log tree commit
diff options
context:
space:
mode:
authorLaurence Lee <lalee@bigdaddy.lalee.net>2009-04-30 10:17:40 -1000
committerLaurence Lee <lalee@bigdaddy.lalee.net>2009-04-30 10:17:40 -1000
commit1f3fa756192cd5a0524f6fa136c71d9a9de16f03 (patch)
tree1a9ce23d5fd405aadd8e5e414b7a28508d55d3bc
parent75a0ce40cd3bf72fe8a715bf19f971cf49ba5ba3 (diff)
downloadrack-lalee/MethodOverride_PUT.patch.tar.gz
LALEE: Tweak to Rack's Request.rb to allow POST Data from MethodOverride PUT lalee/MethodOverride_PUT.patch
Without this, you can't do RESTful updates with MethodOverride setting
method to PUT, because the POST data would be ignored.
-rw-r--r--lib/rack/request.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/rack/request.rb b/lib/rack/request.rb
index 0557837b..922c735a 100644
--- a/lib/rack/request.rb
+++ b/lib/rack/request.rb
@@ -160,7 +160,8 @@ module Rack
 
     # The union of GET and POST data.
     def params
-      self.put? ? self.GET : self.GET.update(self.POST)
+      # self.put? ? self.GET : self.GET.update(self.POST)
+      self.GET.update(self.POST) # LALEE -this is needed because MethodOverride allows PUT with POST Data.
     rescue EOFError => e
       self.GET
     end