Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. QT WebKit, disable HTTP2
Forum Update on Monday, May 27th 2025

QT WebKit, disable HTTP2

Scheduled Pinned Locked Moved Unsolved Qt WebKit
2 Posts 2 Posters 1.1k Views
  • 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.
  • N Offline
    N Offline
    nlazovic 0
    wrote on 12 Sept 2018, 18:39 last edited by
    #1

    Using Qt 5.8 and WebKit in QML app.

    WebKit executes http page that makes Javascript call to get some data. Request going out is HTTP1, requesting upgrade to HTTP2. See request Header below.

    Server does not like that and does not respond :(.

    Question: Is there a way to tell WebKit to stay with HTTP1 ?

    Request header

    GET /testUrl?_=1536729668549 HTTP/1.1
    User-Agent: Mozilla/5.0 (Unknown; Linux) AppleWebKit/602.1 (KHTML, like Gecko) diplayer-pt1 Version/10.0 Safari/602.1
    Accept: */*
    Origin: null
    Accept-Encoding: gzip, deflate
    Accept-Language: en-GB,*
    Host: 192.168.1.117:6002
    Connection: Keep-Alive, Upgrade, HTTP2-Settings
    Upgrade: h2c
    HTTP2-Settings: AAIAAAAAAAQBR64U
    
    
    1 Reply Last reply
    1
    • A Offline
      A Offline
      AndyS
      Moderators
      wrote on 13 Sept 2018, 20:59 last edited by
      #2

      Hi @nlazovic-0,

      Using QWebView::load() that takes a QNetworkRequest would be the way to go as you can set whatever headers you want, so you can make the adjustments there. However, I would have thought that the server is at fault here as it is a request, it doesn't have to go to HTTP/2.

      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1

      1/2

      12 Sept 2018, 18:39

      • Login

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