Subject: | PATCH: add support for RFC2231 filename encoding |
Adds support for allowing content-type header to have name*0*=, name*=
and name*0= without adding it's own name= section
Subject: | rfc2231.patch |
diff -Naur old/Sender.pm new/Sender.pm
--- old/Sender.pm 2008-07-15 06:44:08.000000000 +1000
+++ new/Sender.pm 2009-11-25 10:35:55.000000000 +1100
@@ -2228,7 +2228,7 @@
$self->{'socket'}->start_logging() if ($self->{'debug'} and $self->{'debug_level'} == 3);
- if ($fctype =~ /;\s*name=/) {
+ if (($fctype =~ /;\s*name=/) || ($fctype =~ /;\s*name\*0=/) || ($fctype =~ /;\s*name\*0\*=/) || ($fctype =~ /;\s*name\*=/)) {
print $s ("Content-type: $fctype\r\n");
} else {
print $s ("Content-type: $fctype; name=\"$name\"\r\n");