diff options
Diffstat (limited to 'lisp/gnus/mm-decode.el')
-rw-r--r-- | lisp/gnus/mm-decode.el | 35 |
1 files changed, 4 insertions, 31 deletions
diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el index 4a9007a06ec..26d18fc678e 100644 --- a/lisp/gnus/mm-decode.el +++ b/lisp/gnus/mm-decode.el @@ -672,39 +672,12 @@ MIME-Version header before proceeding." description))))) (if (or (not ctl) (not (string-match "/" (car ctl)))) - (let ((cdl (and cd (mail-header-parse-content-disposition cd)))) (mm-dissect-singlepart - ;; Guess Content-Type from the file name extention. - ;; Some mailer sends a part without type like this: - ;; Content-Type: ; name="IMG_3156.JPG" - ;; Content-Disposition: attachment; filename="IMG_3156.JPG" - (list (or - (let ((tem - (or (mail-content-type-get cdl 'filename) - (and ct - (with-temp-buffer - (insert ct) - (goto-char (point-min)) - (and (re-search-forward "\ -;[\t\n ]*name=\\([\"']\\|\\([^\t\n\r ]+\\)\\)" nil t) - (or (match-string 2) - (progn - (goto-char (match-beginning 1)) - (condition-case nil - (progn - (forward-sexp 1) - (buffer-substring - (1+ (match-beginning 1)) - (1- (point)))) - (error nil)))))))))) - (and tem - (setq tem (file-name-extension tem)) - (require 'mailcap) - (cdr (assoc (concat "." (downcase tem)) - mailcap-mime-extensions)))) - mm-dissect-default-type)) + (list mm-dissect-default-type) (and cte (intern (downcase (mail-header-strip cte)))) - no-strict-mime cdl description)) + no-strict-mime + (and cd (mail-header-parse-content-disposition cd)) + description) (setq type (split-string (car ctl) "/")) (setq subtype (cadr type) type (car type)) |