SVN: toys/rsget.pl/RSGet/Curl.pm
sparky
sparky at pld-linux.org
Wed Oct 21 21:28:40 CEST 2009
Author: sparky
Date: Wed Oct 21 21:28:40 2009
New Revision: 10796
Modified:
toys/rsget.pl/RSGet/Curl.pm
Log:
- better warnings in content-disposition
Modified: toys/rsget.pl/RSGet/Curl.pm
==============================================================================
--- toys/rsget.pl/RSGet/Curl.pm (original)
+++ toys/rsget.pl/RSGet/Curl.pm Wed Oct 21 21:28:40 2009
@@ -185,18 +185,19 @@
{
# TODO: actually read rfc2183 and rfc2184
local $_ = shift;
+ my $src = $_;
s/\s*;?\s+$//; # remove at least last \r
unless ( s/^\s*attachment;\s*// ) {
- warn "Not an attachment in C-D: '$_'\n" if verbose( 1 );
+ warn "Not an attachment in C-D: '$src'\n" if verbose( 1 );
return;
}
unless ( s/^(.*?\s+)?filename// ) {
- warn "No filename in C-D: '$_'\n" if verbose( 1 );
+ warn "No filename in C-D: '$src'\n" if verbose( 1 );
return;
}
if ( s/^\*=(.+?)('.*?')// ) {
- warn "C-D: Unknown filename encoding: $1 $2\n"
+ warn "C-D: Unknown filename encoding: $1 $2, at $src\n"
if uc $1 ne "UTF-8" and verbose( 1 );
s/\s+.*//;
return $_;
@@ -204,7 +205,7 @@
return unless s/^\s*=\s*//;
if ( s/^"// ) {
unless ( s/".*// ) {
- warn "C-D: Broken filename: \"$_\n"
+ warn "C-D: Broken filename: $src\n"
if verbose( 1 );
return;
}
More information about the pld-cvs-commit
mailing list