Ticket #5235: raw_post_data_fix_for_put.diff
| File raw_post_data_fix_for_put.diff, 1.1 kB (added by guy.naor@famundo.com, 2 years ago) |
|---|
-
actionpack/test/controller/cgi_test.rb
old new 315 315 end 316 316 end 317 317 318 # Makes sure that a HTTP PUT works with Multipart as well as POST 319 class PutMultipartCGITest < MultipartCGITest 320 def setup 321 super 322 ENV['REQUEST_METHOD'] = 'PUT' 323 end 324 end 318 325 319 326 class CGIRequestTest < Test::Unit::TestCase 320 327 def setup -
actionpack/lib/action_controller/cgi_ext/raw_post_data_fix.rb
old new 15 15 method = :get 16 16 end 17 17 18 if method == :post&& (boundary = multipart_form_boundary)18 if ((method == :post) || (method == :put)) && (boundary = multipart_form_boundary) 19 19 @multipart = true 20 20 @params = read_multipart(boundary, Integer(env_table['CONTENT_LENGTH'])) 21 21 else