Barry Warsaw wrote:
>
>FWIW, this is now fixed in email 4.0.1 (Python 2.5 trunk), and I will  
>be back porting the fix to email 3.0 (Python 2.4) and email 2.5  
>(Python 2.3).


I just looked at the fix in SVN, and I think there is still a problem.
I don't think the RFC 2231 encodings that produce the error are
'buggy'. There are two independent things going on in RFC 2231 - the
charset and language encoding and the splitting of the parameter into
multiple pieces, e.g. filename*0=, filename*1=, etc.

The problem with email.utils.decode_params() is it doesn't distinguish
between these cases. The charset/language information is only present
if there is a * immediately preceeding the = as in

filename*=charset'language'value

or

filename*0*=charset'language'value
...

in these cases, a compliant value must not contain '

However, if the parameter is

filename*0=value_part_0
filename*1=value_part_1
...

these value_parts may contain any number of ' characters and they don't
delimit charset and language information.

See my suggested patch attached to
<http://mail.python.org/pipermail/email-sig/2006-July/000293.html>.

-- 
Mark Sapiro <[EMAIL PROTECTED]>       The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

_______________________________________________
Email-SIG mailing list
[email protected]
Your options: 
http://mail.python.org/mailman/options/email-sig/archive%40mail-archive.com

Reply via email to