diff options
author | Kai Koehne <kai.koehne@nokia.com> | 2011-05-10 13:14:16 (GMT) |
---|---|---|
committer | Kai Koehne <kai.koehne@nokia.com> | 2011-05-10 13:14:16 (GMT) |
commit | baecfbc7f7e0ec7edddb74a2e760c685977e9084 (patch) | |
tree | f9071063e3b8dfcc1b2fcb3236be84fce5b17091 /src/network/access/qhttpnetworkconnectionchannel.cpp | |
parent | bde58ad1e7d2b38d2882aaf869e93b0415128836 (diff) | |
parent | f3ddd2d995b7485cdc1c3420d254499904ff9dd9 (diff) | |
download | Qt-baecfbc7f7e0ec7edddb74a2e760c685977e9084.zip Qt-baecfbc7f7e0ec7edddb74a2e760c685977e9084.tar.gz Qt-baecfbc7f7e0ec7edddb74a2e760c685977e9084.tar.bz2 |
Merge remote branch 'qt/4.8' into master-qml-staging
Conflicts:
src/declarative/debugger/qdeclarativedebugserver.cpp
src/plugins/qmltooling/qmltooling.pro
Diffstat (limited to 'src/network/access/qhttpnetworkconnectionchannel.cpp')
-rw-r--r-- | src/network/access/qhttpnetworkconnectionchannel.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp index 6564b4b..6fbc6f8 100644 --- a/src/network/access/qhttpnetworkconnectionchannel.cpp +++ b/src/network/access/qhttpnetworkconnectionchannel.cpp @@ -54,6 +54,10 @@ # include <QtNetwork/qsslconfiguration.h> #endif +#ifndef QT_NO_BEARERMANAGEMENT +#include "private/qnetworksession_p.h" +#endif + QT_BEGIN_NAMESPACE // TODO: Put channel specific stuff here so it does not polute qhttpnetworkconnection.cpp @@ -91,6 +95,11 @@ void QHttpNetworkConnectionChannel::init() #else socket = new QTcpSocket; #endif +#ifndef QT_NO_BEARERMANAGEMENT + //push session down to socket + if (networkSession) + socket->setProperty("_q_networksession", QVariant::fromValue(networkSession)); +#endif #ifndef QT_NO_NETWORKPROXY // Set by QNAM anyway, but let's be safe here socket->setProxy(QNetworkProxy::NoProxy); @@ -833,7 +842,10 @@ void QHttpNetworkConnectionChannel::handleStatus() bool QHttpNetworkConnectionChannel::resetUploadData() { - Q_ASSERT(reply); + if (!reply) { + //this happens if server closes connection while QHttpNetworkConnectionPrivate::_q_startNextRequest is pending + return false; + } QNonContiguousByteDevice* uploadByteDevice = request.uploadByteDevice(); if (!uploadByteDevice) return true; |