mirror of
https://github.com/curl/curl.git
synced 2026-08-24 14:23:30 +03:00
sftp: fix range downloads in both SSH backends
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
This commit is contained in:
parent
67ef4a34f2
commit
c545e10fa7
12 changed files with 204 additions and 84 deletions
|
|
@ -265,7 +265,7 @@ test2400 test2401 test2402 test2403 test2404 test2405 test2406 \
|
|||
\
|
||||
test2500 test2501 test2502 test2503 \
|
||||
\
|
||||
test2600 test2601 test2602 test2603 test2604 \
|
||||
test2600 test2601 test2602 test2603 test2604 test2605 \
|
||||
\
|
||||
test2700 test2701 test2702 test2703 test2704 test2705 test2706 test2707 \
|
||||
test2708 test2709 test2710 test2711 test2712 test2713 test2714 test2715 \
|
||||
|
|
|
|||
20
tests/data/test2605
Normal file
20
tests/data/test2605
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<testcase>
|
||||
<info>
|
||||
<keywords>
|
||||
unittest
|
||||
sftp
|
||||
</keywords>
|
||||
</info>
|
||||
|
||||
#
|
||||
# Client-side
|
||||
<client>
|
||||
<features>
|
||||
unittest
|
||||
sftp
|
||||
</features>
|
||||
<name>
|
||||
Curl_ssh_range unit test
|
||||
</name>
|
||||
</client>
|
||||
</testcase>
|
||||
|
|
@ -35,7 +35,7 @@ for ssh test
|
|||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<errorcode>
|
||||
36
|
||||
33
|
||||
</errorcode>
|
||||
</verify>
|
||||
</testcase>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue