From 59f3be2c866a49ba027a3b2c0d0e2cf473478919 Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Thu, 19 Feb 2004 13:59:21 +0000 Subject: - don't resolv host, it breaks virtual servers configs - log when we don't receive a 200 --- perl-install/http.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/perl-install/http.pm b/perl-install/http.pm index ac670691f..77ca5ad49 100644 --- a/perl-install/http.pm +++ b/perl-install/http.pm @@ -15,7 +15,6 @@ sub getFile { # can be used for ftp urls (with http proxy) my ($host, $port, $path) = $url =~ m,^(?:http|ftp)://([^/:]+)(?::(\d+))?(/\S*)?$,; - $host = resolv($host); my $use_http_proxy = $ENV{PROXY} && $ENV{PROXYPORT}; @@ -39,7 +38,13 @@ sub getFile { $now = $buf =~ /\012/; } until $now && $last; - $tmp =~ /^.*\b200\b/ ? $sock : undef; + $tmp =~ /^(.*\b(\d+)\b.*)/; + if ($2 == 200) { + $sock; + } else { + log::l("HTTP error: $1"); + undef; + } } 1; -- cgit v1.2.1