diff options
Diffstat (limited to 'src/network/access/qnetworkreplyhttpimpl.cpp')
-rw-r--r-- | src/network/access/qnetworkreplyhttpimpl.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/network/access/qnetworkreplyhttpimpl.cpp b/src/network/access/qnetworkreplyhttpimpl.cpp index 84b1ddf5ac..55eb7d4f08 100644 --- a/src/network/access/qnetworkreplyhttpimpl.cpp +++ b/src/network/access/qnetworkreplyhttpimpl.cpp @@ -762,6 +762,12 @@ void QNetworkReplyHttpImplPrivate::postRequest(const QNetworkRequest &newHttpReq if (request.attribute(QNetworkRequest::HTTP2AllowedAttribute).toBool()) httpRequest.setHTTP2Allowed(true); + if (request.attribute(QNetworkRequest::Http2DirectAttribute).toBool()) { + // Intentionally mutually exclusive - cannot be both direct and 'allowed' + httpRequest.setHTTP2Direct(true); + httpRequest.setHTTP2Allowed(false); + } + if (static_cast<QNetworkRequest::LoadControl> (newHttpRequest.attribute(QNetworkRequest::AuthenticationReuseAttribute, QNetworkRequest::Automatic).toInt()) == QNetworkRequest::Manual) @@ -1239,7 +1245,9 @@ void QNetworkReplyHttpImplPrivate::replyDownloadMetaData(const QList<QPair<QByte q->setAttribute(QNetworkRequest::HttpPipeliningWasUsedAttribute, pu); const QVariant http2Allowed = request.attribute(QNetworkRequest::HTTP2AllowedAttribute); - if (http2Allowed.isValid() && http2Allowed.toBool()) { + const QVariant http2Direct = request.attribute(QNetworkRequest::Http2DirectAttribute); + if ((http2Allowed.isValid() && http2Allowed.toBool()) + || (http2Direct.isValid() && http2Direct.toBool())) { q->setAttribute(QNetworkRequest::HTTP2WasUsedAttribute, spdyWasUsed); q->setAttribute(QNetworkRequest::SpdyWasUsedAttribute, false); } else { |