diff options
author | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-02-14 23:08:01 (GMT) |
---|---|---|
committer | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-02-14 23:08:01 (GMT) |
commit | 2d23e45c94b6115db2b1efadfe77841f481545ca (patch) | |
tree | 0e6ff89dbcc410dd2ef5b0e873473971f3dd1b07 /src/network | |
parent | 65e0628bd0cdcb43226dad05582a97a6ef218124 (diff) | |
parent | 42dda19d82ceea48f19d356cfaf2b26acb763df8 (diff) | |
download | Qt-2d23e45c94b6115db2b1efadfe77841f481545ca.zip Qt-2d23e45c94b6115db2b1efadfe77841f481545ca.tar.gz Qt-2d23e45c94b6115db2b1efadfe77841f481545ca.tar.bz2 |
Merge remote branch 'origin/master' into bearermanagement/integration
Conflicts:
tests/auto/qlineedit/tst_qlineedit.cpp
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/access/qhttpnetworkconnectionchannel.cpp | 20 | ||||
-rw-r--r-- | src/network/access/qnetworkaccessmanager.cpp | 2 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp index 5bd972c..b0e632a 100644 --- a/src/network/access/qhttpnetworkconnectionchannel.cpp +++ b/src/network/access/qhttpnetworkconnectionchannel.cpp @@ -286,7 +286,6 @@ void QHttpNetworkConnectionChannel::_q_receiveReply() if (!socket->bytesAvailable()) { if (reply && reply->d_func()->state == QHttpNetworkReplyPrivate::ReadingDataState) { reply->d_func()->state = QHttpNetworkReplyPrivate::AllDoneState; - this->state = QHttpNetworkConnectionChannel::IdleState; allDone(); } else { // try to reconnect/resend before sending an error. @@ -347,7 +346,6 @@ void QHttpNetworkConnectionChannel::_q_receiveReply() emit reply->headerChanged(); if (!replyPrivate->expectContent()) { replyPrivate->state = QHttpNetworkReplyPrivate::AllDoneState; - this->state = QHttpNetworkConnectionChannel::IdleState; allDone(); return; } @@ -424,7 +422,6 @@ void QHttpNetworkConnectionChannel::_q_receiveReply() // everything done, fall through } case QHttpNetworkReplyPrivate::AllDoneState: - this->state = QHttpNetworkConnectionChannel::IdleState; allDone(); break; default: @@ -570,6 +567,9 @@ void QHttpNetworkConnectionChannel::allDone() // in case of failures, each channel will attempt two reconnects before emitting error. reconnectAttempts = 2; + // now the channel can be seen as free/idle again, all signal emissions for the reply have been done + this->state = QHttpNetworkConnectionChannel::IdleState; + detectPipeliningSupport(); // move next from pipeline to current request @@ -610,19 +610,19 @@ void QHttpNetworkConnectionChannel::allDone() void QHttpNetworkConnectionChannel::detectPipeliningSupport() { // detect HTTP Pipelining support - QByteArray serverHeaderField = reply->headerField("Server"); + QByteArray serverHeaderField; if ( - // check for broken servers in server reply header - // this is adapted from http://mxr.mozilla.org/firefox/ident?i=SupportsPipelining - (!serverHeaderField.contains("Microsoft-IIS/4.")) - && (!serverHeaderField.contains("Microsoft-IIS/5.")) - && (!serverHeaderField.contains("Netscape-Enterprise/3.")) // check for HTTP/1.1 - && (reply->d_func()->majorVersion == 1 && reply->d_func()->minorVersion == 1) + (reply->d_func()->majorVersion == 1 && reply->d_func()->minorVersion == 1) // check for not having connection close && (!reply->d_func()->isConnectionCloseEnabled()) // check if it is still connected && (socket->state() == QAbstractSocket::ConnectedState) + // check for broken servers in server reply header + // this is adapted from http://mxr.mozilla.org/firefox/ident?i=SupportsPipelining + && (serverHeaderField = reply->headerField("Server"), !serverHeaderField.contains("Microsoft-IIS/4.")) + && (!serverHeaderField.contains("Microsoft-IIS/5.")) + && (!serverHeaderField.contains("Netscape-Enterprise/3.")) ) { pipeliningSupported = QHttpNetworkConnectionChannel::PipeliningProbablySupported; } else { diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp index bb5ff6c..d9ad085 100644 --- a/src/network/access/qnetworkaccessmanager.cpp +++ b/src/network/access/qnetworkaccessmanager.cpp @@ -592,7 +592,7 @@ void QNetworkAccessManager::setCookieJar(QNetworkCookieJar *cookieJar) /*! Posts a request to obtain the network headers for \a request - and returns a new QNetworkReply object which will contain such headers + and returns a new QNetworkReply object which will contain such headers. The function is named after the HTTP request associated (HEAD). */ |