Re: URI 1.03 fails selftest
Ben Laurie (ben@algroup.co.uk)
Thu, 22 Jul 1999 16:16:20 +0100
Gisle Aas wrote:
>
> Ben Laurie <ben@algroup.co.uk> writes:
>
> > The following patch fixes it:
> >
> > --- t/heuristic.t.orig Tue Jul 20 14:46:56 1999
> > +++ t/heuristic.t Tue Jul 20 14:45:14 1999
> > @@ -40,7 +40,7 @@
> > if (gethostbyname("www.netscape.com")) {
> > # DNS probably work, lets run test 6..8
> >
> > - $URI::Heuristic::MY_COUNTRY = "no";
> > + $URI::Heuristic::MY_COUNTRY = undef;
> > print "not " unless uf_urlstr("perl/camel.gif") eq
> > "http://www.perl.com/camel.gif";
> > print "ok 6\n";
> >
> > "no" is Norway, of course...
>
> What did this patch fix. This test rely on the fact that
> 'www.perl.no' can't be resolved.
Ah, OK, I misunderstood. The problem is that SOCKS interferes with this
kind of test, because it resolves unknown DNS to a fake IP and then
tries to resolve on the SOCKS server. I have to use SOCKS to run CPAN
through my firewall, so CPAN refuses to install this because the
self-test fails.
Now that I know what the problem is, the behaviour can be switched off
by setting the environment variable SOCKS5_LOCALDNSONLY=yes - a note to
that effect might be useful (or at least a note that says what the test
is testing!
Cheers,
Ben.
--
http://www.apache-ssl.org/ben.html
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
- Indira Gandhi