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

QUrl returns empty when initiailzed with IPv6 containing scope ID

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 5.3.0
    • Core: I/O
    • None
    • Windows 7 (64 bit), Visual Studio 2013 Update 2

    Description

      When QUrl is set to a IPv6 host address containing a scope Id, the QUrl returns an empty URL.

      #include <QUrl>
      
      int main(int /*argc*/, char* /*argv*/[])
      {
          // With host address containing no IPv6 scopeId
          QUrl u("http://[::1]:8080");
          qDebug( "1. url: %s", qPrintable( u.toString()));     
      
          // With host address "::1%0" containing scopeId as
          // returned by QAbstractSocket::peerAddress() when
          // connecting with localhost IPv6.
          u = QUrl("http://[::1%0]:8080");
          qDebug( "2. url: %s", qPrintable( u.toString()));    
      }
      

      prints:

      1. url: http://[::1]:8080
      2. url:
      

      Attachments

        Issue Links

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

          Activity

            People

              thiago Thiago Macieira
              mariusheise Marius Heise
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes