[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-mailutils] Re: How get_attachment_name from multiline Content-

From: Kostik
Subject: Re: [bug-mailutils] Re: How get_attachment_name from multiline Content-Disposition?
Date: Thu, 08 Apr 2010 14:14:56 +0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20100228 Thunderbird/ Mnenhy/

Sergey Poznyakoff wrote:
>> neither RFC 2045 nor 2183 seem to indicate that any whitespace
>> characters are allowed around the '='.
> After a bit of thought I decided it would do no harm to allow for it
> anyway, so I've applied the attached patch. Please, pull.

Oh, it's very very good news for me! Very big thanx! Actually, in a real
world, quite a number of messages like this.

Mostly everything works as expected, but a strange problem (perhaps not
with this patch).

Ordinary attachment with ordinary filename:
Content-Type: application/msword;

Content-Disposition: attachment;

        size=45056; creation-date="Fri, 05 Feb 2010 00:50:05 GMT";
        modification-date="Wed, 10 Feb 2010 09:43:24 GMT"
Content-Transfer-Encoding: base64

If you decode base64 encoded file name (via any other tools):
you get for example "blah-balh-blah.doc".

But mu_message_aget_decoded_attachment_name() return "blah-balh-blah.do"
(without last char). If I manually change encoded file name and add "="
char at the end(before "?="):
then everything is good: "blah-balh-blah.doc" (with last char).

It is not always repeated with other filenames. Some of the them decoded
well, but some of them with "last char cut".

Very strange...


reply via email to

[Prev in Thread] Current Thread [Next in Thread]