Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Host:port parsing breaks IPv6 addresses #383

Closed
Ladas opened this issue Mar 1, 2016 · 0 comments
Closed

Host:port parsing breaks IPv6 addresses #383

Ladas opened this issue Mar 1, 2016 · 0 comments

Comments

@Ladas
Copy link

@Ladas Ladas commented Mar 1, 2016

If we add IPV6 as host for connection it doesn't work, cause it parses address badly ending up with

WARN -- #<Bunny::Session:0x4d287b0 guest@2001:0, vhost=/, addresses=[2001:db8:fd00:1000::10]>: Could not establish TCP connection to 2001:0: Invalid argument - connect(2) for 0.0.7.209

I assume it's because of this code

address.split(":")[1].to_i

It parses last :

@Ladas Ladas changed the title IPV6 addresses doesn't work as host IPV6 address doesn't work as host Mar 1, 2016
@michaelklishin michaelklishin changed the title IPV6 address doesn't work as host Host:port parsing breaks IPv6 addresses Mar 1, 2016
michaelklishin added a commit that referenced this issue Apr 4, 2016
This requires IPv6 addresses to be enquoted in square brackets.
Fixes #383.

Credits: Jeremy Heiler.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.