DataLoss error when content-length doesn't match actual body size #2586
Comments
The PR #2585 fixes this issue by adding a new setting
However, the fix requires to apply two patches to twisted ( twisted/twisted#711 and twisted/twisted#712 ) to allow to a clean solution. |
I had a look at a similar issue with HTTP 3xx in #2493 (comment) twisted/twisted#711 and twisted/twisted#712 look useful nonetheless. |
Fixed by #2590 |
Hello, scrapy [<twisted.python.failure.Failure twisted.internet.error.ConnectionDone: Connection was closed cleanly.><twisted.python.failure.Failure twisted.web.http._DataLoss: Chunked decoder in 'CHUNK_LENGTH' state , still expecting more data to get to 'FINISHED' state.> |
The example website below returns a
Content-Length
header larger than the actual response size. The webserver itself is broken (or misconfigured) because it returns theContent-Length
from the uncompressed body while it sends the compressed body.The text was updated successfully, but these errors were encountered: