Important: Please read the Qt Code of Conduct -

Downloadproblem because of meta refresh

  • Hello.

    I have a Problem with downloading in qt via QNetworkAccessManager.

    I successfully login. After that i request a Filelist in xml. But what i get back is this:
    <title>Extranet Filetransfer</title>
    <meta http-equiv="refresh" content="1;" />
    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
    <meta http-equiv="Content-Style-Type" content="text/css">
    <link rel="shortcut icon" href="/FT/navigation/extranet/images/favicon.ico" type="image/x-icon">
    <link rel="icon" href="/FT/navigation/extranet/images/favicon.ico" type="image/x-icon">
    <!-- Frameset definieren -->

    <frameset rows="80,20,*" border="0" frameborder="no" framespacing="0">
    <frame src="startup/navigationHead.html" name="navi_head" noresize="noresize" marginheight="0" marginwidth="0" scrolling="no">
    <frame src="startup/navigationSubHead.htm" name="navi_subhead" noresize="noresize" marginheight="0" marginwidth="0" scrolling="no">

    <frameset cols="190, *">
    <frame src="startup/navigationBar.html" name="navi_bar" noresize="noresize" marginwidth="0" marginheight="0" scrolling="auto">
    <frame src="startup/navigationContent.html" name="content" noresize="noresize" marginwidth="0" marginheight="0" scrolling="auto">

    The Site refresh and goes to https://... / Now I dont know what to do. I make a Request to https://.../ but i get nothing back. What is the ".do" extension?

    Thank's for help :)

  • Moderators

    Are you using the same QNetworkAccessManager instance for all requests?

    Also make sure that you have a Qt version compiled with OpenSSL support and that the OpenSSL libraries are available and loaded by the application.
    And check the ssl errors of the response.

  • Yes i use the same QNetworkAccessManager for all Requests...

    OpenSSL is not the Problem it works fine.

    This is the code i use to make a request to

    QNetworkRequest Request(reply->url().toString().append(""));

    Request.setHeader(QNetworkRequest::CookieHeader, VCookies);


  • Then i get a reply and i use this Method to download the file:
    bool Download::SaveToDisk(const QString& QSFileName, QIODevice* data) const
    QFile File(QSFileName);

    QFileInfo Info(File);
    qDebug() << Info.absoluteFilePath();

    if (!
    qCritical() << QString("[DownloadManager] Could not open file %1. Error: %2")
    return false;


    qDebug() << QString("[DownloadManager] File %1 written").arg(QSFileName);

    return true;

    But the file is empty :(

  • Moderators

    did you check if
    results in a correct url?

  • I think thats the Problem and i will check it.

    For now, thanks for the help :)

  • Got it! :)

    You were right the url was wrong. Hours of my life wasted :/

Log in to reply