From d6ee48833a4895aff60d59f959d596b372b4ae87 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 cb835449861..c4d54c8fe4a 100644 --- a/tests/test_build_linkcheck.py +++ b/tests/test_build_linkcheck.py @@ -521,6 +521,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)