Nominate our 2022 Qt Champions!

QNetworkManager fails to download in some cases [SOLVED]

  • My downloader developed using QT is working fine and i am testing it right now on many sites. Surprisingly it couldn’t download any file from I tried a simple program using qnetworkmanager it still failed i.e. no problem with my downloader. I tried downloading using other downloaders:
    fatrat: also developed using qt (it also failed)
    uget: successfully started download
    firefox in-built: successful I doubt there is some problem in parsing the url. I am pasting the url but it is expired: Stone V3 –

    there are no spaces at end actually “percent20” which were replaced by spaces by this editor Perhaps such long urls or “percent20” are not supported by qurl/qstring. plz help

  • Anybody plz reply. Is this a bug which could be fixed in next release of QT or i am committing some mistake. Possible reason i could think of is:
    Linux allows filenames with spaces as opposed to Windows. But actually Linux replaces spaces in filenames with "percent20" behind the scene, these are visible in only urls when we usually copy files. So if the file we are trying to download is on a server running Linux and has spaces in filename, the "percent20" is rightly parsed as space by QT but in this case shouldn't be.
    Perhaps this could be the problem. Somebody plz reply with some temporary workaround till it gets fixed.

  • The description in your post is a bit confusing for me.

    Positing the link here in devnet is certainly replacing the percent20 with a space. But that is just the editor.

    So the actual URL has percent20 in it?
    Or should the URL have the percent20 replaced by spaces?
    Do you know the actual filename?
    Does it have spaces or percent20 in it?

    The case that a filename has a percent sign it it, I am not sure if this is possible at all.

  • The actual url has "percent20"

    Actually the filename has spaces, but url cannot have a space, that is why spaces are replaced by "percent20" in urls, to prevent spaces in urls. The actual file name is "black". So there is a space in file name and this file is on linux server. To download this file the url replaces space by "percent20". But QT again converts "percent20" to space thereby rendering url invalid.

    In short :"percent20"

    is converted to

    by QNetworkRequest or QNetworkManager thereby rendering url invalid.

  • You may want to file a bug report on "JIRA":
    Please post the link to bug report here. This allows others to vote and track the issue as well.

  • In addition, you might post a small, compilable example that shows you problem. That would ease helping you a lot.

  • Sir, you can check this with network example of download manager given in QT Assistant

  • [quote author="adnan" date="1330688004"]Sir, you can check this with network example of download manager given in QT Assistant[/quote]

    That does not incorporate your actual code. If you're unwilling to provide your own code, we're unable (and maybe unwilling too) to help you.

  • Here is the link to bug report:*******************//wrong report

  • Actually my source code is of about 1000 lines. It hardly makes a difference. Actually i have changed my source code many times from then, actually trying hard with developing different dynamic file segmentation algorithms. My application is not going to be open source but if you still want the code i can upload it for a day and then remove the link.

  • You're expected to provide a small yet complete, compilable test case in order to someone else to help you. It usually can be boiled down to a small class, and a main function that just demonstrates and reproduces the error. Nothing more, nothing less. If you're unwilling to prepare this testcase, you're on your own.

  • Fine, i can do this much, but i need time as i am going out of station for 2 days, leaving in an hour. I will be back by monday.

  • The problem was wrongly diagnosed. There is no such issue of "percent20". Its something else! Sorry for so much hussle.

Log in to reply