Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removing query parameter sorting from nonrails normalizer.

  • Loading branch information...
commit 615f9b297389ba29d01469e1ff38830b9af9906c 1 parent 7feb028
Billiam Billiam authored
Showing with 3 additions and 3 deletions.
  1. +1 −1  lib/httparty/request.rb
  2. +2 −2 spec/httparty/request_spec.rb
2  lib/httparty/request.rb
View
@@ -23,7 +23,7 @@ class Request #:nodoc:
else
HashConversions.to_params(key => value)
end
- end.flatten.sort.join('&')
+ end.flatten.join('&')
end
attr_accessor :http_method, :options, :last_response, :redirect, :last_uri
4 spec/httparty/request_spec.rb
View
@@ -17,7 +17,7 @@
it "doesn't include brackets" do
query_string = normalizer[{:page => 1, :foo => %w(bar baz)}]
- URI.unescape(query_string).should == "foo=bar&foo=baz&page=1"
+ URI.unescape(query_string).should == "page=1&foo=bar&foo=baz"
end
it "URI encodes array values" do
@@ -156,7 +156,7 @@
@request.options[:body] = {:page => 1, :foo => %w(bar baz)}
@request.send(:setup_raw_request)
body = @request.instance_variable_get(:@raw_request).body
- URI.unescape(body).should == "foo=bar&foo=baz&page=1"
+ URI.unescape(body).should == "page=1&foo=bar&foo=baz"
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.