mirror of
https://github.com/curl/curl.git
synced 2026-08-24 13:43:32 +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
|
|
@ -36,7 +36,7 @@
|
|||
#include <libssh/sftp.h>
|
||||
#endif
|
||||
|
||||
#include "curl_path.h"
|
||||
#include "vssh.h"
|
||||
|
||||
/* meta key for storing protocol meta at easy handle */
|
||||
#define CURL_META_SSH_EASY "meta:proto:ssh:easy"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue