You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ perl6 -e 'say so IO::Socket::INET.new( :host<127.0.0.1>, :port(80));'
True
perl6 -e 'say so IO::Socket::INET.new( :host<127.0.0.1>, :port(80) :family(3));'
True
$ perl6 -e 'say so IO::Socket::INET.new( :host<::1>, :port(80) :family(3));'
True
$ perl6 -e 'say so IO::Socket::INET.new( :host<::1>, :port(80));'
Failed to resolve host name
in block <unit> at -e line 1
The :host<> of IO::Socket::INET should be agnostic as to IP protocol version.
When given a hostname (or IPv*) there is no distinction between the versions.
The current behavior will cause mysterious failures and is not consistent.
This happens because of how IO::Socket::INET attempts to split a port from the hostname of new sockets. Unless PF_INET6 is specified as a family, it will handle IPv6 addresses like IPv4 ones instead. Fixing this would just be a matter of writing up a regex that can handle both, I think.
Migrated from rt.perl.org#131553 (status was 'new')
Searchable as RT131553$
The text was updated successfully, but these errors were encountered: