summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2007-05-14 19:49:26 +0000
committerEli Zaretskii <eliz@gnu.org>2007-05-14 19:49:26 +0000
commit3679904100fe5d075fe21d2b3d08dccf9c1a77ce (patch)
tree95eebf85d9e8ea33f7488b43c708d1b2bccfa375
parent2670654d2af6fa6b45fed54483784205d42b7b2d (diff)
downloademacs-3679904100fe5d075fe21d2b3d08dccf9c1a77ce.tar.gz
(rmail-convert-to-babyl-format): Check content-transfer-encoding _last_,
because it's its position that we need in base64-header-field-end.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/mail/rmail.el13
2 files changed, 13 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 88f750384dc..5adfbf3242d 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
+2007-05-14 Eli Zaretskii <eliz@gnu.org>
+
+ * mail/rmail.el (rmail-convert-to-babyl-format): Check
+ content-transfer-encoding _last_, because we need its position in
+ base64-header-field-end.
+
2007-05-14 Juanma Barranquero <lekktu@gmail.com>
* files.el (mode-require-final-newline, require-final-newline)
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index bfdd5048877..13aba1a3fb0 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -1959,12 +1959,13 @@ is non-nil if the user has supplied the password interactively.
(base64-header-field-end
(save-excursion
(goto-char start)
+ ;; Don't try to decode non-text data.
(and (re-search-forward
- "^content-transfer-encoding:\\(\n?[\t ]\\)*base64\\(\n?[\t ]\\)*"
+ "^content-type:\\(\n?[\t ]\\)\\(text\\|message\\)/"
header-end t)
- ;; Don't try to decode non-text data.
+ (goto-char start)
(re-search-forward
- "^content-type:\\(\n?[\t ]\\)\\(text\\|message\\)/"
+ "^content-transfer-encoding:\\(\n?[\t ]\\)*base64\\(\n?[\t ]\\)*"
header-end t)))))
(if quoted-printable-header-field-end
(save-excursion
@@ -2066,14 +2067,14 @@ is non-nil if the user has supplied the password interactively.
header-end t)))
(base64-header-field-end
(and
+ ;; Don't decode non-text data.
(save-excursion
(re-search-forward
- "^content-transfer-encoding:\\(\n?[\t ]\\)*base64\\(\n?[\t ]\\)*"
+ "^content-type:\\(\n?[\t ]\\)\\(text\\|message\\)/"
header-end t))
- ;; Don't decode non-text data.
(save-excursion
(re-search-forward
- "^content-type:\\(\n?[\t ]\\)\\(text\\|message\\)/"
+ "^content-transfer-encoding:\\(\n?[\t ]\\)*base64\\(\n?[\t ]\\)*"
header-end t))))
(size
;; Get the numeric value from the Content-Length field.