diff options
Diffstat (limited to 'src/network/access/qhttpnetworkrequest.cpp')
-rw-r--r-- | src/network/access/qhttpnetworkrequest.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/network/access/qhttpnetworkrequest.cpp b/src/network/access/qhttpnetworkrequest.cpp index 60b566299f..3fcf946945 100644 --- a/src/network/access/qhttpnetworkrequest.cpp +++ b/src/network/access/qhttpnetworkrequest.cpp @@ -40,15 +40,13 @@ #include "qhttpnetworkrequest_p.h" #include "private/qnoncontiguousbytedevice_p.h" -#ifndef QT_NO_HTTP - QT_BEGIN_NAMESPACE QHttpNetworkRequestPrivate::QHttpNetworkRequestPrivate(QHttpNetworkRequest::Operation op, QHttpNetworkRequest::Priority pri, const QUrl &newUrl) : QHttpNetworkHeaderPrivate(newUrl), operation(op), priority(pri), uploadByteDevice(0), autoDecompress(false), pipeliningAllowed(false), spdyAllowed(false), http2Allowed(false), - withCredentials(true), preConnect(false), redirectCount(0), + http2Direct(false), withCredentials(true), preConnect(false), redirectCount(0), redirectPolicy(QNetworkRequest::ManualRedirectPolicy) { } @@ -63,6 +61,7 @@ QHttpNetworkRequestPrivate::QHttpNetworkRequestPrivate(const QHttpNetworkRequest pipeliningAllowed(other.pipeliningAllowed), spdyAllowed(other.spdyAllowed), http2Allowed(other.http2Allowed), + http2Direct(other.http2Direct), withCredentials(other.withCredentials), ssl(other.ssl), preConnect(other.preConnect), @@ -85,6 +84,7 @@ bool QHttpNetworkRequestPrivate::operator==(const QHttpNetworkRequestPrivate &ot && (pipeliningAllowed == other.pipeliningAllowed) && (spdyAllowed == other.spdyAllowed) && (http2Allowed == other.http2Allowed) + && (http2Direct == other.http2Direct) // we do not clear the customVerb in setOperation && (operation != QHttpNetworkRequest::Custom || (customVerb == other.customVerb)) && (withCredentials == other.withCredentials) @@ -350,6 +350,16 @@ void QHttpNetworkRequest::setHTTP2Allowed(bool b) d->http2Allowed = b; } +bool QHttpNetworkRequest::isHTTP2Direct() const +{ + return d->http2Direct; +} + +void QHttpNetworkRequest::setHTTP2Direct(bool b) +{ + d->http2Direct = b; +} + bool QHttpNetworkRequest::withCredentials() const { return d->withCredentials; @@ -383,5 +393,3 @@ int QHttpNetworkRequest::minorVersion() const QT_END_NAMESPACE -#endif - |