Changeset 4821
- Timestamp:
- 08/26/06 02:49:09 (2 years ago)
- Files:
-
- trunk/actionpack/CHANGELOG (modified) (1 diff)
- trunk/actionpack/lib/action_controller/cgi_ext/cgi_methods.rb (modified) (1 diff)
- trunk/actionpack/lib/action_controller/cgi_process.rb (modified) (1 diff)
- trunk/actionpack/test/controller/cgi_test.rb (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/CHANGELOG
r4814 r4821 1 1 *SVN* 2 3 * Changed the POST parameter processing to use the new QueryStringParser and make the result a indifferent hash [DHH] 2 4 3 5 * Add UrlWriter to allow writing urls from Mailers and scripts. [Nicholas Seckar] trunk/actionpack/lib/action_controller/cgi_ext/cgi_methods.rb
r4661 r4821 157 157 end 158 158 159 return result 159 return result.with_indifferent_access 160 160 end 161 161 trunk/actionpack/lib/action_controller/cgi_process.rb
r4595 r4821 69 69 CGIMethods.parse_formatted_request_parameters(content_type, @env['RAW_POST_DATA']) 70 70 else 71 CGIMethods.parse_ request_parameters(@cgi.params)71 CGIMethods.parse_query_parameters(@env['RAW_POST_DATA'] || "") 72 72 end 73 73 end trunk/actionpack/test/controller/cgi_test.rb
r4820 r4821 28 28 29 29 def test_deep_query_string 30 assert_equal({'x' => {'y' => {'z' => '10'}}}, CGIMethods.parse_query_parameters('x[y][z]=10')) 30 expected = {'x' => {'y' => {'z' => '10'}}} 31 assert_equal(expected, CGIMethods.parse_query_parameters('x[y][z]=10')) 32 assert_equal("10", CGIMethods.parse_query_parameters('x[y][z]=10')[:x][:y][:z]) 31 33 end 32 34 … … 39 41 assert_equal({'x' => {'y' => [{'z' => '10'}]}}, CGIMethods.parse_query_parameters('x[y][][z]=10')) 40 42 assert_equal({'x' => {'y' => [{'z' => '10', 'w' => '10'}]}}, CGIMethods.parse_query_parameters('x[y][][z]=10&x[y][][w]=10')) 41 assert_equal({'x' => [{'y' => {'z' => '10', 'w' => '10'}}]}, CGIMethods.parse_query_parameters('x[][y][z]=10&x[][y][w]=10'))42 43 end 43 44