[issue25095] test_httpservers hangs on 3.5.0, win 7

Berker Peksag report at bugs.python.org
Thu Jan 4 15:14:47 EST 2018


Berker Peksag <berker.peksag at gmail.com> added the comment:

Thank you for tracking down the problem, William! I just took a quick look at your patch and it seems reasonable to me.

Setting protocol_version to 'HTTP/1.1' means setting the close_connection attribute of BaseHTTPRequestHandler to False which is expected and a feature of HTTP/1.1 (persistent connections)

Quoting RFC 2616:

    HTTP/1.1 defines the "close" connection option for the sender to
    signal that the connection will be closed after completion of the
    response.

    HTTP/1.1 applications that do not support persistent connections MUST
    include the "close" connection option in every message.

So I think it's OK to send a "Connection: close" header in the test (it would be nice to add a comment though)

----------
components:  -Library (Lib)
nosy: +berker.peksag

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue25095>
_______________________________________


More information about the Python-bugs-list mailing list