From 34ef3a5af93540ae61c8d69a33e02004e5d0634c Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Wed, 16 Feb 2005 10:36:49 +0000 Subject: Remove curl 7.12.2 bug workaround --- urpm/download.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'urpm/download.pm') diff --git a/urpm/download.pm b/urpm/download.pm index 23b2d273..8de73e07 100644 --- a/urpm/download.pm +++ b/urpm/download.pm @@ -341,15 +341,15 @@ sub sync_curl { $file = shift @l; propagate_sync_callback($options, 'start', $file); } - if (my ($percent, $total, $eta, $speed) = $buf =~ /^\s*(\d+)\s+(\S+)[^\r\n]*\s+(\S+)\s+-?(\S+)\s*[\r\n]$/ms) { + if (my ($percent, $total, $eta, $speed) = $buf =~ /^\s*(\d+)\s+(\S+)[^\r\n]*\s+(\S+)\s+(\S+)\s*[\r\n]$/ms) { + $speed =~ s/^-//; if (propagate_sync_callback($options, 'progress', $file, $percent, $total, $eta, $speed) eq 'canceled') { kill 15, $curl_pid; close $curl; return; } - #- this regexp checks that download has actually started - #- (work around a bug in curl 7.12.2 output when 302 answers are involved) - if ($_ eq "\n" && ($percent == 100 || $buf !~ /--:--:--/)) { + #- this checks that download has actually started + if ($_ eq "\n") { propagate_sync_callback($options, 'end', $file); $file = undef; } -- cgit v1.2.1