Be way more permissive when interpreting the structures.
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Wed, 29 Sep 2010 14:56:34 +0000 (16:56 +0200)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Wed, 29 Sep 2010 14:56:34 +0000 (16:56 +0200)
lisp/ChangeLog
lisp/nnimap.el

index 6d00f81..3b794a9 100644 (file)
@@ -1,5 +1,8 @@
 2010-09-29  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * nnimap.el (nnimap-insert-partial-structure): Be way more permissive
+       when interpreting the structures.
+
        * nnregistry.el: Added.
 
        * nndraft.el (nndraft-request-expire-articles): Use the group name
index a61a028..2f432a1 100644 (file)
@@ -510,7 +510,13 @@ textual parts.")
 
 (defun nnimap-insert-partial-structure (structure parts &optional subp)
   (let ((type (car (last structure 4)))
-       (boundary (cadr (member "BOUNDARY" (car (last structure 3))))))
+       (boundary (let ((bstruc structure))
+                   (while (consp (car bstruc))
+                     (pop bstruc))
+                   (setq bstruc (car (cdr bstruc)))
+                   (and (stringp (car bstruc))
+                        (string= (downcase (car bstruc)) "boundary")
+                        (cadr bstruc)))))
     (when subp
       (insert (format "Content-type: multipart/%s; boundary=%S\n\n"
                      (downcase type) boundary)))