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

Headers from QNAM::createRequest aren't shown in inspector

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Out of scope
    • Icon: Not Evaluated Not Evaluated
    • None
    • 5.5.0
    • WebKit
    • None
    • Archlinux

      https://bugreports.qt.io/browse/QTBUG-47266When setting custom headers via QNetworkRequest::setRawHeader, those changes aren't reflected in the network tab of the inspector, i.e. the data shown there doesn't match the data being sent - see the attached screenshot.

      New headers don't get added, and existing ones don't get changed.

      diff against the example browser to test this:

      --- networkaccessmanager.cpp.bak	2015-07-16 19:14:19.015860639 +0200
      +++ networkaccessmanager.cpp	2015-07-16 19:15:45.645860945 +0200
      @@ -90,6 +90,8 @@
           // this is a temporary hack until we properly use the pipelining flags from QtWebkit
           // pipeline everything! :)
           request.setAttribute(QNetworkRequest::HttpPipeliningAllowedAttribute, true);
      +    request.setRawHeader(QByteArray("Referer"), QByteArray("foo"));
      +    request.setRawHeader(QByteArray("X-Foobar"), QByteArray("bar"));
           return QNetworkAccessManager::createRequest(op, request, outgoingData);
       }
      

        1. uabug.png
          112 kB
          Florian Bruhin
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            allan.jensen Allan Sandfeld Jensen
            the compiler Florian Bruhin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes