classification
Title: http.client.HTTPConnection doesn't work without TCP_NODELAY
Type: behavior Stage: patch review
Components: Library (Lib) Versions: Python 3.10
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: rtobar, rtobar2
Priority: normal Keywords: patch

Created on 2021-09-30 08:06 by rtobar2, last changed 2021-09-30 08:21 by rtobar.

Files
File name Uploaded Description Edit
http-client.patch rtobar2, 2021-09-30 08:06
Pull Requests
URL Status Linked Edit
PR 28646 open rtobar, 2021-09-30 08:21
Messages (1)
msg402937 - (view) Author: R (rtobar2) * Date: 2021-09-30 08:06
I'm working on trying to run python under SerenityOS.

At the moment, SerenityOS doesn't implement the TCP_NODELAY socket option. This makes the HTTPConnection.connect() method raise an OSError for an operation that is otherwise optional. Additionally, the connection object can be left in an intermediate state: the underlying socket is always created, but depending on what method was invoked (either connect() directly or a higher-level one such as putrequest()) the connection object can be in IDLE or REQ_STARTED state.

I have a patch that works (attached), and I'll be working on submitting a PR now.

Usage of TCP_NODELAY was introduced in 3.5 (#23302), so even though I've been testing against 3.10rc2 for the time being I'm sure it will affect all versions in between.
History
Date User Action Args
2021-09-30 08:21:23rtobarsetnosy: + rtobar

pull_requests: + pull_request27014
stage: patch review
2021-09-30 08:06:56rtobar2create