Closed glebtv closed 8 years ago
Addressable::URI returns nil for port, if it is not provided in an URI So, .default_port should be used instead
.default_port
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
Can you add a test case for this case? It's not clear to me what impact this has on other parts of the code, which is also accessing uri.port.
uri.port
Resolved in https://github.com/igrigorik/em-http-request/commit/74efe8e3447ee16a22d00fa9cf1d0224dae09db7, closing.
Addressable::URI returns nil for port, if it is not provided in an URI So,
.default_port
should be used insteadBecause of this, URIs without port part do not work with SOCKS proxies.
Ref: https://github.com/sporkmonger/addressable/issues/179