Disable http2 for now due to Qt bug
authorXNG <Milokita@users.noreply.github.com>
Sun, 23 Feb 2020 02:04:56 +0000 (10:04 +0800)
committerMichael Schuster <michael@schuster.ms>
Mon, 2 Mar 2020 00:27:04 +0000 (01:27 +0100)
  So that user may continue to use http2 on their webpage

Signed-off-by: XNG <Milokita@users.noreply.github.com>
(cherry picked from commit dad95d4e4617211360bf2b4391e29c341e939844)
Signed-off-by: Michael Schuster <michael@schuster.ms>
src/libsync/accessmanager.cpp

index 26f392698b67050fdd3578929ac42550713fe1a3..6564ae0c860e188a0c275017498aea7306ef9d7a 100644 (file)
@@ -93,12 +93,12 @@ QNetworkReply *AccessManager::createRequest(QNetworkAccessManager::Operation op,
     qInfo(lcAccessManager) << op << verb << newRequest.url().toString() << "has X-Request-ID" << requestId;
     newRequest.setRawHeader("X-Request-ID", requestId);
 
-#if QT_VERSION >= QT_VERSION_CHECK(5, 9, 4)
-    // only enable HTTP2 with Qt 5.9.4 because old Qt have too many bugs (e.g. QTBUG-64359 is fixed in >= Qt 5.9.4)
+
+    // Disable http2 for now due to Qt bug
     if (newRequest.url().scheme() == "https") { // Not for "http": QTBUG-61397
-        newRequest.setAttribute(QNetworkRequest::HTTP2AllowedAttribute, true);
+        newRequest.setAttribute(QNetworkRequest::HTTP2AllowedAttribute, false);
     }
-#endif
+
 
     return QNetworkAccessManager::createRequest(op, newRequest, outgoingData);
 }