Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [QNetwork] issues with files served by PHP
Forum Updated to NodeBB v4.3 + New Features

[QNetwork] issues with files served by PHP

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 464 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mistic100
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved