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;
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to