Changeset 2375
- Timestamp:
- 09/27/05 22:23:37 (3 years ago)
- Files:
-
- trunk/actionpack/CHANGELOG (modified) (1 diff)
- trunk/actionpack/lib/action_controller/cgi_ext/cgi_methods.rb (modified) (1 diff)
- trunk/actionpack/test/controller/cgi_test.rb (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/CHANGELOG
r2368 r2375 1 1 *SVN* 2 3 * Tolerate consecutive delimiters in query parameters. #2295 [darashi@gmail.com] 2 4 3 5 * Streamline render process, code cleaning. Closes #2294. [skae] trunk/actionpack/lib/action_controller/cgi_ext/cgi_methods.rb
r2345 r2375 12 12 13 13 query_string.split(/[&;]/).each { |p| 14 # Ignore repeated delimiters. 15 next if p.empty? 16 14 17 k, v = p.split('=',2) 15 18 v = nil if (v && v.empty?) trunk/actionpack/test/controller/cgi_test.rb
r2345 r2375 15 15 @query_string_with_many_equal = "action=create_customer&full_name=abc=def=ghi" 16 16 @query_string_without_equal = "action" 17 @query_string_with_many_ampersands = 18 "&action=create_customer&&&full_name=David%20Heinemeier%20Hansson" 17 19 end 18 20 … … 67 69 ) 68 70 end 69 71 72 def test_query_string_with_many_ampersands 73 assert_equal( 74 { "action" => "create_customer", "full_name" => "David Heinemeier Hansson"}, 75 CGIMethods.parse_query_parameters(@query_string_with_many_ampersands) 76 ) 77 end 78 70 79 def test_parse_params 71 80 input = {