aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2011-02-23 11:32:35 +0900
committerKenichi Handa2011-02-23 11:32:35 +0900
commitc1449bffe23febaed03c89eaffce7f3ec5d88cce (patch)
tree0d59aa4cf8f35d917ab855dc721784bbc32f3852
parent9c02aefc951cca753d1548de717d3b5017e96187 (diff)
downloademacs-c1449bffe23febaed03c89eaffce7f3ec5d88cce.tar.gz
emacs-c1449bffe23febaed03c89eaffce7f3ec5d88cce.zip
mail/rmailmm.el (rmail-mime-process-multipart): Do not signal an error when a multipart boundary in the nested multipart is found.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/mail/rmailmm.el45
2 files changed, 30 insertions, 20 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index a70330d1022..75010513c12 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12011-02-23 Kenichi Handa <handa@m17n.org>
2
3 * mail/rmailmm.el (rmail-mime-process-multipart): Do not signal an
4 error when a multipart boundary in the nested multipart is found.
5
12011-02-22 Kenichi Handa <handa@m17n.org> 62011-02-22 Kenichi Handa <handa@m17n.org>
2 7
3 * mail/rmail.el (rmail-start-mail): Decode "encoded-words" of 8 * mail/rmail.el (rmail-start-mail): Decode "encoded-words" of
diff --git a/lisp/mail/rmailmm.el b/lisp/mail/rmailmm.el
index e44dd877e4f..4aa3e81132f 100644
--- a/lisp/mail/rmailmm.el
+++ b/lisp/mail/rmailmm.el
@@ -852,28 +852,33 @@ The other arguments are the same as `rmail-mime-multipart-handler'."
852 ((looking-at "[ \t]*\n") 852 ((looking-at "[ \t]*\n")
853 (setq next (copy-marker (match-end 0) t))) 853 (setq next (copy-marker (match-end 0) t)))
854 (t 854 (t
855 (rmail-mm-get-boundary-error-message 855 ;; The original code signalled an error as below, but
856 "Malformed boundary" content-type content-disposition 856 ;; this line may be a boundary of nested multipart. So,
857 content-transfer-encoding))) 857 ;; we just set `next' to nil to skip this line
858 858 ;; (rmail-mm-get-boundary-error-message
859 (setq index (1+ index)) 859 ;; "Malformed boundary" content-type content-disposition
860 ;; Handle the part. 860 ;; content-transfer-encoding)
861 (if parse-tag 861 (setq next nil)))
862
863 (when next
864 (setq index (1+ index))
865 ;; Handle the part.
866 (if parse-tag
867 (save-restriction
868 (narrow-to-region beg end)
869 (let ((child (rmail-mime-process
870 nil (format "%s/%d" parse-tag index)
871 content-type content-disposition)))
872 ;; Display a tagline.
873 (aset (aref (rmail-mime-entity-display child) 1) 1
874 (aset (rmail-mime-entity-tagline child) 2 t))
875 (push child entities)))
876
877 (delete-region end next)
862 (save-restriction 878 (save-restriction
863 (narrow-to-region beg end) 879 (narrow-to-region beg end)
864 (let ((child (rmail-mime-process 880 (rmail-mime-show)))
865 nil (format "%s/%d" parse-tag index) 881 (goto-char (setq beg next))))
866 content-type content-disposition)))
867 ;; Display a tagline.
868 (aset (aref (rmail-mime-entity-display child) 1) 1
869 (aset (rmail-mime-entity-tagline child) 2 t))
870 (push child entities)))
871
872 (delete-region end next)
873 (save-restriction
874 (narrow-to-region beg end)
875 (rmail-mime-show)))
876 (goto-char (setq beg next)))
877 882
878 (when parse-tag 883 (when parse-tag
879 (setq entities (nreverse entities)) 884 (setq entities (nreverse entities))