[issue24363] httplib fails to handle semivalid HTTP headers

R. David Murray report at bugs.python.org
Wed Jun 3 00:22:15 CEST 2015


R. David Murray added the comment:

I think there may be a way to accomplish this in a reasonably straightforward fashion in python3 given that feedparser has an 'unreadline' function.  The python2 case is probably going to be a more complicated change.  And I agree that multiple lines should be examined.

There is also the question of what to do with the extra data.  I think the correct approach is to treat a line that does not conform as a line that is missing the leading whitespace that would make it a continuation line.  It looks like that would certainly be correct for the case in hand.

----------

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


More information about the Python-bugs-list mailing list