[Bps-public-commit] r18711 - in Net-IMAP-Server: lib/Net/IMAP/Server
alexmv at bestpractical.com
alexmv at bestpractical.com
Thu Mar 5 14:35:25 EST 2009
Author: alexmv
Date: Thu Mar 5 14:35:25 2009
New Revision: 18711
Modified:
Net-IMAP-Server/ (props changed)
Net-IMAP-Server/lib/Net/IMAP/Server/Message.pm
Log:
r42873 at kohr-ah: chmrr | 2009-03-05 14:25:13 -0500
* Always return un-decoded headers to the client. Reported by Jan
Dvorak <jdvorak at uikt.mendelu.cz>
Modified: Net-IMAP-Server/lib/Net/IMAP/Server/Message.pm
==============================================================================
--- Net-IMAP-Server/lib/Net/IMAP/Server/Message.pm (original)
+++ Net-IMAP-Server/lib/Net/IMAP/Server/Message.pm Thu Mar 5 14:35:25 2009
@@ -378,7 +378,7 @@
my $copy = Email::Simple::Header->new("");
for my $h ( @{$extras || []} ) {
$copy->header_set( $case{$h}
- || $h => $mime_header->header($h) );
+ || $h => $mime_header->header_raw($h) );
}
$result = $copy->as_string ? $copy->as_string . "\r\n" : "";
} elsif ( uc $_ eq "TEXT" ) {
@@ -450,8 +450,8 @@
]
: undef
),
- scalar $mime->header("Content-Language"),
- scalar $mime->header("Content-Location"),
+ scalar $mime->header_raw("Content-Language"),
+ scalar $mime->header_raw("Content-Location"),
)
: ()
),
@@ -470,24 +470,24 @@
? [ %{ $data->{attributes} } ]
: undef
),
- scalar $mime->header("Content-ID"),
- scalar $mime->header("Content-Description"),
- ( scalar $mime->header("Content-Transfer-Encoding") or "7BIT" ),
+ scalar $mime->header_raw("Content-ID"),
+ scalar $mime->header_raw("Content-Description"),
+ ( scalar $mime->header_raw("Content-Transfer-Encoding") or "7BIT" ),
length $body,
( defined $lines
? ( $lines, )
: ()
),
( $long
- ? ( scalar $mime->header("Content-MD5"),
+ ? ( scalar $mime->header_raw("Content-MD5"),
( $disposition
? [ $disposition,
( $attrs && %{$attrs} ? [ %{$attrs} ] : undef ),
]
: undef
),
- scalar $mime->header("Content-Language"),
- scalar $mime->header("Content-Location"),
+ scalar $mime->header_raw("Content-Language"),
+ scalar $mime->header_raw("Content-Location"),
)
: ()
),
@@ -515,7 +515,7 @@
{ type => "string", value => $_->user },
{ type => "string", value => $_->host }
]
- } Email::Address->parse( $mime->header($header) )
+ } Email::Address->parse( $mime->header_raw($header) )
];
}
@@ -531,8 +531,8 @@
my $mime = $self->mime_header;
return [
- scalar $mime->header("Date"),
- scalar $mime->header("Subject"),
+ scalar $mime->header_raw("Date"),
+ scalar $mime->header_raw("Subject"),
$self->address_envelope("From"),
$self->address_envelope(
@@ -545,8 +545,8 @@
$self->address_envelope("Cc"),
$self->address_envelope("Bcc"),
- scalar $mime->header("In-Reply-To"),
- scalar $mime->header("Message-ID"),
+ scalar $mime->header_raw("In-Reply-To"),
+ scalar $mime->header_raw("Message-ID"),
];
}
More information about the Bps-public-commit
mailing list