mirror of
https://github.com/curl/curl.git
synced 2026-04-12 12:21:42 +08:00
When `curl_easy_cleanup()` is invoked while still being part of a multi handle, the code will auto-remove it. But since the connection was detached first, the code in `curl_multi_remove_handle()` that invalidates dirty connections did not bite. Attach the connection *after* the possible remove from a multi handle, so that connection reuse can be prevented. Add test753 to reproduce and verify the fix. This required adding the new debug env var CURL_FTP_PWD_STOP, to have a transfer return from multi_perform() early with a connection that does not show and pending input. Reported-by: Brian Harris Fixes https://github.com/curl/curl/issues/17578 Closes https://github.com/curl/curl/pull/17607
46 lines
535 B
Plaintext
46 lines
535 B
Plaintext
<testcase>
|
|
<info>
|
|
<keywords>
|
|
FTP
|
|
</keywords>
|
|
</info>
|
|
|
|
# Client-side
|
|
<client>
|
|
<features>
|
|
Debug
|
|
ftp
|
|
</features>
|
|
<server>
|
|
ftp
|
|
</server>
|
|
<tool>
|
|
lib%TESTNUMBER
|
|
</tool>
|
|
<name>
|
|
cleanup easy without multi_remove_handle
|
|
</name>
|
|
<command>
|
|
ftp://%HOSTIP:%FTPPORT/%TESTNUMBER
|
|
</command>
|
|
<setenv>
|
|
CURL_FTP_PWD_STOP=1
|
|
</setenv>
|
|
</client>
|
|
|
|
# Verify data after the test has been "shot"
|
|
<verify>
|
|
<protocol>
|
|
USER anonymous
|
|
PASS ftp@example.com
|
|
USER anonymous
|
|
PASS ftp@example.com
|
|
PWD
|
|
EPSV
|
|
TYPE I
|
|
SIZE 753
|
|
QUIT
|
|
</protocol>
|
|
</verify>
|
|
</testcase>
|