Éric Araujo <mer...@netwok.org> added the comment: I understand your report better after looking at the code.
There is indeed a protocol_version parameter in the test function (which is really a main function, not test), that sets the protocol attribute on the passed handler class. (The class attribute is changed, which seems like a bug!) The BaseHTTPRequestHandler class does have support for HTTP 1.1 (adds automatic keep-alive). So if we ignore the distraction that OP changed the source code, and imaging instead that they called `test(protocol="HTTP/1.1")`, then there would be a bug if the requests went out as HTTP/1.0. Hugo, can you attach a minimal reproducer? (a python script as small as possible to show the problem — don’t edit code in http.server but call the http.server.test function with your own code) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue46285> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com