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

Comments

Projects
None yet
2 participants
@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 from IPV6 addresses doesn't work as host to IPV6 address doesn't work as host Mar 1, 2016

@michaelklishin michaelklishin changed the title from IPV6 address doesn't work as host to Host:port parsing breaks IPv6 addresses Mar 1, 2016

@Ladas Ladas referenced this issue Mar 1, 2016

Merged

Update Bunny gem #6857

michaelklishin added a commit that referenced this issue Apr 4, 2016

Support IPv6 addresses in address lists (see below for limitations)
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