diff options
author | Peter Hartmann <phartmann@blackberry.com> | 2014-01-22 14:54:21 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-19 21:44:15 +0100 |
commit | 1de244ea65f1b40c488fe92b29170c1b1d447233 (patch) | |
tree | a01d233e33847cf8709b6130ad7fa4656ff348de /src/network/access/qhttpnetworkconnectionchannel_p.h | |
parent | 42789d04a3078652594b8e06f520d7dd5e8021c5 (diff) |
network: add support for the SPDY protocol
Currently the only supported SPDY version is 3.0.
The feature needs to be enabled explicitly via
QNetworkRequest::SpdyAllowedAttribute. Whether SPDY actually was used
can be determined via QNetworkRequest::SpdyWasUsedAttribute from a
QNetworkReply once it has been started (i.e. after the encrypted()
signal has been received). Whether SPDY can be used will be
determined during the SSL handshake through the TLS NPN extension
(see separate commit).
The following things from SPDY have not been enabled currently:
* server push is not implemented, it has never been seen in the wild;
in that case we just reject a stream pushed by the server, which is
legit.
* settings are not persisted across SPDY sessions. In practice this
means that the server sends a small message upon session start
telling us e.g. the number of concurrent connections.
* SSL client certificates are not supported.
Task-number: QTBUG-18714
[ChangeLog][QtNetwork] Added support for the SPDY protocol (version
3.0).
Change-Id: I81bbe0495c24ed84e9cf8af3a9dbd63ca1e93d0d
Reviewed-by: Richard J. Moore <rich@kde.org>
Diffstat (limited to 'src/network/access/qhttpnetworkconnectionchannel_p.h')
-rw-r--r-- | src/network/access/qhttpnetworkconnectionchannel_p.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/network/access/qhttpnetworkconnectionchannel_p.h b/src/network/access/qhttpnetworkconnectionchannel_p.h index 7230eb2543..450b6fc419 100644 --- a/src/network/access/qhttpnetworkconnectionchannel_p.h +++ b/src/network/access/qhttpnetworkconnectionchannel_p.h @@ -104,8 +104,8 @@ public: bool ssl; bool isInitialized; ChannelState state; - QHttpNetworkRequest request; // current request - QHttpNetworkReply *reply; // current reply for this request + QHttpNetworkRequest request; // current request, only used for HTTP + QHttpNetworkReply *reply; // current reply for this request, only used for HTTP qint64 written; qint64 bytesTotal; bool resendCurrent; @@ -123,9 +123,13 @@ public: bool ignoreAllSslErrors; QList<QSslError> ignoreSslErrorsList; QSslConfiguration sslConfiguration; + QMultiMap<int, HttpMessagePair> spdyRequestsToSend; // sorted by priority void ignoreSslErrors(); void ignoreSslErrors(const QList<QSslError> &errors); void setSslConfiguration(const QSslConfiguration &config); + void requeueSpdyRequests(); // when we wanted SPDY but got HTTP + // to emit the signal for all in-flight replies: + void emitFinishedWithError(QNetworkReply::NetworkError error, const char *message); #endif #ifndef QT_NO_BEARERMANAGEMENT QSharedPointer<QNetworkSession> networkSession; |