{"action":"created","issue":{"url":"https://api.github.com/repos/excon/excon/issues/384","labels_url":"https://api.github.com/repos/excon/excon/issues/384/labels{/name}","comments_url":"https://api.github.com/repos/excon/excon/issues/384/comments","events_url":"https://api.github.com/repos/excon/excon/issues/384/events","html_url":"https://github.com/excon/excon/issues/384","id":33155215,"number":384,"title":"Excon doesn't work with :uri_parser  => Addressable::URI","user":{"login":"dentarg","id":42626,"avatar_url":"https://avatars.githubusercontent.com/u/42626?v=3","gravatar_id":"","url":"https://api.github.com/users/dentarg","html_url":"https://github.com/dentarg","followers_url":"https://api.github.com/users/dentarg/followers","following_url":"https://api.github.com/users/dentarg/following{/other_user}","gists_url":"https://api.github.com/users/dentarg/gists{/gist_id}","starred_url":"https://api.github.com/users/dentarg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dentarg/subscriptions","organizations_url":"https://api.github.com/users/dentarg/orgs","repos_url":"https://api.github.com/users/dentarg/repos","events_url":"https://api.github.com/users/dentarg/events{/privacy}","received_events_url":"https://api.github.com/users/dentarg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/excon/excon/milestones/1","html_url":"https://github.com/excon/excon/milestones/1.0.0","labels_url":"https://api.github.com/repos/excon/excon/milestones/1/labels","id":362904,"number":1,"title":"1.0.0","description":"We should ship a 1.0.0. This tracks what remaining todos.","creator":{"login":"geemus","id":4138,"avatar_url":"https://avatars.githubusercontent.com/u/4138?v=3","gravatar_id":"","url":"https://api.github.com/users/geemus","html_url":"https://github.com/geemus","followers_url":"https://api.github.com/users/geemus/followers","following_url":"https://api.github.com/users/geemus/following{/other_user}","gists_url":"https://api.github.com/users/geemus/gists{/gist_id}","starred_url":"https://api.github.com/users/geemus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geemus/subscriptions","organizations_url":"https://api.github.com/users/geemus/orgs","repos_url":"https://api.github.com/users/geemus/repos","events_url":"https://api.github.com/users/geemus/events{/privacy}","received_events_url":"https://api.github.com/users/geemus/received_events","type":"User","site_admin":false},"open_issues":21,"closed_issues":11,"state":"open","created_at":"2013-06-24T20:26:14Z","updated_at":"2014-12-04T15:21:40Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2014-05-09T08:50:07Z","updated_at":"2015-09-17T08:14:34Z","closed_at":null,"body":"Just wanted to let you know about this (and help others who stumble upon the same error).\r\n\r\nExcon doesn't work with `:uri_parser  => Addressable::URI`, here's the error:\r\n\r\n```ruby\r\n[1] pry(main)> require 'excon'\r\n=> true\r\n[2] pry(main)> require 'addressable/uri'\r\n=> true\r\n[3] pry(main)>\r\n[4] pry(main)> url = \"http://www.google.com\"\r\n=> \"http://www.google.com\"\r\n[5] pry(main)>\r\n[6] pry(main)> connection = Excon.new(\r\n[6] pry(main)*   url,\r\n[6] pry(main)*   :uri_parser  => Addressable::URI,\r\n[6] pry(main)* )\r\n=> #<Excon::Connection:7fe7e1ca2850 @data={:chunk_size=>1048576, :ciphers=>\"HIGH:!SSLv2:!aNULL:!eNULL:!3DES\", :connect_timeout=>60, :debug_request=>false, :debug_response=>false, :headers=>{\"User-Agent\"=>\"excon/0.33.0\"}, :idempotent=>false, :instrumentor_name=>\"excon\", :middlewares=>[Excon::Middleware::ResponseParser, Excon::Middleware::Expects, Excon::Middleware::Idempotent, Excon::Middleware::Instrumentor, Excon::Middleware::Mock], :mock=>false, :nonblock=>true, :omit_default_port=>false, :persistent=>false, :read_timeout=>60, :retry_limit=>4, :ssl_verify_peer=>true, :tcp_nodelay=>false, :uri_parser=>Addressable::URI, :write_timeout=>60, :host=>\"www.google.com\", :path=>\"\", :port=>nil, :query=>nil, :scheme=>\"http\", :user=>nil, :password=>nil} @socket_key=\"http://www.google.com\">\r\n[7] pry(main)> connection.get\r\nExcon::Errors::SocketError: Can't assign requested address - connect(2) (Errno::EADDRNOTAVAIL)\r\nfrom /Users/dentarg/.gem/ruby/2.0.0/gems/excon-0.33.0/lib/excon/socket.rb:202:in `connect_nonblock'\r\n```\r\n\r\nIt's becuase `Addressable::URI.parse` doesn't return the port number as `URI.parse` does.\r\n\r\n```ruby\r\n[9] pry(main)> URI.parse(url).port\r\n=> 80\r\n[10] pry(main)>\r\n[11] pry(main)> Addressable::URI.parse(url).port\r\n=> nil\r\n```\r\n\r\nThis was deliberately choice by addressable, see https://github.com/sporkmonger/addressable/issues/90. Faraday seems to have the same problem: https://github.com/lostisland/faraday/issues/318"},"comment":{"url":"https://api.github.com/repos/excon/excon/issues/comments/140999880","html_url":"https://github.com/excon/excon/issues/384#issuecomment-140999880","issue_url":"https://api.github.com/repos/excon/excon/issues/384","id":140999880,"user":{"login":"sandstrom","id":122287,"avatar_url":"https://avatars.githubusercontent.com/u/122287?v=3","gravatar_id":"","url":"https://api.github.com/users/sandstrom","html_url":"https://github.com/sandstrom","followers_url":"https://api.github.com/users/sandstrom/followers","following_url":"https://api.github.com/users/sandstrom/following{/other_user}","gists_url":"https://api.github.com/users/sandstrom/gists{/gist_id}","starred_url":"https://api.github.com/users/sandstrom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sandstrom/subscriptions","organizations_url":"https://api.github.com/users/sandstrom/orgs","repos_url":"https://api.github.com/users/sandstrom/repos","events_url":"https://api.github.com/users/sandstrom/events{/privacy}","received_events_url":"https://api.github.com/users/sandstrom/received_events","type":"User","site_admin":false},"created_at":"2015-09-17T08:14:34Z","updated_at":"2015-09-17T08:14:34Z","body":"Just wanted to chime in and say that Excon is a dream to use, so in general I'm super-happy with it :smile: \r\n\r\nBut I also hit this issue just now. The fix is easy of course, but Excon would be even more pleasant to use if this would work smoother :)"}}