[rt-devel] Strange attachment parsing

Dmitry Sivachenko mitya at cavia.pp.ru
Wed Jun 11 09:42:27 EDT 2003


On Wed, Jun 11, 2003 at 08:24:32PM +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 patch below and see if it works?
> 
> 


Well, one more question:
Now attachment

Content-Type: text/plain;
        charset="koi8-r"
Content-Transfer-Encoding: quoted-printable

becomes

Content-Type: text/plain; charset="koi8-r"
Content-Disposition: inline
Content-Transfer-Encoding: binary


Wouldn't it be more sane to send it with
Content-Transfer-Encoding=queted-printable instead of 'binary'?

Thanks!



> 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/cffa0287/attachment.pgp


More information about the Rt-devel mailing list