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

sparky sparky at pld-linux.org
Thu Sep 17 23:46:25 CEST 2009


Author: sparky
Date: Thu Sep 17 23:46:25 2009
New Revision: 10619

Modified:
   toys/rsget.pl/RSGet/Curl.pm
Log:
- allow attachment; filename*=UTF-8


Modified: toys/rsget.pl/RSGet/Curl.pm
==============================================================================
--- toys/rsget.pl/RSGet/Curl.pm	(original)
+++ toys/rsget.pl/RSGet/Curl.pm	Thu Sep 17 23:46:25 2009
@@ -155,7 +155,11 @@
 	}
 
 	my $fname;
-	if ( $supercurl->{head} =~ /^Content-Disposition:\s*attachment;\s*filename\s*=\s*"?(.+?)"?;?\s*$/mi ) {
+	if ( $supercurl->{head} =~
+			/^Content-Disposition:\s*attachment;\s*filename\*=UTF-8''(.+?);?\s*$/mi ) {
+		$fname = de_ml( uri_unescape( $1 ) );
+	} elsif ( $supercurl->{head} =~
+			/^Content-Disposition:\s*attachment;\s*filename\s*=\s*"?(.+?)"?;?\s*$/mi ) {
 		$fname = de_ml( uri_unescape( $1 ) );
 	} else {
 		my $eurl = $curl->getinfo( CURLINFO_EFFECTIVE_URL );


More information about the pld-cvs-commit mailing list