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;

name="=?koi8-r?B?4OTrIOTP0CDLIM/LwdrBzsnAINXTzNXHICsg0NLJzcXewc7J0S5kb2N=?="
Content-Description:
=?koi8-r?B?4OTrIOTP0CDLIM/LwdrBzsnAINXTzNXHICsg0NLJzcXewc7J0S5kb2N=?=
Content-Disposition: attachment;

filename="=?koi8-r?B?4OTrIOTP0CDLIM/LwdrBzsnAINXTzNXHICsg0NLJzcXewc7J0S5kb2N=?=";
        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):
---
filename="=?koi8-r?B?4OTrIOTP0CDLIM/LwdrBzsnAINXTzNXHICsg0NLJzcXewc7J0S5kb2N=?="
---
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 "?="):
---
filename="=?koi8-r?B?4OTrIOTP0CDLIM/LwdrBzsnAINXTzNXHICsg0NLJzcXewc7J0S5kb2N==?="
---
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...

=kostik

_______________________________________________
Bug-mailutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-mailutils

Reply via email to