igrigorik / em-http-request

Asynchronous HTTP Client (EventMachine + Ruby)
1.22k stars 222 forks source link

Literal IPv6 address support #304

Closed foca closed 4 years ago

foca commented 8 years ago

Right now, creating a request with a literal IPv6 address will fail, because URI#host does not unwrap the brackets from the URI.

I tried to come up with a patch. This works when tested in IRB but I'm not sure where to start with the tests as I'm not very familiar with EventMachine. Also not sure if I'm covering all the edge cases (I just searched for every call to URI#host and changed that for #hostname.)

https://github.com/lostisland/faraday/pull/621 has some more context on this.

igrigorik commented 8 years ago

@foca a good start is to apply the patch and make sure that existing tests still pass.

bundle install && bundle exec rake spec

From there, take a look at the client_spec and add a case or two for ipv6 case you're after.

igrigorik commented 7 years ago

@foca did you have any luck with the tests, etc? Would love to land this.

igrigorik commented 4 years ago

Resolved, closing.