mirror of
https://github.com/curl/curl.git
synced 2026-04-12 12:21:42 +08:00
When a reused connection did transfer 0 bytes, it assumed the transfer had failed and needed a retry. Add a check for data->red.done, so we can successfully accept the transfer of a 0-length file via SFTP. Add test case 1583 to verfiy. Fix SFTP disconnect debug trace when there was nothing to disconnect (like when reusing a connection). Fixes #19165 Reported-by: Alexander Blach Closes #19189
38 lines
759 B
Plaintext
38 lines
759 B
Plaintext
<testcase>
|
|
<info>
|
|
<keywords>
|
|
SFTP
|
|
</keywords>
|
|
</info>
|
|
|
|
#
|
|
# Server-side
|
|
<reply>
|
|
</reply>
|
|
|
|
#
|
|
# Client-side
|
|
<client>
|
|
<server>
|
|
sftp
|
|
</server>
|
|
<precheck>
|
|
%PERL %SRCDIR/libtest/test613.pl prepare %PWD/%LOGDIR/test%TESTNUMBER.dir
|
|
</precheck>
|
|
<name>
|
|
SFTP dir and empty file
|
|
</name>
|
|
<command>
|
|
--key %LOGDIR/server/curl_client_key --pubkey %LOGDIR/server/curl_client_key.pub -u %USER: --insecure sftp://%HOSTIP:%SSHPORT%SFTP_PWD/%LOGDIR/test%TESTNUMBER.dir/ --next --key %LOGDIR/server/curl_client_key --pubkey %LOGDIR/server/curl_client_key.pub -u %USER: --insecure sftp://%HOSTIP:%SSHPORT%SFTP_PWD/%LOGDIR/test%TESTNUMBER.dir/emptyfile.txt
|
|
</command>
|
|
</client>
|
|
|
|
#
|
|
# Verify data after the test has been "shot"
|
|
<verify>
|
|
<errorcode>
|
|
0
|
|
</errorcode>
|
|
</verify>
|
|
</testcase>
|