From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.90.92.18 with SMTP id p18cs223563agb; Wed, 7 Oct 2009 03:52:54 -0700 (PDT) Received: by 10.224.10.147 with SMTP id p19mr2368494qap.166.1254912774254; Wed, 07 Oct 2009 03:52:54 -0700 (PDT) Return-Path: Received: from rubyforge.org (rubyforge.org [205.234.109.19]) by mx.google.com with ESMTP id 4si9990842qyk.33.2009.10.07.03.52.54; Wed, 07 Oct 2009 03:52:54 -0700 (PDT) Received-SPF: pass (google.com: domain of sup-talk-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) client-ip=205.234.109.19; Authentication-Results: mx.google.com; spf=pass (google.com: domain of sup-talk-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) smtp.mail=sup-talk-bounces@rubyforge.org Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 78A7E1858306; Wed, 7 Oct 2009 06:52:53 -0400 (EDT) Received: from sam.mediasupervision.de (sam.mediasupervision.de [80.152.3.104]) by rubyforge.org (Postfix) with ESMTP id 6F2C918582F9 for ; Wed, 7 Oct 2009 06:52:39 -0400 (EDT) Received: from localhost (sam.mediasupervision.de [127.0.0.1]) by sam.mediasupervision.de (Postfix) with ESMTP id 64690485C0A for ; Wed, 7 Oct 2009 12:52:34 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at sam.mediasupervision.de Received: from sam.mediasupervision.de ([127.0.0.1]) by localhost (sam.mediasupervision.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kCfZvStTrV8V for ; Wed, 7 Oct 2009 12:52:34 +0200 (CEST) Received: by sam.mediasupervision.de (Postfix, from userid 1000) id 2A9B4485C6E; Wed, 7 Oct 2009 12:52:34 +0200 (CEST) From: Gregor Hoffleit To: sup-talk Date: Wed, 07 Oct 2009 12:52:34 +0200 Message-Id: <1254912361-sup-5340@sam.mediasupervision.de> User-Agent: Sup/git Content-Transfer-Encoding: 8bit Content-Type: multipart/mixed; boundary="=-1254912754-151842-23917-1552-1-=" MIME-Version: 1.0 Subject: [sup-talk] [PATCH] Attachment filenames: RFC2184 and extension guessing X-BeenThere: sup-talk@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: User & developer discussion of Sup List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: sup-talk-bounces@rubyforge.org Errors-To: sup-talk-bounces@rubyforge.org --=-1254912754-151842-23917-1552-1-= Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline I noticed sup has trouble handling attachments sent by Roundcube webmail. Somehow, those mails use an alternative encoding of filenames, specified in RFC2184: Content-Transfer-Encoding: base64 Content-Type: image/jpeg; name*="UTF-8''20090912-i004232-gr000.jpg"; Content-Disposition: attachment; filename*="UTF-8''20090912-i004232-gr000.jpg"; Bugs: 1. Sup fails to detect these filenames. 2. When trying to save these attachements, the filenames generated by sup have a trailing semicolon. The attached patch is a quick and dirty fix for these specific problems. There's probably a better way to implement this. Regards, Gregor Hoffleit --=-1254912754-151842-23917-1552-1-= Content-Disposition: attachment; filename="rfc2184.diff" Content-Type: application/octet-stream; name="rfc2184.diff" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL2xpYi9zdXAvbWVzc2FnZS5yYiBiL2xpYi9zdXAvbWVz c2FnZS5yYgppbmRleCBmOWY4N2RlLi40YWQwYjg4IDEwMDY0NAotLS0gYS9s aWIvc3VwL21lc3NhZ2UucmIKKysrIGIvbGliL3N1cC9tZXNzYWdlLnJiCkBA IC00NzcsNiArNDc3LDEwIEBAIHByaXZhdGUKICAgICAgICAgICAkMQogICAg ICAgICBlbHNpZiBtLmhlYWRlclsiQ29udGVudC1UeXBlIl0gJiYgbS5oZWFk ZXJbIkNvbnRlbnQtVHlwZSJdID1+IC9uYW1lPSI/KC4qP1teXFxdKSgifDt8 JCkvaQogICAgICAgICAgICQxCisgICAgICAgIGVsc2lmIG0uaGVhZGVyWyJD b250ZW50LURpc3Bvc2l0aW9uIl0gJiYgbS5oZWFkZXJbIkNvbnRlbnQtRGlz cG9zaXRpb24iXSA9fiAvZmlsZW5hbWVcKj0iP1VURi04JycoLio/W15cXF0p KCJ8O3wkKS8KKyAgICAgICAgICAkMQorICAgICAgICBlbHNpZiBtLmhlYWRl clsiQ29udGVudC1UeXBlIl0gJiYgbS5oZWFkZXJbIkNvbnRlbnQtVHlwZSJd ID1+IC9uYW1lXCo9Ij9VVEYtOCcnKC4qP1teXFxdKSgifDt8JCkvaQorICAg ICAgICAgICQxCiAKICAgICAgICAgIyMgaGF2ZW4ndCBmb3VuZCBvbmUsIGJ1 dCBpdCdzIGEgbm9uLXRleHQgbWVzc2FnZS4gZmFrZQogICAgICAgICAjIyBp dC4KQEAgLTQ4Niw3ICs0OTAsNyBAQCBwcml2YXRlCiAgICAgICAgICAgZXh0 ZW5zaW9uID0KICAgICAgICAgICAgIGNhc2UgbS5oZWFkZXJbIkNvbnRlbnQt VHlwZSJdCiAgICAgICAgICAgICB3aGVuIC90ZXh0XC9odG1sLyB0aGVuICJo dG1sIgotICAgICAgICAgICAgd2hlbiAvaW1hZ2VcLyguKikvIHRoZW4gJDEK KyAgICAgICAgICAgIHdoZW4gL2ltYWdlXC8oW147XSopLyB0aGVuICQxCiAg ICAgICAgICAgICBlbmQKIAogICAgICAgICAgIFsic3VwLWF0dGFjaG1lbnQt I3tUaW1lLm5vdy50b19pfS0je3JhbmQgMTAwMDB9IiwgZXh0ZW5zaW9uXS5q b2luKCIuIikK --=-1254912754-151842-23917-1552-1-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ sup-talk mailing list sup-talk@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-talk --=-1254912754-151842-23917-1552-1-=--