*** empty log message ***
authorSimon Josefsson <jas@extundo.com>
Fri, 3 Nov 2000 14:32:35 +0000 (14:32 +0000)
committerSimon Josefsson <jas@extundo.com>
Fri, 3 Nov 2000 14:32:35 +0000 (14:32 +0000)
lisp/ChangeLog
lisp/mail-parse.el
lisp/rfc2231.el

index 1738311..5dd36a4 100644 (file)
@@ -1,3 +1,12 @@
+2000-11-03  Simon Josefsson  <sj@extundo.com>
+
+       * rfc2231.el (rfc2231-parse-qp-string): New function.
+       (require): rfc2047.
+
+       * mail-parse.el (mail-header-parse-content-type):
+       (mail-header-parse-content-disposition): Support invalid QP
+       encoded strings, by using `rfc2231-parse-qp-string'.
+
 2000-11-03 08:58:08  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * rfc2231.el (rfc2231-parse-string): Decode when there is no number.
index 1fb1647..95a3359 100644 (file)
@@ -43,8 +43,8 @@
 (require 'rfc2047)
 (require 'rfc2045)
 
-(defalias 'mail-header-parse-content-type 'rfc2231-parse-string)
-(defalias 'mail-header-parse-content-disposition 'rfc2231-parse-string)
+(defalias 'mail-header-parse-content-type 'rfc2231-parse-qp-string)
+(defalias 'mail-header-parse-content-disposition 'rfc2231-parse-qp-string)
 (defalias 'mail-content-type-get 'rfc2231-get-value)
 ;(defalias 'mail-header-encode-parameter 'rfc2045-encode-string)
 (defalias 'mail-header-encode-parameter 'rfc2231-encode-string)
index 8e0c341..5c80c9c 100644 (file)
 
 (eval-when-compile (require 'cl))
 (require 'ietf-drums)
+(require 'rfc2047)
 
 (defun rfc2231-get-value (ct attribute)
   "Return the value of ATTRIBUTE from CT."
   (cdr (assq attribute (cdr ct))))
 
+(defun rfc2231-parse-qp-string (string)
+  "Parse QP-encoded string using `rfc2231-parse-string'.
+N.B.  This is in violation with RFC2047, but it seem to be in common use."
+  (rfc2231-parse-string (rfc2047-decode-string string)))
+
 (defun rfc2231-parse-string (string)
   "Parse STRING and return a list.
 The list will be on the form