Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. How to change "referer" of request header
Forum Updated to NodeBB v4.3 + New Features

How to change "referer" of request header

Scheduled Pinned Locked Moved Unsolved QtWebEngine
6 Posts 3 Posters 1.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    youthdou
    wrote on 18 Jan 2018, 12:16 last edited by
    #1

    My qt version is 5.8. I set "referer" in QWebEngineUrlRequestInterceptor, but it doesn't work! The code likes this:

    void TWebEngineUrlRequestInterceptor::interceptRequest(QWebEngineUrlRequestInfo &info)
    {
        info.setHttpHeader("Referer", "xxxxxxxx");
    }
    
    R 1 Reply Last reply 18 Jan 2018, 12:31
    0
    • Y youthdou
      18 Jan 2018, 12:16

      My qt version is 5.8. I set "referer" in QWebEngineUrlRequestInterceptor, but it doesn't work! The code likes this:

      void TWebEngineUrlRequestInterceptor::interceptRequest(QWebEngineUrlRequestInfo &info)
      {
          info.setHttpHeader("Referer", "xxxxxxxx");
      }
      
      R Offline
      R Offline
      raven-worx
      Moderators
      wrote on 18 Jan 2018, 12:31 last edited by
      #2

      @youthdou said in How to change "referer" of request header:

      but it doesn't work

      enlighten us please.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      1
      • Y Offline
        Y Offline
        youthdou
        wrote on 19 Jan 2018, 08:33 last edited by
        #3

        @raven-worx said in How to change "referer" of request header:

        enlighten

        QWebEngineUrlRequestInterceptor does not allow to pass the Referer header

        R J 2 Replies Last reply 19 Jan 2018, 08:45
        0
        • Y youthdou
          19 Jan 2018, 08:33

          @raven-worx said in How to change "referer" of request header:

          enlighten

          QWebEngineUrlRequestInterceptor does not allow to pass the Referer header

          R Offline
          R Offline
          raven-worx
          Moderators
          wrote on 19 Jan 2018, 08:45 last edited by
          #4

          @youthdou
          yes, very enlightening...
          So we can continue guessing what you want us to say by posting the link without any further words.

          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
          If you have a question please use the forum so others can benefit from the solution in the future

          Y 1 Reply Last reply 22 Jan 2018, 02:06
          0
          • Y youthdou
            19 Jan 2018, 08:33

            @raven-worx said in How to change "referer" of request header:

            enlighten

            QWebEngineUrlRequestInterceptor does not allow to pass the Referer header

            J Offline
            J Offline
            JonB
            wrote on 19 Jan 2018, 08:53 last edited by
            #5

            @youthdou
            I'm not a Qt representative so I don't know what you do about it, but that link states it's an open/unresolved bug which prevents the Referer Header being altered from Qt. Unless you are compiling Qt yourself and can follow the Old/New Code there to make the change to allow it, I think....

            1 Reply Last reply
            1
            • R raven-worx
              19 Jan 2018, 08:45

              @youthdou
              yes, very enlightening...
              So we can continue guessing what you want us to say by posting the link without any further words.

              Y Offline
              Y Offline
              youthdou
              wrote on 22 Jan 2018, 02:06 last edited by
              #6

              @raven-worx
              I have sovled it by compiling Qt. But I think there should be some tips in QT documents to describe it.

              1 Reply Last reply
              1

              1/6

              18 Jan 2018, 12:16

              • Login

              • Login or register to search.
              1 out of 6
              • First post
                1/6
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved