summaryrefslogtreecommitdiffstats
path: root/src/network/access/qhttpnetworkreply.cpp
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2010-02-17 15:36:40 (GMT)
committerMarkus Goetz <Markus.Goetz@nokia.com>2010-02-18 10:34:48 (GMT)
commita4332ce058cf3fe567b386d300ba740442a69f44 (patch)
tree3d51bb57f5dc434ded41e03a7ef80cc90058d367 /src/network/access/qhttpnetworkreply.cpp
parent4971430290ecb11012ef5cbf8ef041da0ec3a824 (diff)
downloadQt-a4332ce058cf3fe567b386d300ba740442a69f44.zip
Qt-a4332ce058cf3fe567b386d300ba740442a69f44.tar.gz
Qt-a4332ce058cf3fe567b386d300ba740442a69f44.tar.bz2
QNAM HTTP: Always set channel.reply to 0 when done
This will help us to track down a sporadic bug that made requests being sent again even if they were already done. Reviewed-by: Peter Hartmann
Diffstat (limited to 'src/network/access/qhttpnetworkreply.cpp')
-rw-r--r--src/network/access/qhttpnetworkreply.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/network/access/qhttpnetworkreply.cpp b/src/network/access/qhttpnetworkreply.cpp
index 512c045..984f557 100644
--- a/src/network/access/qhttpnetworkreply.cpp
+++ b/src/network/access/qhttpnetworkreply.cpp
@@ -230,6 +230,7 @@ void QHttpNetworkReplyPrivate::clear()
currentChunkRead = 0;
connectionCloseEnabled = true;
connection = 0;
+ connectionChannel = 0;
#ifndef QT_NO_COMPRESS
if (initInflate)
inflateEnd(&inflateStrm);
@@ -803,9 +804,15 @@ void QHttpNetworkReplyPrivate::eraseData()
QSslConfiguration QHttpNetworkReply::sslConfiguration() const
{
Q_D(const QHttpNetworkReply);
- if (d->connection)
- return d->connection->d_func()->sslConfiguration(*this);
- return QSslConfiguration();
+
+ if (!d->connectionChannel)
+ return QSslConfiguration();
+
+ QSslSocket *sslSocket = qobject_cast<QSslSocket*>(d->connectionChannel->socket);
+ if (!sslSocket)
+ return QSslConfiguration();
+
+ return sslSocket->sslConfiguration();
}
void QHttpNetworkReply::setSslConfiguration(const QSslConfiguration &config)