[issue1079] decode_header does not follow RFC 2047
R. David Murray
report at bugs.python.org
Mon Jan 2 19:14:27 CET 2012
R. David Murray <rdmurray at bitdance.com> added the comment:
The RFC isn't at all vague about encoded words not separated by white space. That isn't allowed by the BNF. As you say, though, they occur in the wild and should be parsed correctly.
In your other point I think you mean "immediately followed by a )", right? Yes, that is allowed and no, we don't currently parse that correctly.
Adding the RFC tests would be great (patches gladly accepted). Fixes for ones we fail would be great, too, but at the very least we can mark them as expected failures. I don't usually like adding tests that we expect to fail, but in the case of externally defined tests such as the RFC examples I think it is worthwhile, so that we can check in a complete test set.
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list