[Rt-commit] r19643 - rt/3.8/branches/forward-message-encoding/share/html/Ticket/Attachment/WithHeaders
falcone at bestpractical.com
falcone at bestpractical.com
Tue May 12 18:09:19 EDT 2009
Author: falcone
Date: Tue May 12 18:09:19 2009
New Revision: 19643
Modified:
rt/3.8/branches/forward-message-encoding/share/html/Ticket/Attachment/WithHeaders/dhandler
Log:
19552: elacour | 2009-05-07 03:33:31 -0400
When downloading message with headers, try to add charset information to
content_type so the raw message is displayed correctly in browser.
Modified: rt/3.8/branches/forward-message-encoding/share/html/Ticket/Attachment/WithHeaders/dhandler
==============================================================================
--- rt/3.8/branches/forward-message-encoding/share/html/Ticket/Attachment/WithHeaders/dhandler (original)
+++ rt/3.8/branches/forward-message-encoding/share/html/Ticket/Attachment/WithHeaders/dhandler Tue May 12 18:09:19 2009
@@ -59,8 +59,16 @@
Abort("Couldn't load attachment #$id");
}
+ my $content_type = 'text/plain';
+ if ( my $enc = $AttachmentObj->OriginalEncoding ) {
+ # normalize Encode.pm convention with IANA ones
+ $enc = 'big5' if $enc eq 'big5-eten';
+ $enc = 'utf-8' if $enc eq 'utf8';
+ $content_type .= ";charset=$enc";
+ }
+
# XXX: should we check handle html here and integrate headers into html?
- $r->content_type( 'text/plain' );
+ $r->content_type( $content_type );
$m->clear_buffer;
$m->out( $AttachmentObj->Headers );
$m->out( "\n\n" );
More information about the Rt-commit
mailing list