diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2011-05-11 11:17:22 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2011-05-11 11:17:22 (GMT) |
commit | 97447d569999372d43f22dbb1e0fc5193b73615c (patch) | |
tree | 5b1fb557d6356e4eebe5045009eaa0c4c2138dea /tests/auto/qnetworkreply | |
parent | eabcaaa9be03674d45e6bb53e098d5b5b3e9ef81 (diff) | |
parent | 1a742a039802b32cfe2a92d8ef1a04c3a21a964f (diff) | |
download | Qt-97447d569999372d43f22dbb1e0fc5193b73615c.zip Qt-97447d569999372d43f22dbb1e0fc5193b73615c.tar.gz Qt-97447d569999372d43f22dbb1e0fc5193b73615c.tar.bz2 |
Merge remote-tracking branch 'origin/4.8' into qt-4.8-from-4.7
Conflicts:
src/network/access/qhttpnetworkconnectionchannel.cpp
src/network/socket/qabstractsocket.cpp
tests/auto/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp
tests/auto/qnetworkreply/tst_qnetworkreply.cpp
Diffstat (limited to 'tests/auto/qnetworkreply')
-rw-r--r-- | tests/auto/qnetworkreply/tst_qnetworkreply.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp index 38e8cee..feb8204 100644 --- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp @@ -4103,6 +4103,7 @@ void tst_QNetworkReply::ioPostToHttpFromMiddleOfQBufferFiveBytes() QUrl url = "http://" + QtNetworkSettings::serverName() + "/qtest/protected/cgi-bin/md5sum.cgi"; QNetworkRequest request(url); + request.setRawHeader("Content-Type", "application/octet-stream"); QNetworkReplyPtr reply = manager.post(request, &uploadBuffer); connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); @@ -4353,6 +4354,7 @@ void tst_QNetworkReply::ioPostToHttpUploadProgress() // create the request QUrl url = QUrl(QString("http://127.0.0.1:%1/").arg(server.serverPort())); QNetworkRequest request(url); + request.setRawHeader("Content-Type", "application/octet-stream"); QNetworkReplyPtr reply = manager.post(request, &sourceFile); QSignalSpy spy(reply, SIGNAL(uploadProgress(qint64,qint64))); connect(&server, SIGNAL(newConnection()), &QTestEventLoop::instance(), SLOT(exitLoop())); @@ -4967,16 +4969,21 @@ void tst_QNetworkReply::httpProxyCommands() QNetworkRequest request(url); request.setRawHeader("User-Agent", "QNetworkReplyAutoTest/1.0"); QNetworkReplyPtr reply = manager.get(request); - manager.setProxy(QNetworkProxy()); + //clearing the proxy here causes the test to fail. + //the proxy isn't used until after the bearer has been started + //which is correct in general, because system proxy isn't known until that time. + //removing this line is safe, as the proxy is also reset by the cleanup() function + //manager.setProxy(QNetworkProxy()); // wait for the finished signal connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(1); + QTestEventLoop::instance().enterLoop(15); QVERIFY(!QTestEventLoop::instance().timeout()); //qDebug() << reply->error() << reply->errorString(); + //qDebug() << proxyServer.receivedData; // we don't really care if the request succeeded // especially since it won't succeed in the HTTPS case |