Commits

Sean Cribbs committed 0e46e15

Query-string wonkiness is fixed in Excon now.

  • Participants
  • Parent commits ec4b118

Comments (0)

Files changed (2)

riak-client/Gemfile

 gem 'rack', '>=1.0'
 gem 'rake'
 gem 'bundler'
-gem 'excon', "~>0.2.4"
+gem 'excon', "~>0.2.6"
 
 if defined? JRUBY_VERSION
   gem 'json'

riak-client/lib/riak/client/excon_backend.rb

       def self.configured?
         begin
           require 'excon'
-          true
+          Excon::VERSION >= "0.2.5"
         rescue LoadError
           false
         end
       def perform(method, uri, headers, expect, data=nil, &block)
         params = {:headers => RequestHeaders.new(headers)}
         params[:body] = data if [:put,:post].include?(method)
-        # Excon currently doesn't properly handle string query
-        # segment. Why?
-        if uri.query
-          q = uri.query.split('&').map {|kv| kv.split('=') }
-          uri.query = nil
-          params[:query] = {}
-          q.each do |pair|
-            params[:query][pair[0]] ||= []
-            params[:query][pair[0]] << pair[1]
-          end
-        end
-        # params[:idempotent] = (method != :post)
+        params[:idempotent] = (method != :post)
         response = Excon.send(method, uri.to_s, params, &block)
         if valid_response?(expect, response.status)
           response_headers.initialize_http_header(response.headers)