I want download a file using QNetworkAccessManager, I use 'HTTP Client' example from Qt's networking examples.
You can use that for test by yourself.
For example I want to download "http://sourceforge.net/projects/ganjoor/files/gdb/rhi-mEiri.zip" and application recognize first redirect and ask about redirecting.(for this example it redirects to: "http://sourceforge.net/projects/ganjoor/files/gdb/rhi-mEiri.zip/download")
Now, this page contains:
<meta http-equiv="refresh" content="5; url=http://downloads.sourceforge.net/project/ganjoor/gdb/rhi-mEiri.zip?r=&ts=1337697681&use_mirror=garr">
<meta http-equiv="refresh" content="5; url=http://downloads.sourceforge.net/project/ganjoor/gdb/rhi-mEiri.zip?r=&ts=1337697681&use_mirror=garr">
To copy to clipboard, switch view to plain text mode
but unfortunately 'HTTP Client' doesn't recognize this one and download that html page!(i.e.: "http://sourceforge.net/projects/ganjoor/files/gdb/rhi-mEiri.zip/download")
Is there a way to recognize the last redirection? (or for example I must read the downloaded data and search for html redirection meta info!)
Bookmarks