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

sparky sparky at pld-linux.org
Fri Jul 23 18:59:54 CEST 2010


Author: sparky
Date: Fri Jul 23 18:59:54 2010
New Revision: 11695

Modified:
   toys/rsget.pl/RSGet/Curl.pm
Log:
- allow setting arbitrary options in curl


Modified: toys/rsget.pl/RSGet/Curl.pm
==============================================================================
--- toys/rsget.pl/RSGet/Curl.pm	(original)
+++ toys/rsget.pl/RSGet/Curl.pm	Fri Jul 23 18:59:54 2010
@@ -218,6 +218,11 @@
 		$curl->setopt( CURLOPT_WRITEFUNCTION, \&body_scalar );
 		$curl->setopt( CURLOPT_WRITEDATA, \$supercurl->{body} );
 	}
+	if ( my $curlopts = $opts{curlopts} ) {
+		while ( my ( $key, $val ) = each %$curlopts ) {
+			$curl->setopt( $key, $val );
+		}
+	}
 
 	if ( $opts{keep_referer} or $opts{keep_ref} ) {
 		$supercurl->{keep_referer} = 1;


More information about the pld-cvs-commit mailing list