[Email-SIG] RFC 2231 continuations vs. encoding

Donn Cave donn at u.washington.edu
Mon Nov 17 16:49:17 EST 2003


The following leads to an "unpack list of wrong size" error in
Utils.decode_rfc2231()

| Content-Type: IMAGE/GIF;  
NAME*0="est_pais.pl?s_xref=20020502elpepiint_12.Tes&i_type=3&s_anchor=el 
pepiint&end=11696";
|         NAME*1="69203.gif"
| Content-Transfer-Encoding: BASE64
| Content-ID:  
<Pine.WNT.4.10.10205020819402.-75257 at 1136667.tacoma.washington.edu>
| Content-Description:
|
| R0lGODlA...base64stuff...2lmDQ==

As far as I can tell, the code assumes that a continued value like
NAME*0 must be encoded, where the RFC says an encoded value should
be named NAME*0*.  I fixed it by checking for param[1][0].endswith('*'),
otherwise substitute default value for charset and language.

	Donn Cave, University Computing Services, University of Washington
	donn at u.washington.edu

(not subscribed.)




More information about the Email-SIG mailing list