diff options
Diffstat (limited to 'src/network/access/qhttpprotocolhandler.cpp')
-rw-r--r-- | src/network/access/qhttpprotocolhandler.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/network/access/qhttpprotocolhandler.cpp b/src/network/access/qhttpprotocolhandler.cpp index b486b75449..ab136af083 100644 --- a/src/network/access/qhttpprotocolhandler.cpp +++ b/src/network/access/qhttpprotocolhandler.cpp @@ -129,6 +129,15 @@ void QHttpProtocolHandler::_q_receiveReply() } else { replyPrivate->autoDecompress = false; } + if (m_connection->connectionType() == QHttpNetworkConnection::ConnectionTypeHTTP2) { + if (replyPrivate->statusCode == 101) { + QMetaObject::invokeMethod(m_channel, "_q_protocolSwitch", Qt::QueuedConnection); + return; + } + + // HTTP/2 is not supported? TODO - but can it be something else? + m_channel->requeueSpdyRequests(); + } if (replyPrivate->statusCode == 100) { replyPrivate->clearHttpLayerInformation(); replyPrivate->state = QHttpNetworkReplyPrivate::ReadingStatusState; |