From dfca731b9c5eff4a92f5f29e4dc4505fcc20682c Mon Sep 17 00:00:00 2001 From: James Addison Date: Thu, 27 Apr 2023 19:33:59 +0100 Subject: [PATCH] tests: linkcheck: InfiniteRedirectOnHeadHandler: close server-side connection after response body is written, since we do not anticipate the client will read it Ref: https://github.com/sphinx-doc/sphinx/pull/11340#issuecomment-1526141880 --- tests/test_build_linkcheck.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_build_linkcheck.py b/tests/test_build_linkcheck.py index 5fab448069b..356e2c8a19d 100644 --- a/tests/test_build_linkcheck.py +++ b/tests/test_build_linkcheck.py @@ -536,6 +536,7 @@ def do_GET(self): self.send_header("Content-Length", str(len(content))) self.end_headers() self.wfile.write(content) + self.close_connection = True # we don't expect the client to read this response body @pytest.mark.sphinx('linkcheck', testroot='linkcheck-localserver', freshenv=True)