[issue1693546] email.Message set_param rfc2231 encoding incorrect

R. David Murray report at bugs.python.org
Fri Dec 24 00:07:42 CET 2010


R. David Murray <rdmurray at bitdance.com> added the comment:

Reading the RFC again, I think you are right.  The quoted vs unquoted sounds like it refers to the *n vs the [*n]* forms, and the latter doesn't use quoted strings but % encoding.

I'm attaching a patch that adds some tests and fixes this.  It's a visible behavior change so it won't be backported.  Clearly mailers accept the quoted form, but we prefer to be strictly RFC compliant on output.  The behavior change is that whereas previously unquoted values on parse got quotes added on serialization, now quoted values on parse will lose their quotes on serialization.

----------
keywords: +patch
stage: unit test needed -> patch review
versions:  -Python 2.7, Python 3.1
Added file: http://bugs.python.org/file20150/rfc2231_quoting.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1693546>
_______________________________________


More information about the Python-bugs-list mailing list