[rt-devel] Strange attachment parsing
Dmitry Sivachenko
mitya at cavia.pp.ru
Wed Jun 11 08:44:02 EDT 2003
On Wed, Jun 11, 2003 at 08:24:00PM +0800, Autrijus Tang wrote:
> On Wed, Jun 11, 2003 at 11:02:37AM +0400, Dmitry Sivachenko wrote:
> > > On Wed, Jun 11, 2003 at 10:26:59AM +0400, Dmitry Sivachenko wrote:
> > > I presume you've tested this with 3.0.3pre3 to verify that it's still
> > > broken?
> > Yes, the same situation with 3.0.3pre3.
>
> The fix here would be to amend Action/SendEmail.pm lines 160 to
> respect OriginalEncoding and OriginalContent, in the same way
> as html/Ticket/Attachment/dhandler lines 52.
>
> Would you please try testing the attached patch and see if it works?
It seems to works right.
Thank you very much!!
>
> Thanks,
> /Autrijus/
>
> Change 6448 by autrijus at autribsd on 2003/06/11 12:17:35
>
> * try to fix text/plain attachment's recoding,
> as reported by Dmitry Sivachenko.
>
> Affected files ...
>
> ... //depot/RT/rt/lib/RT/Action/SendEmail.pm#37 edit
>
> Differences ...
>
> ==== //depot/RT/rt/lib/RT/Action/SendEmail.pm#37 (text) ====
>
> @@ -151,14 +151,15 @@
> while ( my $attach = $attachments->Next ) {
>
> # Don't attach anything blank
> - next unless ( $attach->Content );
> + next unless ( $attach->ContentLength );
>
> # We want to make sure that we don't include the attachment that's being sued as the "Content" of this message"
> next
> if ( $transaction_content_obj
> && $transaction_content_obj->Id == $attach->Id );
> $MIMEObj->attach( Type => $attach->ContentType,
> - Data => $attach->Content,
> + Charset => $attach->OriginalEncoding,
> + Data => $attach->OriginalContent,
> Filename => $attach->Filename );
> }
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://pallas.eruditorum.org/pipermail/rt-devel/attachments/20030611/dc93ee4e/attachment.pgp
More information about the Rt-devel
mailing list