From b2c0f9713c1c39bc3214df49f0d2b44bcc84d790 Mon Sep 17 00:00:00 2001 From: Timur Pocheptsov Date: Tue, 12 Jan 2016 14:45:47 +0100 Subject: 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 --- src/network/access/qhttpnetworkrequest.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/network/access/qhttpnetworkrequest.cpp') 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; -- cgit v1.2.3