Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

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

Daniel Graña6720acc1afdb
diff --git a/scrapy/core/downloader/handlers/http11.py b/scrapy/core/downloader/handlers/http11.py
index 6690bbe96..bc25dbf28 100644
--- a/scrapy/core/downloader/handlers/http11.py
+++ b/scrapy/core/downloader/handlers/http11.py
@@ -147,5 +147,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)