[issue24363] httplib fails to handle semivalid HTTP headers
Michael Del Monte
report at bugs.python.org
Wed Jun 3 02:16:28 CEST 2015
Michael Del Monte added the comment:
I don't want to speak out of school and you guys certainly know what you're doing, but it seems a shame to go through these gyrations -- lookahead plus "unreading" lines -- only to preserve the ability to parse email headers, when HTTP really does follow a different spec. My suggestion would be to examine the header and decide, if it's HTTP, to just ignore nonconforming lines; and if it's email, then the problem is already solved (as email doesn't have encoding rules that would cause problems later).
My fear would be that you'll eventually get that nonconforming line with leading whitespace, which will lead right back to the same error.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24363>
_______________________________________
More information about the Python-bugs-list
mailing list