I'm currently facing a problem when downloading some files from an FTP server: they become corrupt. An introduction to the problem may be seen in this SO question (when I was thinking the problem was with my Qt-based software, while now I'm convinced it is on the server).
The situation is this: I want to copy 8 files to an FTP server and download them later using a Qt-based software with QNetworkAccessManager. In my attempts to do so, I discovered that allways 3 of the 8 files get corrupted (using both hash verification a.w.a. file size) in the same way (same erroneous file size). The problem is not with my software: downloading the files usign both Mozilla and Chrome results in the exact same errors. The entire process is as follows:
- 8 files are in a Linux Ubuntu folder. File sizes OK.
- The 8 files are transferred to Windows 7 folder.
- The files are send to the FTP server using FileZilla. Once finished, FileZilla tells the correct sizes for each of the 8 files.
- Files are downloaded both in Linux Ubuntu a.w.a. in Windows using both browsers and Qt-based app with QNetworkAccessManager. In Windows files are also downloaded with FileZilla.
- The same 3 files get corrupted - verified by the different sizes.
After discussing the problem in that SO question, it was suggested the problem could be server-sided. I did some research on the web and I found this, this and this. The suggestions would be different size calculation by FileZilla (difficult since I'm using Windows and Linux size calculation most of the time) and the "binary-or-ASCII transfer problem".
Regarding the second, I also find hard to believe this is the case because although 2 of the 3 problematic files are softwares and the other is a binary file, there is a fourth file which is also a binary and that shows no problem whatsoever. (and other 3 files are compressed .tar.gz wich I suppose are also binaries and, yet, they are downloaded corectly)
But lets suppose that was the case: I have to specify one of the two methods for the download. Well how could I do this both when downloading via Browser as well as when downloading via QNetworkAccessManager?
And what if this is not the case: then what is happening?