[issue5871] email.header.Header too lax with embeded newlines

Ville Lindholm report at bugs.python.org
Sat Aug 7 11:23:57 CEST 2010


Ville Lindholm <ville.lindholm at gmail.com> added the comment:

I tried doing a naive implementation (just checking for \n or \r in the argument to Header) but that breaks a lot of unit tests. For example the test message msg_16.txt contains a header like this:

Received: from cougar.noc.ucla.edu (cougar.noc.ucla.edu [169.232.10.18])
	by babylon.socal-raves.org (Postfix) with ESMTP id CCC2C51B84
	for <scr-admin at socal-raves.org>; Sun, 23 Sep 2001 20:13:54 -0700 (PDT)

in other words the header is split up by \n\t. I'm not very familiar with the RFCs, is there some smart way to do this? (This is my first attempt to contribute to Python btw!) It seems many tests rely on this "bug" in Header.

----------
nosy: +vvl

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


More information about the Python-bugs-list mailing list