mirror of
https://github.com/curl/curl.git
synced 2026-04-13 12:41:42 +08:00
When asking for the last N bytes of a file, and that size was larger than the file size, it would miss the first byte due to a logic error. The fixed range parser is now made a common function in the file now renamed to vssh.c (from curl_path.c) - used by both backends. Unit test 2605 verifies the parser. Reported-by: Stanislav Fort (Aisle Research) Closes #19460
42 lines
592 B
Plaintext
42 lines
592 B
Plaintext
<testcase>
|
|
<info>
|
|
<keywords>
|
|
SFTP
|
|
Range
|
|
</keywords>
|
|
</info>
|
|
|
|
#
|
|
# Server-side
|
|
<reply>
|
|
<data>
|
|
</data>
|
|
</reply>
|
|
|
|
#
|
|
# Client-side
|
|
<client>
|
|
<server>
|
|
sftp
|
|
</server>
|
|
<name>
|
|
SFTP retrieval with invalid X- range
|
|
</name>
|
|
<command>
|
|
--key %LOGDIR/server/curl_client_key --pubkey %LOGDIR/server/curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%SFTP_PWD/%LOGDIR/file%TESTNUMBER.txt -r 99- --insecure
|
|
</command>
|
|
<file name="%LOGDIR/file%TESTNUMBER.txt">
|
|
Test data
|
|
for ssh test
|
|
</file>
|
|
</client>
|
|
|
|
#
|
|
# Verify data after the test has been "shot"
|
|
<verify>
|
|
<errorcode>
|
|
33
|
|
</errorcode>
|
|
</verify>
|
|
</testcase>
|