Skip to content

Commit a58e439

Browse files
committed
Disable HTTP2 by default
Due to QTBUG-73947 and #7020. Use OWNCLOUD_HTTP2_ENABLED=1 to enable anyway.
1 parent 36e4b6f commit a58e439

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/libsync/accessmanager.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,11 @@ QNetworkReply *AccessManager::createRequest(QNetworkAccessManager::Operation op,
9696
#if QT_VERSION >= QT_VERSION_CHECK(5, 9, 4)
9797
// 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)
9898
if (newRequest.url().scheme() == "https") { // Not for "http": QTBUG-61397
99-
newRequest.setAttribute(QNetworkRequest::HTTP2AllowedAttribute, true);
99+
// Don't enable by default until QTBUG-73947 is fixed
100+
static auto http2EnabledEnv = qgetenv("OWNCLOUD_HTTP2_ENABLED");
101+
if (http2EnabledEnv == "1") {
102+
newRequest.setAttribute(QNetworkRequest::HTTP2AllowedAttribute, true);
103+
}
100104
}
101105
#endif
102106

0 commit comments

Comments
 (0)