curl reuses connection when non-chunked data has not entirely been sent #11678
I did this
I caught a case where test 357 hung, while running the test suite under CPU starvation conditions. What seems to happen is this:
Here is an annotated excerpt from the trace log for the hanging test 357:
That's 65536 bytes, when the server is expecting 1053701 bytes.
That's the smoking gun ^^^
I expected the following
In step 6, curl should close the existing connection (since it is incomplete) and start a new one instead.
The text was updated successfully, but these errors were encountered:
Here's a somewhat complicated reproduction procedure, but it also seems pretty reliable:
In xterm 1 run:
In xterm 2 run:
In xterm 3 run:
As soon as you run the command in xterm 3, wait for the next period to appear in xterm 2, then immediately paste the clipboard into xterm 1. You should see a new set of headers from curl appear in xterm 1, then the system will hang. Examining the curl trace log should show substantially the same conditions mentioned in the bug report (although curl will likely have sent 128 KiB of data in the first connection instead of only 64 KiB).