Prev: FAQ 1.15 Where can I get a list of Larry Wall witticisms?
Next: FAQ 4.20 How do I unescape a string?
From: Frédéric Perrin on 5 Feb 2010 17:45 Hello list, I want to talk to an XML RPC service over ip6 (the server doesn't listen over ip4). However, with the three modules I tried so far (XML::RPC, RPC::XML, Frontier::RPC::Client), it tries to do the request over ip4, even though the hostname I gave only resolve to ip6. I know for a fact that it should work, as the same script in Python works. Actually, all of this is happening in fBSD jails ; if I "tcpdump -v -i lo0 port 6800", I see the request going to some other ip4 (the ip4 address of the jail in which the Perl script is running), so of course the connection fails. ; this last bit of information may be of a low entropy, since it really shouldn't matter. So, how can I use Perl to make XML RPC calls to an ip6 server? For instance : % host perso.priv.fperrin.net perso.priv.fperrin.net has IPv6 address fd93:c8e5:9cb3::3 % cat ariactl.pl use strict; use warnings; use Frontier::Client; my $ariactl = Frontier::Client->new(url => "http://user:PaSSw0rd\@perso.priv.fperrin.net:6800/rpc"); my $v = $ariactl->call("getVersion"); print $v; % perl ariactl.pl 500 Can't connect to perso.priv.fperrin.net:6800 (connect: Connection refused) zsh: exit 61 perl ariactl.pl % cat ariactl.cmdline.py from xmlrpclib import ServerProxy aria2 = ServerProxy("http://user:PaSSw0rd(a)perso.priv.fperrin.net:6800/rpc").aria2 v = aria2.getVersion() print v % python ariactl.cmdline.py {'version': '1.8.1', 'enabledFeatures': ['BitTorrent', 'GZip', 'HTTPS', 'Message Digest', 'Metalink', 'XML-RPC']} -- Fred
From: Frédéric Perrin on 8 Feb 2010 13:14
Le Vendredi 05 à 23:45, Frédéric Perrin a écrit : > I want to talk to an XML RPC service over ip6 (the server doesn't > listen over ip4). However, with the three modules I tried so far > (XML::RPC, RPC::XML, Frontier::RPC::Client), it tries to do the > request over ip4, even though the hostname I gave only resolve to > ip6. A (the?) solution is to « use Net::INET6Glue::INET_is_INET6 » before use()ing the actual XML RPC module. It worked with all the three modules I tried. Question: why isn't this the default, in 2010? -- Fred |