[Pkg-owncloud-commits] [owncloud-client] 80/94: HTTP2: Only from Qt 5.9.4 #6285

Sandro Knauß hefee at debian.org
Thu Mar 29 11:12:17 UTC 2018


This is an automated email from the git hooks/post-receive script.

hefee pushed a commit to branch upstream
in repository owncloud-client.

commit 13f1122c504081d9a058ed6f1a6a33bc134bcf3c
Author: Markus Goetz <markus at woboq.com>
Date:   Fri Feb 9 16:06:38 2018 +0100

    HTTP2: Only from Qt 5.9.4 #6285
---
 ChangeLog                           | 1 +
 src/libsync/accessmanager.cpp       | 5 ++---
 src/libsync/connectionvalidator.cpp | 1 +
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 7b51f62..c6146e3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -13,6 +13,7 @@ version 2.4.1 (2017-02-xx)
 * Avatars: Use old location for servers <10 (#6279)
 * Link shares: Change default share name (#6298)
 * Nautilus integration: Work with python2 and python3
+* HTTP2: Only allow with Qt 5.9.4 (#6285)
 * Crash fixes
 
 version 2.4.0 (2017-12-21)
diff --git a/src/libsync/accessmanager.cpp b/src/libsync/accessmanager.cpp
index fdfa675..43f4ff9 100644
--- a/src/libsync/accessmanager.cpp
+++ b/src/libsync/accessmanager.cpp
@@ -93,9 +93,8 @@ 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, 0)
-    // only enable HTTP2 with Qt 5.9 because Qt 5.8.0 has too many bugs
-    // (only use one connection if the server does not support HTTP2)
+#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)
     if (newRequest.url().scheme() == "https") { // Not for "http": QTBUG-61397
         newRequest.setAttribute(QNetworkRequest::HTTP2AllowedAttribute, true);
     }
diff --git a/src/libsync/connectionvalidator.cpp b/src/libsync/connectionvalidator.cpp
index 3677770..1eac2a7 100644
--- a/src/libsync/connectionvalidator.cpp
+++ b/src/libsync/connectionvalidator.cpp
@@ -317,6 +317,7 @@ bool ConnectionValidator::setAndCheckServerVersion(const QString &version)
 
 #if QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)
     // Record that the server supports HTTP/2
+    // Actual decision if we should use HTTP/2 is done in AccessManager::createRequest
     if (auto job = qobject_cast<AbstractNetworkJob *>(sender())) {
         if (auto reply = job->reply()) {
             _account->setHttp2Supported(

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list