summaryrefslogtreecommitdiffstats
path: root/tests/auto/qhttpnetworkconnection
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2009-08-31 14:46:59 (GMT)
committerMarkus Goetz <Markus.Goetz@nokia.com>2009-08-31 14:51:21 (GMT)
commit9d24605add8daabfa55e1085e71ed47b14ed7d83 (patch)
tree391da3c4b0350cb1bbdf0ad04c53586b7de6fe44 /tests/auto/qhttpnetworkconnection
parentb0295e82d08605a5a40803895544e57eeb6c8dc3 (diff)
downloadQt-9d24605add8daabfa55e1085e71ed47b14ed7d83.zip
Qt-9d24605add8daabfa55e1085e71ed47b14ed7d83.tar.gz
Qt-9d24605add8daabfa55e1085e71ed47b14ed7d83.tar.bz2
QNAM HTTP Code: Some tests where failing
ietf.org changed their server to use gzip, therefore our check for the content-length reply header was bogus. Rev-By: Peter Hartmann
Diffstat (limited to 'tests/auto/qhttpnetworkconnection')
-rw-r--r--tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp b/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp
index c54bf3c..639464e 100644
--- a/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp
+++ b/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp
@@ -177,7 +177,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());
@@ -237,7 +239,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;