Results 1 to 2 of 2

Thread: Html Redirect with wait time!

  1. #1
    Join Date
    Jul 2010
    Posts
    41
    Thanks
    6
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Html Redirect with wait time!

    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:
    Qt Code:
    1. <meta http-equiv="refresh" content="5; url=http://downloads.sourceforge.net/project/ganjoor/gdb/rhi-mEiri.zip?r=&amp;ts=1337697681&amp;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!)

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Html Redirect with wait time!

    You must read the downloaded data and search for the redirection or use a web browser (such as QWebPage) that will do it for you.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. The following user says thank you to wysota for this useful post:

    srazi (23rd May 2012)

Similar Threads

  1. How to redirect to a URL in Qt
    By xyz in forum Newbie
    Replies: 8
    Last Post: 30th March 2012, 07:39
  2. Redirect printf and update progressbar
    By rouge in forum Newbie
    Replies: 2
    Last Post: 7th October 2011, 23:06
  3. wait the application for some time..
    By mohanakrishnan in forum Qt Programming
    Replies: 3
    Last Post: 9th December 2009, 08:22
  4. redirect qDebug() to file
    By sriky27 in forum Qt Programming
    Replies: 9
    Last Post: 17th March 2009, 20:21
  5. Redirect printf to QTextEdit?
    By Randulf in forum Qt Programming
    Replies: 9
    Last Post: 12th October 2006, 14:57

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.