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

Ipv6 support #34

Merged
merged 3 commits into from
Apr 13, 2011
Merged

Ipv6 support #34

merged 3 commits into from
Apr 13, 2011

Conversation

fdmanana
Copy link
Contributor

Hi Chandru,

Haven't tested it yet, but I think this is a useful addition.

Have you already tried using ibrowse against an IPv6-only host? Sometimes the user may be clueless about whether the remote host is IPv6-only or not, so detecting that and adding the int6 parameter if necessary seems reasonable to do.

regards

@cmullaparthi
Copy link
Owner

Looks good Filipe, I'll try testing it and include it after that. I'll
probably also look into how the built in HTTP client deals with IPv6.

cheers
Chandru

On 16 March 2011 18:35, fdmanana <
reply@reply.github.com>wrote:

Hi Chandru,

Haven't tested it yet, but I think this is a useful addition.

Have you already tried using ibrowse against an IPv6-only host? Sometimes
the user may be clueless about whether the remote host is IPv6-only or not,
so detecting that and adding the int6 parameter if necessary seems
reasonable to do.

regards

Reply to this email directly or view it on GitHub:
#34

@fdmanana
Copy link
Contributor Author

One last finding, is that ibrowse_lib:parse_url/1 doesn't parse IPv6 address - once it finds ":" it assumes that what follows is a port number.
I haven't had the time yet to change it, but in the meanwhile I found some code that does the parsing of IPv6 addresses:

http://stuff.mit.edu/afs/athena/software/erlang_vR12B-3/lib/erlang/lib/kernel-2.12.3/src/inet_parse.erl

It's just a matter of integrating it :)

@fdmanana
Copy link
Contributor Author

Ah and here is an interesting discussion about URL parsing with IPv6 address literals and port numbers:

http://lists.w3.org/Archives/Public/www-talk/1996JulAug/0088.html

Will try it when I get the time, possibly not anytime soon.

@cmullaparthi
Copy link
Owner

Thanks for digging all this out! I'll see if I can do it myself, otherwise I
will graciously accept a patch :)

cheers
Chandru

On 30 March 2011 12:25, fdmanana <
reply@reply.github.com>wrote:

Ah and here is an interesting discussion about URL parsing with IPv6
address literals and port numbers:

http://lists.w3.org/Archives/Public/www-talk/1996JulAug/0088.html

Will try it when I get the time, possibly not anytime soon.

Reply to this email directly or view it on GitHub:
#34 (comment)

inet:gethostbyname/1 might fail for IPv6 literals, therefore check first
if host is an IPv6 address literal.
@fdmanana
Copy link
Contributor Author

Hi again Chandru,

I just added support for IPv6 literals in hostnames when using ibrowse_lib:parse_url/1

Commits

fdmanana@3367f00

and

fdmanana@f5640f5

Note that I added a new eunit test for ibrowse_lib:parse_url/1, somehow it feels more natural (and standard) than adding it to ibrowse_test.erl.

Let me know what you think.

cheers

@cmullaparthi cmullaparthi merged commit f5640f5 into cmullaparthi:master Apr 13, 2011
PKRoma pushed a commit to PKRoma/couchdb that referenced this pull request Nov 19, 2013
This change upgrades ibrowse to version 2.2.0. This version adds support
for IPv6 (cmullaparthi/ibrowse#34).
This is part of COUCHDB-665.



git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1091709 13f79535-47bb-0310-9956-ffa450edef68
asfgit pushed a commit to apache/couchdb-ibrowse that referenced this pull request Feb 12, 2014
This change upgrades ibrowse to version 2.2.0. This version adds support
for IPv6 (cmullaparthi/ibrowse#34).
This is part of COUCHDB-665.



git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1091709 13f79535-47bb-0310-9956-ffa450edef68
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants