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. QNetworkManager fails to download in some cases [SOLVED]
Forum Updated to NodeBB v4.3 + New Features

QNetworkManager fails to download in some cases [SOLVED]

Scheduled Pinned Locked Moved General and Desktop
13 Posts 4 Posters 5.0k 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.
  • A Offline
    A Offline
    adnan
    wrote on last edited by
    #1

    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 furk.net. 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:
    http://g9uau0ao42n1kortjknotrql05sr45pbh4uq8s8.gcdn.biz/d/r/Y4APk1wSRw6QCiOdWl1tKD-hKUKyDHCYn5rsDoRf9gPxJkYidwuSQSDO6xBEBEwDZ0ZGZl0iWW384kTVqcNOBw/black Stone V3 – 6.zip

    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

    1 Reply Last reply
    0
    • A Offline
      A Offline
      adnan
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0
      • K Offline
        K Offline
        koahnig
        wrote on last edited by
        #3

        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.

        Vote the answer(s) that helped you to solve your issue(s)

        1 Reply Last reply
        0
        • A Offline
          A Offline
          adnan
          wrote on last edited by
          #4

          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 stone-3.2.zip". 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 : http://cgcjhgcfjfjfjcgcxhg.black"percent20"stone-3.2.zip

          is converted to http://cgcjhgcfjfjfjcgcxhg.black stone-3.2.zip

          by QNetworkRequest or QNetworkManager thereby rendering url invalid.

          1 Reply Last reply
          0
          • K Offline
            K Offline
            koahnig
            wrote on last edited by
            #5

            You may want to file a bug report on "JIRA":https://bugreports.qt-project.org/secure/Dashboard.jspa
            Please post the link to bug report here. This allows others to vote and track the issue as well.

            Vote the answer(s) that helped you to solve your issue(s)

            1 Reply Last reply
            0
            • L Offline
              L Offline
              lgeyer
              wrote on last edited by
              #6

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

              1 Reply Last reply
              0
              • A Offline
                A Offline
                adnan
                wrote on last edited by
                #7

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

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  goetz
                  wrote on last edited by
                  #8

                  [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.

                  http://www.catb.org/~esr/faqs/smart-questions.html

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    adnan
                    wrote on last edited by
                    #9

                    Here is the link to bug report:

                    https://bugreports.qt-project.org*******************//wrong report

                    1 Reply Last reply
                    0
                    • A Offline
                      A Offline
                      adnan
                      wrote on last edited by
                      #10

                      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.

                      1 Reply Last reply
                      0
                      • G Offline
                        G Offline
                        goetz
                        wrote on last edited by
                        #11

                        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.

                        http://www.catb.org/~esr/faqs/smart-questions.html

                        1 Reply Last reply
                        0
                        • A Offline
                          A Offline
                          adnan
                          wrote on last edited by
                          #12

                          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.

                          1 Reply Last reply
                          0
                          • A Offline
                            A Offline
                            adnan
                            wrote on last edited by
                            #13

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

                            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