Skip to content

Commit

Permalink
tests: linkcheck: test server OKHandler: don't re-use do_HEAD request…
Browse files Browse the repository at this point in the history
… handler during do_GET handler, because the former closes the response headers by calling 'self.end_headers'
  • Loading branch information
jayaddison committed Apr 27, 2023
1 parent 8fee994 commit 0ed465c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_build_linkcheck.py
Expand Up @@ -443,9 +443,10 @@ def do_HEAD(self):
self.end_headers()

def do_GET(self):
self.do_HEAD()
content = b"ok\n"
self.send_response(200, "OK")
self.send_header("Content-Length", str(len(content)))
self.end_headers()
self.wfile.write(content)


Expand Down

0 comments on commit 0ed465c

Please sign in to comment.