Fix cancelled payload send leading to hung connection#8992
Fix cancelled payload send leading to hung connection#8992Dreamsorcerer merged 5 commits intomasterfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## master #8992 +/- ##
=======================================
Coverage 98.28% 98.29%
=======================================
Files 107 107
Lines 34317 34320 +3
Branches 4064 4063 -1
=======================================
+ Hits 33729 33734 +5
+ Misses 415 413 -2
Partials 173 173
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
…nto fix-client-conn-reuse
Backport to 3.10: 💔 cherry-picking failed — conflicts found❌ Failed to cleanly apply 5c0b8e4 on top of patchback/backports/3.10/5c0b8e4a7897f48063f684ac16e7dd18f6218274/pr-8992 Backporting merged PR #8992 into master
🤖 @patchback |
Backport to 3.11: 💔 cherry-picking failed — conflicts found❌ Failed to cleanly apply 5c0b8e4 on top of patchback/backports/3.11/5c0b8e4a7897f48063f684ac16e7dd18f6218274/pr-8992 Backporting merged PR #8992 into master
🤖 @patchback |
(cherry picked from commit 5c0b8e4)
(cherry picked from commit 5c0b8e4)
I've thought it through here, and I don't think we can safely reuse the connection at this point when we haven't finished sending the payload.
If it's not chunked, and therefore has a Content-Length, reusing the connection will result in the server thinking it's still reading the last message.
If it is chunked, then we can technically send a closing chunk to complete the message and then reuse it. However, that may lead the server to think that it has received the full message when it hasn't.
Fixes #7599.