SVN: toys/rsget.pl/RSGet/Curl.pm

sparky sparky at pld-linux.org
Sat Jun 5 03:00:36 CEST 2010


Author: sparky
Date: Sat Jun  5 03:00:35 2010
New Revision: 11539

Modified:
   toys/rsget.pl/RSGet/Curl.pm
Log:
- prevent warning in case of missing Content-length:


Modified: toys/rsget.pl/RSGet/Curl.pm
==============================================================================
--- toys/rsget.pl/RSGet/Curl.pm	(original)
+++ toys/rsget.pl/RSGet/Curl.pm	Sat Jun  5 03:00:35 2010
@@ -281,7 +281,7 @@
 	if ( my $f_len = $curl->getinfo( CURLINFO_CONTENT_LENGTH_DOWNLOAD ) ) {
 		$supercurl->{size_total} = $f_len;
 	}
-	if ( $supercurl->{size_total} <= 0 and $supercurl->{force_size} ) {
+	if ( ( $supercurl->{size_total} || 0 ) <= 0 and $supercurl->{force_size} ) {
 		$supercurl->{size_total} = $supercurl->{force_size};
 	}
 


More information about the pld-cvs-commit mailing list