mm-decode: add a default content-disposition in mm handle if none is specified
authorJulien Danjou <julien@danjou.info>
Fri, 29 Jul 2011 08:39:44 +0000 (10:39 +0200)
committerJulien Danjou <julien@danjou.info>
Fri, 29 Jul 2011 08:39:44 +0000 (10:39 +0200)
Signed-off-by: Julien Danjou <julien@danjou.info>
lisp/ChangeLog
lisp/mm-decode.el

index afdfb10..4a7576c 100644 (file)
@@ -1,3 +1,8 @@
+2011-07-29  Daniel Dehennin  <daniel.dehennin@baby-gnu.org>
+
+       * mm-decode.el (mm-dissect-buffer): Add a default content-disposition
+       in mm handle if none is specified.
+
 2011-07-24  Andrew Cohen  <cohen@andy.bu.edu>
 
        * nnimap.el (nnimap-make-thread-query): Quote message-ids for gmail.
index a51c663..692175d 100644 (file)
@@ -564,7 +564,13 @@ Postpone undisplaying of viewers for types in
          (setq ct (mail-fetch-field "content-type")
                ctl (and ct (mail-header-parse-content-type ct))
                cte (mail-fetch-field "content-transfer-encoding")
-               cd (mail-fetch-field "content-disposition")
+                cd (or (mail-fetch-field "content-disposition")
+                       (when (and ctl
+                                  (eq 'mm-inline-text
+                                      (cadr (mm-assoc-string-match
+                                             mm-inline-media-tests
+                                             (car ctl)))))
+                         "inline"))
                ;; Newlines in description should be stripped so as
                ;; not to break the MIME tag into two or more lines.
                description (message-fetch-field "content-description")