savonrb / httpi

Common interface for Ruby's HTTP clients
http://httpirb.com
MIT License
300 stars 150 forks source link

2.1.0 incompatible with Excon 0.16.10 #110

Closed jackrg closed 10 years ago

jackrg commented 10 years ago

When attempting a call to Get, I get the following error and traceback:

/Users/jackrg/.rbenv/versions/1.9.2-p290/lib/ruby/1.9.1/uri/common.rb:156:in 'split': bad URI(is not URI?): {:host=>"webservices.amazon.com", :path=>"/onca/xml", :port=>"80", :query=>"AWSAccessKeyId=...&AssociateTag=...&ItemId=...&Operation=ItemLookup&ResponseGroup=Medium&Service=AWSECommerceService&Timestamp=2014-03-25T22%3A56%3A57Z&Version=2011-08-01&Signature=...", :scheme=>"http", :headers=>{}, :body=>nil, :ssl_verify_peer=>true} (URI::InvalidURIError) from /Users/jackrg/.rbenv/versions/1.9.2-p290/lib/ruby/1.9.1/uri/common.rb:174:in 'parse' from /Users/jackrg/.rbenv/versions/1.9.2-p290/lib/ruby/1.9.1/uri/common.rb:628:in 'parse' from /Users/jackrg/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/excon-0.16.10/lib/excon/connection.rb:20:in 'initialize' from /Users/jackrg/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/httpi-2.1.0/lib/httpi/adapter/excon.rb:17:in 'new' from /Users/jackrg/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/httpi-2.1.0/lib/httpi/adapter/excon.rb:17:in 'initialize' from /Users/jackrg/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/httpi-2.1.0/lib/httpi.rb:192:in 'new' from /Users/jackrg/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/httpi-2.1.0/lib/httpi.rb:192:in 'load_adapter' from /Users/jackrg/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/httpi-2.1.0/lib/httpi.rb:135:in 'request' from /Users/jackrg/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/httpi-2.1.0/lib/httpi.rb:106:in 'get'

I'm actually using ASIN, which depends on HTTPI, but troubleshooting indicated that the problem occurred in the call from the HTTPI excon adapter to excon itself. I'm guessing the problem is version-based. Note that the error indicates that the URI is a hash, not a string (as URI.split requires).

rogerleite commented 10 years ago

Hi @jackrg!

Unfortunately, this is a known issue :disappointed:. You have two options:

You can find more information about this issue on #101

Hope that helps!

phoet commented 10 years ago

just for the reference: https://github.com/phoet/asin/issues/34

@jackrg have a look at github-markdown for how to format your issues :page_facing_up: