QT WebKit, disable HTTP2
Unsolved
Qt WebKit
-
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
-
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.