[mew-int 2557] Re: text/html identified as Text/Plain(us-ascii)
Kazu Yamamoto ( 山本和彦 )
kazu at example.com
Tue Jul 29 18:06:59 JST 2008
Hello,
> > How often do you receive such broken MIME messages?
>
> About twice a week.
>
> Would it be possible to set things up such that a "Content-Type:"
> field automatically makes mew assume MIME?
OK. The following patch enables this and warns "No MIME-Version:"
in the X-Mew: field.
--Kazu
Index: mew-decode.el
===================================================================
RCS file: /cvsroot/mew/mew/mew-decode.el,v
retrieving revision 1.104
diff -c -r1.104 mew-decode.el
*** mew-decode.el 22 Jul 2008 14:01:38 -0000 1.104
--- mew-decode.el 29 Jul 2008 09:05:44 -0000
***************
*** 246,252 ****
(visibles (make-list (length mew-field-spec) nil))
(prop mew-use-highlight-header)
key beg med subj from contents others
! key-face val-face N nspec visiblep mimep
size ext ext-str ext-face)
(mew-decode-narrow-to-header
(while (not (eobp))
--- 246,253 ----
(visibles (make-list (length mew-field-spec) nil))
(prop mew-use-highlight-header)
key beg med subj from contents others
! key-face val-face N nspec visiblep
! mimep mimep2
size ext ext-str ext-face)
(mew-decode-narrow-to-header
(while (not (eobp))
***************
*** 275,280 ****
--- 276,282 ----
((string-match "^Content-" key)
;; Due to PGP/MIME, properties are not put here.
:; This must be "buffer-substring".
+ (setq mimep2 t)
(setq contents (cons (buffer-substring beg (point)) contents))
(delete-region beg (point)))
(t
***************
*** 354,360 ****
;; the beginning of the content header
(save-excursion (mapcar 'insert (nreverse contents)))
;; 'mew-contents does not work due to PGP/MIME
! (list mimep subj from)))
(defun mew-decode-mime-header (&optional dct)
"A function to handle content header.
--- 356,365 ----
;; the beginning of the content header
(save-excursion (mapcar 'insert (nreverse contents)))
;; 'mew-contents does not work due to PGP/MIME
! (if (and (null mimep) mimep2)
! (mew-xinfo-set-warning
! (cons "No MIME-Version\n" (mew-xinfo-get-warning))))
! (list (or mimep mimep2) subj from)))
(defun mew-decode-mime-header (&optional dct)
"A function to handle content header.
More information about the Mew-int
mailing list