diff options
author | Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> | 2016-01-12 14:45:47 +0100 |
---|---|---|
committer | Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> | 2016-07-08 16:22:32 +0000 |
commit | b2c0f9713c1c39bc3214df49f0d2b44bcc84d790 (patch) | |
tree | 6a8eee65f90dd67968fd239606354d49f2202342 /src/network/access/qhttpnetworkrequest.cpp | |
parent | 6f61cfc33810054173a17443b20bfa2dce737285 (diff) |
HTTP2 protocol handler
Add HTTP2 support in QNAM - QHttp2ProtocolHandler + aux. classes.
[ChangeLog][QtNetwork] Added support for HTTP/2 protocol
Task-number: QTBUG-50956
Change-Id: I3a119cfbb1fb3118d9003225f5e54b46ae2829b6
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/network/access/qhttpnetworkrequest.cpp')
-rw-r--r-- | src/network/access/qhttpnetworkrequest.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/network/access/qhttpnetworkrequest.cpp b/src/network/access/qhttpnetworkrequest.cpp index 5d51e7fb1a..802043d847 100644 --- a/src/network/access/qhttpnetworkrequest.cpp +++ b/src/network/access/qhttpnetworkrequest.cpp @@ -47,7 +47,7 @@ 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), + autoDecompress(false), pipeliningAllowed(false), spdyAllowed(false), http2Allowed(false), withCredentials(true), preConnect(false), followRedirect(false), redirectCount(0) { } @@ -61,6 +61,7 @@ QHttpNetworkRequestPrivate::QHttpNetworkRequestPrivate(const QHttpNetworkRequest autoDecompress(other.autoDecompress), pipeliningAllowed(other.pipeliningAllowed), spdyAllowed(other.spdyAllowed), + http2Allowed(other.http2Allowed), withCredentials(other.withCredentials), ssl(other.ssl), preConnect(other.preConnect), @@ -82,6 +83,7 @@ bool QHttpNetworkRequestPrivate::operator==(const QHttpNetworkRequestPrivate &ot && (autoDecompress == other.autoDecompress) && (pipeliningAllowed == other.pipeliningAllowed) && (spdyAllowed == other.spdyAllowed) + && (http2Allowed == other.http2Allowed) // we do not clear the customVerb in setOperation && (operation != QHttpNetworkRequest::Custom || (customVerb == other.customVerb)) && (withCredentials == other.withCredentials) @@ -331,6 +333,16 @@ void QHttpNetworkRequest::setSPDYAllowed(bool b) d->spdyAllowed = b; } +bool QHttpNetworkRequest::isHTTP2Allowed() const +{ + return d->http2Allowed; +} + +void QHttpNetworkRequest::setHTTP2Allowed(bool b) +{ + d->http2Allowed = b; +} + bool QHttpNetworkRequest::withCredentials() const { return d->withCredentials; |