Issue #12039: Add end_headers() call to avoid BadStatusLine.
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
index 1768e8b..c68de10 100644
--- a/Lib/test/test_logging.py
+++ b/Lib/test/test_logging.py
@@ -1489,6 +1489,7 @@
             except:
                 self.post_data = None
         request.send_response(200)
+        request.end_headers()
         self.handled.set()
 
     def test_output(self):