summaryrefslogtreecommitdiffstats
path: root/tests/auto/qnetworkreply
Commit message (Collapse)AuthorAgeFilesLines
* test: Remove useless insignificant_test markSergio Ahumada2013-05-081-2/+0
| | | | | | | | The mark is actually in qnetworkreply/test/test.pro Change-Id: I391c3863b6a98f485b8e6b585f346bf06820999e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Simo Fält <simo.falt@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-132-2/+2
| | | | | | Change-Id: I52bf8ef0447b701b4ebf7d7d240013a72adb9425 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-292-49/+49
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I280c0a575987d1770e354b4948f1d4d767d711ea Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* HTTP header may be damaged - fix, unit testTomasz Duda2012-09-251-0/+76
| | | | | | | | | | | | | | | | | | | | | | "HTTP/1.1 100 CONTINUE\r\n" If the header from a server is splitted between two packets the first packet contains "HTTP/1.1 100" and the second one contains " CONTINUE\r\n", one space (0x20) is skipped. After processing the line looks in this way "HTTP/1.1 100CONTINUE". QHttpNetworkReplyPrivate::readStatus(QAbstractSocket *socket) is called twice, if a http header is splitted as above. The function always removes whitespace from the beginning of a packet, even if it is the second part of a http header QHttpNetworkReply returns QNetworkReply::RemoteHostClosedError due to damaged http header during processing. Task-number: QTBUG-27161 Backported qtbase/60f4fc8b706db9cbeacd5dc4886a7aa347daafc0 Change-Id: I07ec43641bbb9966285a8a1f57a51fb27d2643d4 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Update contact information in license headers.Sergio Ahumada2012-08-012-4/+4
| | | | | | | | | | | | | - Replace Nokia contact email address with Qt Project website. - Remove "All rights reserved" line from license headers. As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: Ie7ba62011752fcb149b99b26317c54f2a0cfa931 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Fix handling of urls containing username/password in QNetworkAccessManagerShane Kearns2012-02-201-10/+53
| | | | | | | | | | | | | | | | | | | QNetworkAccessManager was ignoring the supplied credentials, although webkit seems to support these urls at a higher level. Following the behaviour of browsers: We use supplied credentials if authentication is required. We add supplied credentials to the authentication cache. We emit authenticationRequired signal if the credentials were wrong. We do not use previously cached credentials for that url Synchronous http requests fail, if the credentials were wrong. Task-number: QTBUG-18107 Change-Id: If46e8eab1511ba8a0f4bbe0d4efaabc4df0b8ab4 Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit b4a538ea1c3cdce09e3528227dba2e8f5765cbdc)
* Abort FTP download, not the whole applicationShane Kearns2012-02-151-0/+24
| | | | | | | | | | An old coding error meant that the C runtime abort() function was being called instead of QFtp::abort() when cancelling an FTP download using QNetworkReply::close() Task-number: QTBUG-22820 Change-Id: Ib97fda9769b2b55a08c042c66c4444cb6216d2b1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Change bugreports.qt.nokia.com -> bugreports.qt-project.orgSergio Ahumada2012-02-091-1/+1
| | | | | | Change-Id: Ib13737eac7f7cee3ebca44aa712cb6b152672a81 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Update year in Nokia copyright messages.Jason McDonald2012-01-112-2/+2
| | | | | | | | | Simple search and replace. This commit doesn't touch 3rd-party files, nor translations (where the change is not so simple and will be handled in a separate commit). Change-Id: I4e48513b8078a44a8cd272326685b25338890148 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-symbian-staging into ↵Qt Continuous Integration System2012-01-051-0/+218
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/qt-symbian-staging: Fix http authentication to a different realm on the same server Fix race in http connection channel Don't fetch credentials from cache following a failed proxy authentication Handle plain socket write errors in SSL Fix for assertion failure Fix faulty logic in http connection pipelining Test case for QTBUG-22875 QThreads on Symbian are named to allow them to be opened externally
| * Fix http authentication to a different realm on the same serverShane Kearns2012-01-041-0/+33
| | | | | | | | | | | | | | | | | | | | | | This is a regression caused by the NTLMv2 authentication patch. I have manually tested NTLMv2 authentication against MS IIS and reverting these two lines does not break it. Task-number: QT-5209 Change-Id: I64159cbe468e1a7f834f8726fd0c9d4ab4c54b38 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com> (cherry-picked from 4954f71648aa7f74a4cb8b1dd26470b5da44459e)
| * Test case for QTBUG-22875Shane Kearns2012-01-041-0/+185
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Test the authentication cache works properly with "cancelled dialogs" or if the user enters username/password incorrectly. Expected behaviour is based on web browsers: If cancelled, current request fails, and prompt again the next time. If wrong password is given, prompt again and retry the current request. If bad credentials are in the cache, prompt again Task-number: QTBUG-22875 Change-Id: Ic02ccac8dbeb3f2580ca4ffe47d0773982c4ab25 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com> (cherry picked from 4be2430)
* | tests: eliminated usage of qttest_p4.prf [part 3]Sergio Ahumada2011-12-291-5/+5
| | | | | | | | | | | | | | | | | | qttest_p4.prf was added as a convenience for Qt's own autotests in Qt4. It enables various crufty undocumented magic, of dubious value. Stop using it, and explicitly enable the things from it which we want. Change-Id: I65ba34a59db7aa15bc6304e690c825a4d6cd1037 Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
* | tests: allow unstable tests to be marked with CONFIG+=insignificant_testSergio Ahumada2011-12-282-0/+4
|/ | | | | | | | | | Marking a test with CONFIG+=insignificant_test will cause the exit code of the test to be discarded during `make check'. This is intended to be used for tests which are valuable to run, but are known to be unstable and are not feasible to immediately fix. Change-Id: Id7b2407d0a13c8de19a58badb78fa7c018c9b50a Reviewed-by: Jo Asplin
* network auto tests: add QNetworkReply test for pipeliningPeter Hartmann2011-11-141-0/+39
| | | | | Reviewed-by: Markus Goetz Task-number: QTBUG-21369
* Fix crash in QHttpNetworkReplyPrivate::gunzipBodyPartiallyEndSami Rosendahl2011-11-111-0/+23
| | | | | | | | | | | | | | | | | If a HTTP server responds with gzip-encoded empty content without defining Content-Length in the response header QHttpNetworkReplyPrivate::gunzipBodyPartiallyEnd will crash because it calls zlib inflateEnd for an uninitialized stream. - Fixed the crash by adding a check if the stream is initialized to gunzipBodyPartiallyEnd. - Added a regression test tst_QNetworkReply::nb279420gzipNoContentLengthEmptyContentDisconnect PMO 279420 Task-number: QTBUG-22660 Signed-off-by: Sami Rosendahl <sami.rosendahl@reaktor.fi> Merge-request: 1465 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* QNAM: Fix authentication cache when the password is in the URLOlivier Goffart2011-11-081-5/+84
| | | | | | | | | | | | | | Two problems: - The signal cacheCredidentials was not connected in the synchronous case while it must be connected. (Regression when the threaded http was merged) - We cannot cache the credidentials when we proceed the url because at that point, we do not know the realm (this basically reverts 9bc5a32b875b812c3a706034c8c27614f86bd138) Merge-request: 1459 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com> Task-number: QTBUG-18411
* Merge remote-tracking branch 'origin/4.7' into qt-4.8-from-4.7Liang Qi2011-10-073-0/+65
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/getting-started/installation.qdoc doc/src/platforms/platform-notes.qdoc src/corelib/tools/qlocale_symbian.cpp src/gui/kernel/qwidget_p.h src/network/access/qnetworkaccesshttpbackend.cpp src/opengl/qgl.cpp src/plugins/bearer/symbian/qnetworksession_impl.cpp
| * Create auto test for http HEAD requestShane Kearns2011-10-043-0/+65
| | | | | | | | | | | | | | | | | | This is in order to have a regression test for QT-5304. However the test is also checking basic functionality of head requests too. Task-Number: QT-5304 Reviewed-By: Martin Petersson
| * Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2011-05-172-35/+35
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Updating file with CRLF line endings for the updated header Fix a regression in QList::mid() update gitignore remove -fno-stack-protector Fix make confclean Update licenseheader text in source files
| | * Update licenseheader text in source filesJyri Tahtela2011-05-132-35/+35
| | | | | | | | | | | | | | | | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
| * | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into ↵Qt Continuous Integration System2011-05-051-1/+9
| |\ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: Skip test on MacOS due to problems with corewlan plugin Send User-Agent from the network request in http proxy CONNECT command Fix initial main window dimensions for "fullscreen with softkeys" case Fix compile errors in bearer tests Fix QNetworkConfigurationManager usage outside main thread first
| | * Send User-Agent from the network request in http proxy CONNECT commandShane Kearns2011-05-051-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some proxies can discriminate based on the User-Agent when sent a CONNECT command for establishing a HTTPS connection. With this change, if the User-Agent header is set in the QNetworkRequest then it will be passed to the http socket engine for use in the connect command sent to the proxy. As before, "Mozilla/5.0" will be used by default when no user agent has been set. Task-number: QTBUG-17223 Reviewed-by: Markus Goetz
| * | QNAM HTTP: Fix bug with explicitly zero-length compressed responses.Andreas Kling2011-05-041-0/+21
| |/ | | | | | | | | | | | | | | | | In the case of a response with e.g content-encoding "gzip" and content-length "0", the HTTP backend would incorrectly fall back to the "unspecified length" code path and wait for readyRead() forever. Task-number: QTBUG-18232 Reviewed-by: Markus Goetz
* | Merge remote-tracking branch 'earth-team/master'Olivier Goffart2011-07-201-5/+2
|\ \
| * | QNetworkAccessFileBackend: Add warning for file url without scheme.Martin Petersson2011-07-191-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | When the scheme is not set for a file we should accept the url but add a warning. The behaviour will change for Qt5 in which we should no longer accept the url if the scheme is not set. Task-number: QTBUG-17731 Reviewed-by: Markus Goetz
* | | Doc: Fixing typoSergio Ahumada2011-07-021-4/+4
| | |
* | | Symbian: tune network autotest heap size so they can run on emulatorShane Kearns2011-06-301-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | Heap sizes were increased during development due to OOM failures, but the tests cannot be launched on emulator because of the address space problem (symbian emulator known issue) As the OOM failures were caused by unlimited buffering in the proxy socket engines (fixed by c4727a85eed57a4db698326a1bed4aa75b6e5284) the tests work on both emulator and hardware with the new buffer size. Task-number: QTBUG-18221 Reviewed-by: Markus Goetz
* | tst_qnetworkreply: add a test for http abort.Martin Petersson2011-06-211-6/+52
| | | | | | | | | | Change-Id: Iec5fe195ff2befe92e759f77768240728bef31bd (cherry picked from commit 752d807797a0021e412a20b0a8fcc34b4fd8e380)
* | Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-earth-staging into ↵Qt Continuous Integration System2011-05-271-4/+11
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/qt-earth-staging: (25 commits) Added some of my Qt 4.8 changes to the changelog Update bearer startup code in network autotests symbian socket engine: share ip address conversion code license header check: fix exception for URL TLD table QUrl TLD: fix documentation file for "Add QUrl::topLevelDomain() ..." Add QUrl::topLevelDomain() and move TLD table from QtNetwork to QtCore fix Symbian ordinals for merge request re. utf8 characters in SSL certs add auto test for SSL certificates containing utf8 characters fix coding style for merge request re. utf8 characters in SSL certs Use OpenSSL X509_NAME_ENTRY API to parse UTF8 subjectName/issuerName Fix the build for QUuid Improved performance of the QLocale::name() function. Optimize QUuid::QUuid(const char *) QDataStream: speedup steaming of QUuid. Add QUuid::toRfc4122() and fromRfc4122() Add QUuid::toByteArray() and relevant Optimize QUuid::toString() and relevant Add some autotests and benchmarks for QUuid tst_qhostinfo: Fix IPv6 lookup detection on Windows. Fix typo in comment ...
| * | Update bearer startup code in network autotestsShane Kearns2011-05-251-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bearer startup code I added to some of the network autotests to ensure the network was up before testing caused test failures on some linux configurations due to there being no default network defined. I've changed it to follow these steps: 1. update the configuration list & wait for update completed signal - due to the polling engines not having any config defined on the first run before the initial poll happens 2. check default configuration is valid before attempting to start it 3a. for valid configuration, start it and wait for started as before 3b. for invalid configuration, fail if bearer is mandatory, otherwise ignore - on symbian bearer use is "mandatory", on desktop platforms it is optional Reviewed-by: Markus Goetz
* | | Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2011-05-261-4/+54
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1: skip the ipv6 Host checking for the moment, since it fails on Windows XP. will fix later remove duplicate message fix "Host" header of ipv6 URLs in QNAM uic: Use QString::fromUtf8 for QUrl properties. uic: #include <QLayout> for QToolBox on non-laid-out forms. add test case for ipv6 url parsing
| * | skip the ipv6 Host checking for the moment, since it fails on Windows XP. ↵shiroki2011-05-261-0/+1
| | | | | | | | | | | | | | | | | | will fix later Reviewed-by: Peter Hartmann
| * | fix "Host" header of ipv6 URLs in QNAMshiroki2011-05-251-9/+9
| | | | | | | | | | | | Reviewed-by: Markus Goetz
| * | add test case for ipv6 url parsingshiroki2011-05-201-4/+53
| | | | | | | | | | | | Reviewed-by: Thiago
* | | Merge remote-tracking branch 'qt/4.8'Jyri Tahtela2011-05-181-9/+18
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/examples/wheel.qdoc src/gui/util/qflickgesture.cpp src/gui/util/qflickgesture_p.h src/gui/util/qscroller.cpp src/gui/util/qscroller.h src/gui/util/qscroller_p.h src/gui/util/qscrollerproperties.cpp src/gui/util/qscrollerproperties.h tests/auto/qscroller/tst_qscroller.cpp
| * \ \ Merge remote branch 'origin/4.8' into qa-review-masterRohan McGovern2011-05-155-45/+521
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | Conflicts: tests/auto/qaccessibility/tst_qaccessibility.cpp tests/auto/qsslsocket/tst_qsslsocket.cpp
| * | | Remove Q_ASSERT's from QNetworkReply autotestJason McDonald2011-05-101-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than aborting in debug builds and failing mysteriously in release builds, report fatal errors in all builds. Change-Id: I020b06e19b7ffc8ae4413e1756259f4ca608f253 Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern
| * | | Remove Q_ASSERT's from QNetworkReply autotestJason McDonald2011-05-091-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than aborting in debug builds and ignoring the failure in release builds, report a fatal error in all builds. Change-Id: I1fb8e692c65cf23cf5d2453173db742260ddca48 Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern
* | | | Update licenseheader text in source files for qt4.8Jyri Tahtela2011-05-132-35/+35
| |/ / |/| | | | | | | | | | | | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* | | Merge branch 'symbian-socket-engine' into staging-masterShane Kearns2011-05-101-3/+18
|\ \ \
| * | | fix tst_qnetworkreply::httpProxyCommands autotestShane Kearns2011-05-051-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to architecture changes in Qt 4.8, clearing the proxy before the request is complete causes the http connection to not use any proxy. The issue is that the proxy isn't resolved until after the bearer has been started (which is correct in the general case, as system proxy is unknown until that time). Also increased the test's timeout from 1 second to 15, as starting a bearer can be slow. Reviewed-by: Markus Goetz
| * | | Send User-Agent from the network request in http proxy CONNECT commandShane Kearns2011-05-051-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some proxies can discriminate based on the User-Agent when sent a CONNECT command for establishing a HTTPS connection. With this change, if the User-Agent header is set in the QNetworkRequest then it will be passed to the http socket engine for use in the connect command sent to the proxy. As before, "Mozilla/5.0" will be used by default when no user agent has been set. Task-number: QTBUG-17223 Reviewed-by: Markus Goetz
| * | | Fix some warnings in symbian network testsShane Kearns2011-04-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ignore warning when the test intentionally sets an invalid socket descriptor. Make sure to set content type on all http post tests in tst_qnetworkreply. Run test with enough capabilities to avoid platsec errors when accessing certificate store. Reviewed-By: Markus Goetz
* | | | HTTP auto tests: do not load resources from cache that must be revalidtdPeter Hartmann2011-05-041-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The header field "Cache-Control: must-revalidate" is a strict requirement for loading the resource from the server, and not reading it from the cache without revalidating first. With this patch, PreferCache will load such from the network instead of loading them from the cache, and AlwaysCache will throw a ContentNotFound error. Reviewed-by: Markus Goetz Task-number: QTBUG-18983
* | | | Fix compile error with QT_NO_OPENSSLShane Kearns2011-04-191-0/+2
|/ / /
* | | Merge branch 'master' of scm.dev.troll.no:qt/qt-earth-team into ↵Shane Kearns2011-04-111-6/+34
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | symbian-socket-engine Conflicts: src/s60installs/bwins/QtCoreu.def src/s60installs/bwins/QtGuiu.def src/s60installs/bwins/QtNetworku.def src/s60installs/eabi/QtCoreu.def src/s60installs/eabi/QtGuiu.def src/s60installs/eabi/QtNetworku.def src/s60installs/eabi/QtOpenVGu.def tests/auto/qabstractnetworkcache/tst_qabstractnetworkcache.cpp
| * | | QSslSocket: fix setReadBufferSizeMartin Petersson2011-03-311-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This fix the qnetworkreply::ioPostToHttpsUploadProgress() auto test. Before the readbuffer where always limited to 1k for ssl sockets. Reviewed-by: Markus Goetz
| * | | QSslConfiguration: do not lazily construct the d-pointerPeter Hartmann2011-03-281-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...the private class is cheap anyway; and lazy construction lead to problems like setting an empty default configuration would crash etc. Reviewed-by: Markus Goetz Task-number: QTBUG-17550
* | | | tst_qnetworkreply: skip ioGetFromBuiltinHttp test.Martin Petersson2011-04-061-0/+1
| | | | | | | | | | | | | | | | Reviewed-by: Markus Goetz