(mml-generate-mime-1): Make the content type default to text/plain if the
authorKatsumi Yamaoka <yamaoka@jpl.org>
Tue, 2 Aug 2005 00:46:57 +0000 (00:46 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Tue, 2 Aug 2005 00:46:57 +0000 (00:46 +0000)
 filename is not specified.

lisp/ChangeLog
lisp/mml.el

index 799f206..eda07ac 100644 (file)
@@ -1,3 +1,8 @@
+2005-08-02  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * mml.el (mml-generate-mime-1): Make the content type default to
+       text/plain if the filename is not specified.
+
 2005-08-01  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * gnus-uu.el (gnus-uu-save-article): Use insert-buffer-substring
index 4f231d5..aaeead9 100644 (file)
@@ -413,8 +413,10 @@ If MML is non-nil, return the buffer up till the correspondent mml tag."
        (let* ((raw (cdr (assq 'raw cont)))
               (filename (cdr (assq 'filename cont)))
               (type (or (cdr (assq 'type cont))
-                        (and filename (mm-default-file-encoding filename))
-                        "application/octet-stream"))
+                        (if filename
+                            (or (mm-default-file-encoding filename)
+                                "application/octet-stream")
+                          "text/plain")))
               (charset (cdr (assq 'charset cont)))
               (coding (mm-charset-to-coding-system charset))
               encoding flowed coded)
@@ -544,8 +546,10 @@ If MML is non-nil, return the buffer up till the correspondent mml tag."
          (insert "\n\n")
          (insert "Content-Type: "
                  (or (cdr (assq 'type cont))
-                     (and name (mm-default-file-encoding name))
-                     "application/octet-stream")
+                     (if name
+                         (or (mm-default-file-encoding name)
+                             "application/octet-stream")
+                       "text/plain"))
                  "\n")
          (insert "Content-ID: " (message-make-message-id) "\n")
          (insert "Content-Transfer-Encoding: "