From: Lars Ingebrigtsen Date: Thu, 4 Aug 2022 07:45:50 +0000 (+0200) Subject: Fix double-encoding attachment headers in single-part rfc2047 X-Git-Tag: emacs-29.0.90~1447^2~478 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f025005e8619ab42b43dad5dd470dbbbcdc75041;p=emacs.git Fix double-encoding attachment headers in single-part rfc2047 * lisp/mail/rfc2047.el (rfc2047-header-encoding-alist): Don't double-encode Content-Disposition in mails with no other body (bug#56906). --- diff --git a/lisp/mail/rfc2047.el b/lisp/mail/rfc2047.el index bb0d646346c..67874d508b1 100644 --- a/lisp/mail/rfc2047.el +++ b/lisp/mail/rfc2047.el @@ -45,6 +45,9 @@ '(("Newsgroups" . nil) ("Followup-To" . nil) ("Message-ID" . nil) + ;; This header must be pre-encoded by the MTA, so avoid + ;; double-encoding it. + ("Content-Disposition" . default) ("\\(Resent-\\)?\\(From\\|Cc\\|To\\|Bcc\\|\\(In-\\)?Reply-To\\|Sender\ \\|Mail-Followup-To\\|Mail-Copies-To\\|Approved\\|Disposition-Notification-To\\)" . address-mime) (t . mime))