[issue25095] test_httpservers hangs since Python 3.5
Martin Panter
report at bugs.python.org
Fri Sep 28 06:34:46 EDT 2018
Martin Panter <vadmium+py at gmail.com> added the comment:
Hi William, when I mentioned “Content-Length”, I meant adding it to the response from the server. See the second version of “do_GET” in my earlier comment <https://bugs.python.org/issue25095#msg309522>. But that is no good without also adding the “self.con.close()” line to the client I mentioned in two of my other comments.
In your latest rev. e6b09d4 (and earlier rev. 2022b6f) you send “Content-Length: 0” in a GET _request_, which doesn’t make much sense. GET requests never have bodies of any length. It is the “200 OK” _response_ that should have a body according to HTTP. The server has to shut down the connection or add “Content-Length: 0” (or use chunked encoding) to indicate the end of the body to the proxy.
So I would prefer to either adjust the “do_GET” server function as well as adding “self.con.close()” to the client, or just go back to rev. c1afa6b (“Connection: close”).
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue25095>
_______________________________________
More information about the Python-bugs-list
mailing list