diff options
author | Mårten Nordheim <marten.nordheim@qt.io> | 2021-11-26 13:15:46 +0100 |
---|---|---|
committer | Mårten Nordheim <marten.nordheim@qt.io> | 2021-11-30 00:04:38 +0100 |
commit | 4c930e9d13738ac0faaaed3aa5b1c34509b04019 (patch) | |
tree | 29b1b1f41ebd2991e7fcece6b99aa820f427845e /src/network/access/qhttpnetworkrequest.cpp | |
parent | ca9d72f4652e21ecaf6e50be2e7b851c4ec69486 (diff) |
QNAM: Disable h2c by default
And since it's relatively unlikely to be used, just leave it
behind a environment variable for now.
[ChangeLog][QtNetwork][Potentially Source-Incompatible] Support for
clear-text http/2 was disabled due to incompatibility with certain
servers. If you were relying on this feature you must re-enable it by
setting the QT_NETWORK_ALLOW_H2C environment variable. For a later
version of Qt it will get a dedicated attribute.
Pick-to: 6.2
Task-number: QTBUG-98642
Change-Id: Id3e360726e285b3128e3e3f4bce9440404c9ad6e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/network/access/qhttpnetworkrequest.cpp')
-rw-r--r-- | src/network/access/qhttpnetworkrequest.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/network/access/qhttpnetworkrequest.cpp b/src/network/access/qhttpnetworkrequest.cpp index f370445059..f419ee2673 100644 --- a/src/network/access/qhttpnetworkrequest.cpp +++ b/src/network/access/qhttpnetworkrequest.cpp @@ -365,6 +365,16 @@ void QHttpNetworkRequest::setHTTP2Direct(bool b) d->http2Direct = b; } +bool QHttpNetworkRequest::isH2cAllowed() const +{ + return qEnvironmentVariableIsSet("QT_NETWORK_H2C_ALLOWED"); +} + +void QHttpNetworkRequest::setH2cAllowed(bool b) +{ + Q_UNUSED(b); +} + bool QHttpNetworkRequest::withCredentials() const { return d->withCredentials; |