diff options
author | Markus Goetz <Markus.Goetz@nokia.com> | 2009-10-14 15:49:11 (GMT) |
---|---|---|
committer | Markus Goetz <Markus.Goetz@nokia.com> | 2009-10-15 11:35:01 (GMT) |
commit | aaef78412021c2e02aa7c6aa355a09634a6fd549 (patch) | |
tree | 86c71f989ef267afccc7d4b3cf0767f89d721521 /src/network/access | |
parent | 449eae92ce603bf4134bfec820fedc334934de73 (diff) | |
download | Qt-aaef78412021c2e02aa7c6aa355a09634a6fd549.zip Qt-aaef78412021c2e02aa7c6aa355a09634a6fd549.tar.gz Qt-aaef78412021c2e02aa7c6aa355a09634a6fd549.tar.bz2 |
QNAM HTTP Code: Proceed POSTing on encryptedBytesWritten()
... not only on bytesWritten()
Reviewed-by: Peter Hartmann
Diffstat (limited to 'src/network/access')
-rw-r--r-- | src/network/access/qhttpnetworkconnectionchannel.cpp | 12 | ||||
-rw-r--r-- | src/network/access/qhttpnetworkconnectionchannel_p.h | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp index 81fac57..6962ab3 100644 --- a/src/network/access/qhttpnetworkconnectionchannel.cpp +++ b/src/network/access/qhttpnetworkconnectionchannel.cpp @@ -105,6 +105,9 @@ void QHttpNetworkConnectionChannel::init() QObject::connect(sslSocket, SIGNAL(sslErrors(const QList<QSslError>&)), this, SLOT(_q_sslErrors(const QList<QSslError>&)), Qt::DirectConnection); + QObject::connect(sslSocket, SIGNAL(encryptedBytesWritten(qint64)), + this, SLOT(_q_encryptedBytesWritten(qint64)), + Qt::DirectConnection); } #endif } @@ -881,6 +884,15 @@ void QHttpNetworkConnectionChannel::_q_sslErrors(const QList<QSslError> &errors) //QNetworkReply::NetworkError errorCode = QNetworkReply::ProtocolFailure; emit connection->sslErrors(errors); } + +void QHttpNetworkConnectionChannel::_q_encryptedBytesWritten(qint64 bytes) +{ + Q_UNUSED(bytes); + // bytes have been written to the socket. write even more of them :) + if (isSocketWriting()) + sendRequest(); + // otherwise we do nothing +} #endif QT_END_NAMESPACE diff --git a/src/network/access/qhttpnetworkconnectionchannel_p.h b/src/network/access/qhttpnetworkconnectionchannel_p.h index 1d1153e..127a431 100644 --- a/src/network/access/qhttpnetworkconnectionchannel_p.h +++ b/src/network/access/qhttpnetworkconnectionchannel_p.h @@ -180,6 +180,7 @@ public: #ifndef QT_NO_OPENSSL void _q_encrypted(); // start sending request (https) void _q_sslErrors(const QList<QSslError> &errors); // ssl errors from the socket + void _q_encryptedBytesWritten(qint64 bytes); // proceed sending #endif }; |