Serhiy Storchaka added the comment: > A separate new function now takes care of the reading of chunk-header and > tail. This simplifies the other functions.
Good. It is even better than I expected. > Do we gain anything by doing that, would it change the code? or would it > merely be for the benefit of ABC? Yes, it for the benefit of ABC. Some code tests isinstance(file, io.BufferedIOBase) and wraps stream in BufferedReader if it is false. > Note that the chunk protocol was wrong and I fixed the unittests: The final > chunk is a _valid_ zero length chunk, i.e. 0\r\n\r\n. It contains two eol > tokens like other chunks, one at the end of the length, the other at the end > of the(null) payload. How new code processes invalid final chunk 0\r\n? We need test to check that there is no degradation. Perhaps it relates to behavior change which I mention in the comment on Rietveld. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19009> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com