← Back to team overview

vm team mailing list archive

[Merge] lp:~akwm/vm/mime-digest-fix into lp:vm

 

Arik has proposed merging lp:~akwm/vm/mime-digest-fix into lp:vm.

Requested reviews:
  VM development team (vm)
Related bugs:
  #612111 digest message improperly handles boundary
  https://bugs.launchpad.net/bugs/612111


the digest message view required a new line after each boundary in the digest container which is not required by the mime rfc (RFC 2046). In addition it was adding this new line to its own digest creation, which although okay under the example in RFC2046, doesn't seem as widely supported. These changes are simple and address the issue
-- 
https://code.launchpad.net/~akwm/vm/mime-digest-fix/+merge/32610
Your team VM development team is requested to review the proposed merge of lp:~akwm/vm/mime-digest-fix into lp:vm.
=== modified file 'lisp/vm-digest.el'
--- lisp/vm-digest.el	2010-08-03 14:55:47 +0000
+++ lisp/vm-digest.el	2010-08-13 17:44:40 +0000
@@ -132,7 +132,7 @@
 	    (insert "\n--" boundary "--\n")
 	    (while boundary-positions
 	      (goto-char (car boundary-positions))
-	      (insert "\n--" boundary "\n\n")
+	      (insert "\n--" boundary "\n")
 	      (setq boundary-positions (cdr boundary-positions)))
 	    (goto-char start)
 	    (setq n (length message-list))
@@ -180,6 +180,8 @@
 		  (insert (vm-leading-message-separator folder-type))
 		  (and ident-header (insert ident-header))
 		  (setq start (point))
+		  (vm-mime-insert-mime-headers layout)
+		  (insert "\n")
 		  (vm-mime-insert-mime-body layout)
 		  (vm-munge-message-separators folder-type start (point))
 		  ;; remove any leading newlines as they will
@@ -204,6 +206,8 @@
 		    (insert (vm-leading-message-separator folder-type))
 		    (and ident-header (insert ident-header))
 		    (setq start (point))
+		    (vm-mime-insert-mime-headers (car part-list))
+		    (insert "\n")
 		    (vm-mime-insert-mime-body (car part-list))
 		    (vm-munge-message-separators folder-type start (point))
 		    ;; remove any leading newlines as they will