summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2004-02-19 13:59:21 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2004-02-19 13:59:21 +0000
commit59f3be2c866a49ba027a3b2c0d0e2cf473478919 (patch)
tree1935d136f5089dc0317107158ca6cd6318d76c86
parent57499a60e78b61f5acd5c6ef5c00ee117b54950a (diff)
downloaddrakx-backup-do-not-use-59f3be2c866a49ba027a3b2c0d0e2cf473478919.tar
drakx-backup-do-not-use-59f3be2c866a49ba027a3b2c0d0e2cf473478919.tar.gz
drakx-backup-do-not-use-59f3be2c866a49ba027a3b2c0d0e2cf473478919.tar.bz2
drakx-backup-do-not-use-59f3be2c866a49ba027a3b2c0d0e2cf473478919.tar.xz
drakx-backup-do-not-use-59f3be2c866a49ba027a3b2c0d0e2cf473478919.zip
- don't resolv host, it breaks virtual servers configs
- log when we don't receive a 200
-rw-r--r--perl-install/http.pm9
1 files 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;