From: Austin Clements Date: Wed, 31 Jul 2013 02:25:29 +0000 (+2000) Subject: Re: [PATCH] emacs: bugfix attachment content-type as mime-type handling X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=577e79e0cb2ae9a70aafc54de5491d40455861c2;p=notmuch-archives.git Re: [PATCH] emacs: bugfix attachment content-type as mime-type handling --- diff --git a/e0/9f6d101f87ddfbe117dea002caa71d1425f9f3 b/e0/9f6d101f87ddfbe117dea002caa71d1425f9f3 new file mode 100644 index 000000000..873e319e0 --- /dev/null +++ b/e0/9f6d101f87ddfbe117dea002caa71d1425f9f3 @@ -0,0 +1,96 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id C96EE431FC0 + for ; Tue, 30 Jul 2013 19:25:44 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id 7JM0hC0URg2T for ; + Tue, 30 Jul 2013 19:25:37 -0700 (PDT) +Received: from dmz-mailsec-scanner-8.mit.edu (dmz-mailsec-scanner-8.mit.edu + [18.7.68.37]) + by olra.theworths.org (Postfix) with ESMTP id 32CCE431FBF + for ; Tue, 30 Jul 2013 19:25:37 -0700 (PDT) +X-AuditID: 12074425-b7f0c8e000000953-32-51f8759f3a1b +Received: from mailhub-auth-3.mit.edu ( [18.9.21.43]) + by dmz-mailsec-scanner-8.mit.edu (Symantec Messaging Gateway) with SMTP + id 2E.CB.02387.F9578F15; Tue, 30 Jul 2013 22:25:35 -0400 (EDT) +Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) + by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id r6V2PYCu031338; + Tue, 30 Jul 2013 22:25:35 -0400 +Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) + (authenticated bits=0) + (User authenticated as amdragon@ATHENA.MIT.EDU) + by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id r6V2PUWG009720 + (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); + Tue, 30 Jul 2013 22:25:33 -0400 +Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.80) + (envelope-from ) + id 1V4M6T-0006p4-FS; Tue, 30 Jul 2013 22:25:29 -0400 +Date: Tue, 30 Jul 2013 22:25:29 -0400 +From: Austin Clements +To: Mark Walters +Subject: Re: [PATCH] emacs: bugfix attachment content-type as mime-type + handling +Message-ID: <20130731022529.GU2214@mit.edu> +References: <87li4om623.fsf@qmul.ac.uk> + <1375200900-5650-1-git-send-email-markwalters1009@gmail.com> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline +In-Reply-To: <1375200900-5650-1-git-send-email-markwalters1009@gmail.com> +User-Agent: Mutt/1.5.21 (2010-09-15) +X-Brightmail-Tracker: + H4sIAAAAAAAAA+NgFupnleLIzCtJLcpLzFFi42IR4hTV1p1f+iPQ4M02WYvVc3ksrt+cyezA + 5LFz1l12j2erbjEHMEVx2aSk5mSWpRbp2yVwZRzq6mIpuMJesX3TBMYGxulsXYycHBICJhL7 + 13axQthiEhfurQeKc3EICexjlDhxYh0zhLORUeL5mg5GCOc0k8S61q1QmSWMEqvub2AB6WcR + UJV4c6MXzGYT0JDYtn85I4gtIqAjcfvQAnYQm1lAWuLb72YmEFtYIEji+4TjzCA2r4C2xJwn + vWA3CQmkSexbv5YJIi4ocXLmExaIXi2JG/9eAsU5wOYs/8cBEuYU8JQ48u03WImogIrElJPb + 2CYwCs1C0j0LSfcshO4FjMyrGGVTcqt0cxMzc4pTk3WLkxPz8lKLdC30cjNL9FJTSjcxgsKa + 3UV1B+OEQ0qHGAU4GJV4eB0ufA8UYk0sK67MPcQoycGkJMrLW/IjUIgvKT+lMiOxOCO+qDQn + tfgQowQHs5IIr3wQUI43JbGyKrUoHyYlzcGiJM77/OnZQCGB9MSS1OzU1ILUIpisDAeHkgSv + ODB+hQSLUtNTK9Iyc0oQ0kwcnCDDeYCGvwdZzFtckJhbnJkOkT/FqMsx+eyW94xCLHn5ealS + 4ry/QYoEQIoySvPg5sDS0StGcaC3hHmVQdbxAFMZ3KRXQEuYgJbsVvkGsqQkESEl1cAo/Gbf + Kn6t2rBp3JcYT1fpG/Ok3fjCvFviW/u0M7ETg2cxTrgs8q5yN7+/XdDxDQr8T5j+Hu9Z+uXj + 2rZjJQ7Hbj2Xlt3ObbeXU3SpdrL61dBmhXPHcnWZbJKWKwhrl/1ZPlG9eVN+a8C+2S1fd3w6 + yzHNtXBK2JxHMTeLpzsX3BP5vVX33lNrJZbijERDLeai4kQAEUx6BCIDAAA= +Cc: notmuch@notmuchmail.org +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Wed, 31 Jul 2013 02:25:44 -0000 + +Quoth Mark Walters on Jul 30 at 5:15 pm: +> Notmuch puts attachments in as declared content-type except when the +> content-type is application/octet-stream it tries to guess the type +> from the filename/extension. This means that viewing a pdf (for +> example) which is sent as application/octet-strem invokes the pdf +> viewer rather than just offering to save the part. +> +> Recent changes to the attachment handling (commit 1546387d) changed +> (broke) this. This patch stores the calculated mime-type with the part +> and changes the attachment part handlers can use it instead. +> --- +> This seems to fix the bug for me. I am not sure I like the naming +> (mime-type/content-type). Maybe it would be better to be explicit with +> something like calculated-content-type but probably that should be a +> more wholesale renaming. + +Code LGTM, though I agree the naming could be better. It would be +nice to have a test for this so we don't regress again in the future.