veeso / suppaftp

a super FTP/FTPS client library for Rust with support for both passive and active mode
Apache License 2.0
121 stars 31 forks source link

[BUG] - Fails to RETR large files #23

Closed mdeville closed 2 years ago

mdeville commented 2 years ago

Description

Using the CLI (or the lib), I get corrupted files when trying to retrieve them (using RETR).

Steps to reproduce

I tried to get the same file using the suppaftp-cli and the GNU ftp client. The GNU ftp client correctly retrieves the file as it is the same file size as the original one. I can run the command gunzip -d ftp.csv.gz without an issue. When I try to do the same with suppaftp, gunzip tells me that the file is corrupted.

❯ ls -l ftp.csv.gz suppa.csv.gz 
-rw-r--r-- 1 matthew_deville matthew_deville 11509311 Nov 10 11:44 ftp.csv.gz
-rw-r--r-- 1 matthew_deville matthew_deville 11552314 Nov 10 11:34 suppa.csv.gz

Expected behaviour

The file retrieved should be identical to the original one.

Environment

mdeville commented 2 years ago

Trying to make the bug reproducible by anyone, but failing to do so. Closing the issue for the moment.