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

[patch] HTTP request to a host behind a proxy failed due to host name lookup failure

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.0.0
    • 5.0.0
    • Network
    • None
    • Ubuntu 11.04, QT5, QtBase module commit 52acc24cdf9e217353e2456cbc009e97176cb70b
    • 2b58e3db352424a597943a04a171bd9e46c6a718

    Description

      I want to make HTTP request to a server which is behind a proxy, and request is always failed with QNetworkReply::HostNotFoundError error.
      This happens because the host name can't be resolved in QHttpNetworkConnectionPrivate::startHostInfoLookup() when network layer preference (IPv4 or IPv6) is checked.
      Note, in my case host name can't be resolved via DNS, and should be resolved by proxy.

      This works fine on QT 4.7.x, so it's a regression in QT 5.0.0

      The solution is to check layer preference based on proxy host address (if proxy is set for that http connection), and not based on destination host address.

      Proposed patch is attached.

      Attachments

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

        Activity

          People

            xcm Martin Petersson (Inactive)
            akozhanov Andrey Kozhanov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes