[rt-devel] Strange attachment parsing

Autrijus Tang autrijus at autrijus.org
Wed Jun 11 08:24:32 EDT 2003


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 patch below and see if it works?

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/631adbab/attachment-0001.pgp


More information about the Rt-devel mailing list