summaryrefslogtreecommitdiffstats
path: root/src/network/access/qhttpthreaddelegate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/access/qhttpthreaddelegate.cpp')
-rw-r--r--src/network/access/qhttpthreaddelegate.cpp27
1 files changed, 9 insertions, 18 deletions
diff --git a/src/network/access/qhttpthreaddelegate.cpp b/src/network/access/qhttpthreaddelegate.cpp
index 1900397eab..2933d75d2c 100644
--- a/src/network/access/qhttpthreaddelegate.cpp
+++ b/src/network/access/qhttpthreaddelegate.cpp
@@ -236,7 +236,7 @@ QHttpThreadDelegate::QHttpThreadDelegate(QObject *parent) :
, synchronous(false)
, incomingStatusCode(0)
, isPipeliningUsed(false)
- , isSpdyUsed(false)
+ , isHttp2Used(false)
, incomingContentLength(-1)
, removedContentLength(-1)
, incomingErrorCode(QNetworkReply::NoError)
@@ -297,6 +297,11 @@ void QHttpThreadDelegate::startRequest()
connectionType = QHttpNetworkConnection::ConnectionTypeHTTP2Direct;
}
+#if QT_CONFIG(ssl)
+ // See qnetworkreplyhttpimpl, delegate's initialization code.
+ Q_ASSERT(!ssl || incomingSslConfiguration.data());
+#endif // QT_CONFIG(ssl)
+
const bool isH2 = httpRequest.isHTTP2Allowed() || httpRequest.isHTTP2Direct();
if (isH2) {
#if QT_CONFIG(ssl)
@@ -315,20 +320,6 @@ void QHttpThreadDelegate::startRequest()
}
}
-#ifndef QT_NO_SSL
- if (ssl && !incomingSslConfiguration.data())
- incomingSslConfiguration.reset(new QSslConfiguration);
-
- if (!isH2 && httpRequest.isSPDYAllowed() && ssl) {
- connectionType = QHttpNetworkConnection::ConnectionTypeSPDY;
- urlCopy.setScheme(QStringLiteral("spdy")); // to differentiate SPDY requests from HTTPS requests
- QList<QByteArray> nextProtocols;
- nextProtocols << QSslConfiguration::NextProtocolSpdy3_0
- << QSslConfiguration::NextProtocolHttp1_1;
- incomingSslConfiguration->setAllowedNextProtocols(nextProtocols);
- }
-#endif // QT_NO_SSL
-
#ifndef QT_NO_NETWORKPROXY
if (transparentProxy.type() != QNetworkProxy::NoProxy)
cacheKey = makeCacheKey(urlCopy, &transparentProxy, httpRequest.peerVerifyName());
@@ -650,7 +641,7 @@ void QHttpThreadDelegate::headerChangedSlot()
isPipeliningUsed = httpReply->isPipeliningUsed();
incomingContentLength = httpReply->contentLength();
removedContentLength = httpReply->removedContentLength();
- isSpdyUsed = httpReply->isSpdyUsed();
+ isHttp2Used = httpReply->isHttp2Used();
emit downloadMetaData(incomingHeaders,
incomingStatusCode,
@@ -659,7 +650,7 @@ void QHttpThreadDelegate::headerChangedSlot()
downloadBuffer,
incomingContentLength,
removedContentLength,
- isSpdyUsed);
+ isHttp2Used);
}
void QHttpThreadDelegate::synchronousHeaderChangedSlot()
@@ -675,7 +666,7 @@ void QHttpThreadDelegate::synchronousHeaderChangedSlot()
incomingStatusCode = httpReply->statusCode();
incomingReasonPhrase = httpReply->reasonPhrase();
isPipeliningUsed = httpReply->isPipeliningUsed();
- isSpdyUsed = httpReply->isSpdyUsed();
+ isHttp2Used = httpReply->isHttp2Used();
incomingContentLength = httpReply->contentLength();
}