summaryrefslogtreecommitdiffstats
path: root/src/network/access/qnetworkrequest.cpp
diff options
context:
space:
mode:
authorTimur Pocheptsov <[email protected]>2017-07-31 14:58:29 +0200
committerTimur Pocheptsov <[email protected]>2017-09-04 07:27:03 +0000
commit50eb44cc9bd47fd91e01d36e0cb0d124cfc6e736 (patch)
treec8f95518f7a9b2ac6842d365f019fbc6ab935817 /src/network/access/qnetworkrequest.cpp
parent75b5db3ce69e981132c86e90820d59becb874d4a (diff)
Introduce Http2DirectAttribute
Now that we have a proper ALPN/NPN + Protocol Upgrade, we can also add H2Direct - this can be useful for our users that have to work with either Secure Transport or a TLS implementation not supporting ALPN/NPN and with 'h2direct' servers in case they have prior knowledge of HTTP/2 support. The difference with RFC 7540 is the fact we also allow this 'direct' in case of 'https' scheme (it appears existing HTTP/2 server implementations support such mode too). [ChangeLog][QtNetwork] Add Http2DirectAttribute to enable 'direct' HTTP/2 protocol without ALPN/NPN and without protocol upgrade negotiations. Task-number: QTBUG-61397 Change-Id: I0499d33ec45dede765890059fd9542dab236bd5d Reviewed-by: Edward Welbourne <[email protected]>
Diffstat (limited to 'src/network/access/qnetworkrequest.cpp')
-rw-r--r--src/network/access/qnetworkrequest.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/network/access/qnetworkrequest.cpp b/src/network/access/qnetworkrequest.cpp
index 60701d45be1..277190b3bd0 100644
--- a/src/network/access/qnetworkrequest.cpp
+++ b/src/network/access/qnetworkrequest.cpp
@@ -298,6 +298,18 @@ QT_BEGIN_NAMESPACE
This attribute obsoletes FollowRedirectsAttribute.
(This value was introduced in 5.9.)
+ \value Http2DirectAttribute
+ Requests only, type: QMetaType::Bool (default: false)
+ If set, this attribute will force QNetworkAccessManager to use
+ HTTP/2 protocol without initial HTTP/2 protocol negotiation.
+ Use of this attribute implies prior knowledge that a particular
+ server supports HTTP/2. The attribute works with SSL or 'cleartext'
+ HTTP/2. If a server turns out to not support HTTP/2, when HTTP/2 direct
+ was specified, QNetworkAccessManager gives up, without attempting to
+ fall back to HTTP/1.1. If both HTTP2AllowedAttribute and
+ Http2DirectAttribute are set, Http2DirectAttribute takes priority.
+ (This value was introduced in 5.10.)
+
\value User
Special type. Additional information can be passed in
QVariants with types ranging from User to UserMax. The default