igrigorik/em-http-request — pull request #278 by glebtv (2014-12-06 14:49:08+00:00)
Title: Pass default port if port is nil

Addressable::URI returns nil for port, if it is not provided in an URI
So, ```.default_port``` should be used instead

Because of this, URIs without port part do not work with SOCKS proxies.

> Addressable::URI.parse('http://test.ru').port
=> nil
> Addressable::URI.parse('http://test.ru').default_port
=> 80

Ref: https://github.com/sporkmonger/addressable/issues/179