Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-26286

Proxy connection hangs

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 4.8.2
    • Network
    • None
    • Gentoo Linux ~amd64

    Description

      If I try to get data over proxy, reply will timeout - isRunning will return true infinitely, result from readLine() is empty
      I can see in proxy server log that request was successful.

      QUrl lourl("http://qt-project.org/");
      QNetworkAccessManager lonam;
      QNetworkProxyQuery lonpq(lourl);
      QList<QNetworkProxy> lolist_proxy = QNetworkProxyFactory::systemProxyForQuery(lonpq);
      bool lbchecked = false;
      QString lserrors;
      bool lblatest = false;
      for (QList<QNetworkProxy>::const_iterator Loit = lolist_proxy.constBegin(); Loit != lolist_proxy.constEnd(); Loit++) {
      QNetworkRequest lonr(lourl);
      if (Loit->port() > 0)

      { vlog("trying: "+Loit->hostName()+':'+QString::number(Loit->port()), true); }

      lonam.setProxy(*Loit);
      auto Lonreply = lonam.get(lonr);
      if (Lonreply) {
      int loops = 30;
      while ((loops > 0) && Lonreply->isRunning()) {
      if (!abloop)

      { Lonreply->abort(); return; }

      loops--;
      sleep(1);
      vlog(Lonreply->readLine(), true);
      }
      if (!loops)

      { lserrors.append("timeout, ").append(QString::number(Lonreply->error())); continue; }

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            shkearns Shane Kearns
            wbrana William Brana
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes