Skip to content

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

Fix flaky test_download_with_proxy_https_timeout(). (#7250)

Andrey Rakhmatullin0e1526ed30f3
diff --git a/tests/mockserver/http_resources.py b/tests/mockserver/http_resources.py
index 70a9b8ac6..62a3146bf 100644
--- a/tests/mockserver/http_resources.py
+++ b/tests/mockserver/http_resources.py
@@ -308,7 +308,8 @@ class UriResource(resource.Resource):
# ToDo: implement proper HTTPS proxy tests, not faking them.
if request.method != b"CONNECT":
return request.uri
- return b""
+ request.transport.write(b"HTTP/1.1 200 Connection established\r\n\r\n")
+ return NOT_DONE_YET
class ResponseHeadersResource(resource.Resource):