Treat responses without content-length or Transfer-Encoding as good responses

There is not a way to determine if responses without Content-Length or Transfer-Encoding are complete, this change treat them as good responses but flags them as "partial".
This is backout change only for this functionality of 3c64a989
This commit is contained in:
Daniel Graña 2013-08-27 11:09:55 -03:00
parent 6cbe68477c
commit c4bf3249bc
1 changed files with 2 additions and 0 deletions

View File

@ -148,5 +148,7 @@ class _ResponseReader(protocol.Protocol):
body = self._bodybuf.getvalue()
if reason.check(ResponseDone):
self._finished.callback((self._txresponse, body, None))
elif reason.check(PotentialDataLoss):
self._finished.callback((self._txresponse, body, ['partial']))
else:
self._finished.errback(reason)