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

QWebEngineUrlRequestInterceptor does not allow to pass the Referer header

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Done
    • Affects Version/s: 5.8.0
    • Fix Version/s: 5.12.4, 5.13.1, 5.14.0 Alpha
    • Component/s: WebEngine
    • Labels:
      None

      Description

      How to fix:
      file qtwebengine\src\core\network_delegate_qt.cpp
      method NetworkDelegateQt::OnBeforeURLRequest

      OLD CODE:

      for (auto header = infoPrivate->extraHeaders.constBegin(); header != end; ++header)
      request->SetExtraRequestHeaderByName(header.key().toStdString(), header.value().toStdString(), /* overwrite */ true);

      NEW CODE:

      for (auto header = infoPrivate->extraHeaders.constBegin(); header != end; ++header)

      { std::string h = header.key().toStdString(); if (base::LowerCaseEqualsASCII(h, "referer")) request->SetReferrer(header.value().toStdString()); else request->SetExtraRequestHeaderByName(h, header.value().toStdString(), /* overwrite */ true); }

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              lebeernae Leander Beernaert
              Reporter:
              alexeysurkis Alexey Surkis
              Votes:
              3 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes