[QNetwork] issues with files served by PHP
-
Hello everyone,
I am facing a very strange problem with the QNetworkAccessManager.
I want to use it to download a .exe file from my website.With a direct link like http://www.strangeplanet.fr/work/umwp-autochanger/UMWP_Autochanger_1.8_Setup.exe it works perfectly
But with a link to OwnCloud share script (PHP) http://files.strangeplanet.fr/public.php?service=files&t=bdcdd1a762c6fcc6416f0fcae57a0e4e&download there is problem:the download is well performed until 94% (says downloadProgress signal) but then I have to wait 40-50 seconds until the finished signal is emitted and the last bytes can be read from the buffer.
Actual code used: https://github.com/mistic100/UMWP-Autochanger/blob/master/src/gui/newversiondialog.cpp
But the problem doesn't come from my code, you can reproduce this issue with the network/download code example.
I did some network sniffing with Wireshark while downloading both files from my browser and can't see anything special (I might have forgot something obviously, there is so many data).
I looked at the code of OwnCloud and there is really nothing special, some HTTP headers to force the download and a fread loop (for info, this technique is used over core readfile function because of this bug https://bugs.php.net/bug.php?id=61636)
Thanks for your consideration