[issue24363] httplib fails to handle semivalid HTTP headers

Michael Del Monte report at bugs.python.org
Tue Jun 2 17:47:17 CEST 2015


Michael Del Monte added the comment:

Thanks.  Also I meant to have said, "...to terminate only on a *blank* non-header non-comment line, in accordance with RFC 2616 (and 7230)."

I note that the RFCs require CRLF to terminate but in my experience you can get all manner of "blank" lines, so accepting len(line.strip())==0 is going to accommodate servers that give CRCR or LFLF or (and I have seen this) LFCRLF.

----------

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


More information about the Python-bugs-list mailing list