Skip to content

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

Remove unused _is_data_lost method

Adrián Chaves3bea5e1a974b
diff --git a/scrapy/core/http2/stream.py b/scrapy/core/http2/stream.py
index 8a701e7c6..c2a4b702f 100644
--- a/scrapy/core/http2/stream.py
+++ b/scrapy/core/http2/stream.py
@@ -362,14 +362,6 @@ class Stream:
self._protocol.conn.reset_stream(self.stream_id, ErrorCodes.REFUSED_STREAM)
self.close(reason)
- def _is_data_lost(self) -> bool:
- assert self.metadata['stream_closed_server']
-
- expected_size = self._response['flow_controlled_size']
- received_body_size = int(self._response['headers'][b'Content-Length'])
-
- return expected_size != received_body_size
-
def close(
self,
reason: StreamCloseReason,