diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2009-08-31 17:34:10 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2009-08-31 17:34:10 (GMT) |
commit | 0d411622521a89c04a416e2aaf3da44b6015b183 (patch) | |
tree | 51e61cea6b56b40d359a8914f59bf3297a5e0d3e /tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp | |
parent | 3b65bb32fda7e34373b64f416ea92a3fa6eb266c (diff) | |
parent | 20cc50a21eb5841b3a3e8546877e805f5a4df528 (diff) | |
download | Qt-0d411622521a89c04a416e2aaf3da44b6015b183.zip Qt-0d411622521a89c04a416e2aaf3da44b6015b183.tar.gz Qt-0d411622521a89c04a416e2aaf3da44b6015b183.tar.bz2 |
Merge branch '4.5' into 4.6
Diffstat (limited to 'tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp')
-rw-r--r-- | tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp b/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp index 6549be8..419eb71 100644 --- a/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp +++ b/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp @@ -189,7 +189,9 @@ void tst_QHttpNetworkConnection::head() QCOMPARE(reply->statusCode(), statusCode); QCOMPARE(reply->reasonPhrase(), statusString); - QCOMPARE(reply->contentLength(), qint64(contentLength)); + // only check it if it is set + if (reply->contentLength() != -1) + QCOMPARE(reply->contentLength(), qint64(contentLength)); QVERIFY(reply->isFinished()); @@ -249,7 +251,9 @@ void tst_QHttpNetworkConnection::get() QCOMPARE(reply->statusCode(), statusCode); QCOMPARE(reply->reasonPhrase(), statusString); - QCOMPARE(reply->contentLength(), qint64(contentLength)); + // only check it if it is set + if (reply->contentLength() != -1) + QCOMPARE(reply->contentLength(), qint64(contentLength)); stopWatch.start(); QByteArray ba; |