[3.14] Try to fix the fix for gh-119452#142180
[3.14] Try to fix the fix for gh-119452#142180serhiy-storchaka wants to merge 2 commits intopython:3.14from
Conversation
|
!buildbot AMD64 Windows11 Non-Debug |
|
🤖 New build scheduled with the buildbot fleet by @serhiy-storchaka for commit f00ef9f 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F142180%2Fmerge The command will test the builders whose names match following regular expression: The builders matched are:
|
Lib/http/server.py
Outdated
| while (len(data) < nbytes and len(data) != cursize and | ||
| cursize = min(nbytes, _MIN_READ_BUF_SIZE) | ||
| data = self.rfile.read(cursize) | ||
| while (len(data) == cursize < nbytes and |
There was a problem hiding this comment.
len(data) == cursize means that we're expecting that cursize bytes of the data arrive over the socket simultaneously, right?
There was a problem hiding this comment.
Yes, and this assumption was incorrect. There was another bug in the old code -- it did not work on Linux without fork(), because read(n) could return less than n bytes. #119455 fixed it, and we need to preserve this fix. I restored that code and try another approach -- using non-zero timeout.
|
The old PR with this fix has been created as #142216. |
Uh oh!
There was an error while loading. Please reload this page.