# HG changeset patch # User Miles Bader # Date 1122601480 0 # Node ID 89073e52939c50213944e74efed32939e98eae6a # Parent 6d7db972d44f38729a38e46d0673b5739ddc881d Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-503 Merge from gnus--rel--5.10 Patches applied: * gnus--rel--5.10 (patch 98) - Update from CVS 2005-07-28 Katsumi Yamaoka * lisp/gnus/rfc2231.el (rfc2231-parse-string): Take care that not only a segmented parameter but also other parameters might be there. diff -r 6d7db972d44f -r 89073e52939c lisp/gnus/ChangeLog --- a/lisp/gnus/ChangeLog Thu Jul 28 22:41:44 2005 +0000 +++ b/lisp/gnus/ChangeLog Fri Jul 29 01:44:40 2005 +0000 @@ -1,3 +1,8 @@ +2005-07-28 Katsumi Yamaoka + + * rfc2231.el (rfc2231-parse-string): Take care that not only a + segmented parameter but also other parameters might be there. + 2005-07-26 Katsumi Yamaoka * gnus-art.el (gnus-article-next-page-1): Don't scroll if there're diff -r 6d7db972d44f -r 89073e52939c lisp/gnus/rfc2231.el --- a/lisp/gnus/rfc2231.el Thu Jul 28 22:41:44 2005 +0000 +++ b/lisp/gnus/rfc2231.el Fri Jul 29 01:44:40 2005 +0000 @@ -1,6 +1,6 @@ ;;; rfc2231.el --- Functions for decoding rfc2231 headers -;; Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004 +;; Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004, 2005 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen @@ -52,7 +52,7 @@ (prev-value "") display-name mailbox c display-string parameters attribute value type subtype number encoded - prev-attribute) + prev-attribute prev-encoded) (ietf-drums-init (mail-header-remove-whitespace (mail-header-remove-comments string))) (let ((table (copy-syntax-table ietf-drums-syntax-table))) @@ -106,9 +106,14 @@ ;; See if we have any previous continuations. (when (and prev-attribute (not (eq prev-attribute attribute))) - (push (cons prev-attribute prev-value) parameters) + (push (cons prev-attribute + (if prev-encoded + (rfc2231-decode-encoded-string prev-value) + prev-value)) + parameters) (setq prev-attribute nil - prev-value "")) + prev-value "" + prev-encoded nil)) (unless (eq c ?=) (error "Invalid header: %s" string)) (forward-char 1) @@ -127,7 +132,8 @@ (error "Invalid header: %s" string))) (if number (setq prev-attribute attribute - prev-value (concat prev-value value)) + prev-value (concat prev-value value) + prev-encoded encoded) (push (cons attribute (if encoded (rfc2231-decode-encoded-string value) @@ -137,7 +143,7 @@ ;; Take care of any final continuations. (when prev-attribute (push (cons prev-attribute - (if encoded + (if prev-encoded (rfc2231-decode-encoded-string prev-value) prev-value)) parameters))