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

[sup-devel] [PATCH] Bugfix: fix regexp for detecting filename in Content-Disposition header



Hi,

quote from the commit message:

    In a message written in some Microsoft mail program (the only header is
    "X-MimeOLE: Produced By Microsoft Exchange V6.5"), the filename part of
    the Content-Disposition header spans multiple lines (due to the filename
    being very long and encoded in base64 due to the use of UTF-8):
    
    Content-Disposition: attachment;
            filename="=?utf-8?B?VGFnIGRlciBPZmZlbmVuIFTDvHIgZGVzIFByb2pla3Rl?=
            =?utf-8?B?cyBMZXJucGF0ZW5zY2hhZnRlbiBpbSBFbW1lcnRzZ3I=?=
            =?utf-8?B?dW5kLmRvY3g=?="
    
    The previous regexp did not properly match the whole string, but only the
    first line. This is fixed by adding the 'm' option (to match newlines as
    characters) and using \z instead of $ ("end of string" instead of "end of
    line").
    
    The same fix is also applied to the Content-Type header one line below.


Best regards,
Michael

Attachment: 0001-Bugfix-fix-regexp-for-detecting-filename-in-Content-.patch
Description: Binary data

_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel