[issue19009] Enhance HTTPResponse.readline() performance

Kristján Valur Jónsson report at bugs.python.org
Fri Sep 20 22:12:31 CEST 2013


Kristján Valur Jónsson added the comment:

Ok, I can change the base class inheritance and see if it changes things.

Note for the different interpretation of the final chunk:
Chunked encoding allows for adding headers after the final chunk.  This is what _read_and_discard_trailer() does, but discarding the trailing headers.  So, if support is ever added for reading those trailing headers, then we need make sure that we consume the last chunk correctly.
It is, of course, a matter of resilience, v.s. correctness, but the lesson of Internet Explorer should tell us to prefer correctness over flexibility, I think.  
We can, of course, change this back. if you think.  It is ieasier now, that the chunk consumer is in a single method.

----------

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


More information about the Python-bugs-list mailing list