summaryrefslogtreecommitdiffstats
path: root/src/network/access
Commit message (Collapse)AuthorAgeFilesLines
* QNetwork: fix compilation with "-no-feature-bearermanagement"Martin Petersson2012-02-271-1/+1
| | | | | | | Task-number: QTBUG-23239 Change-Id: I12f89a4e595231738985ca0cf3179fee7de9fa72 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* QNetwork: remove compile warning.Martin Petersson2012-02-271-2/+2
| | | | | Change-Id: I01245f7f6943f5a8bf30e8215419dbfd4dfcdb09 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Fix handling of urls containing username/password in QNetworkAccessManagerShane Kearns2012-02-201-0/+10
| | | | | | | | | | | | | | | | | | | 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)
* Fix incorrect use of QObject::disconnect in synchronous http requestShane Kearns2012-02-201-2/+4
| | | | | | | | | | In certain circumstances, this could cause the request to time out (and repeatedly send bad authentication credentials to the server) instead of failing with AuthenticationRequiredError. Change-Id: Iff66b32f1d7268f21fd77b6620aae4b5d49d857f Reviewed-by: Richard J. Moore <rich@kde.org> (cherry picked from commit d425a0dad38e51c99cfe59294a3706ced90b24a0)
* Abort FTP download, not the whole applicationShane Kearns2012-02-151-5/+1
| | | | | | | | | | 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-093-3/+3
| | | | | | 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-1162-62/+62
| | | | | | | | | 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>
* Fix race in http connection channelShane Kearns2012-01-042-1/+3
| | | | | | | | | | | When authentication is cancelled, close the channel instead of the underlying socket. The previous behaviour could result in further requests being sent on the closed socket, which caused errors in case of https over a proxy. Change-Id: I3dbfc164de4fb29a426c06acaac8f29b9da1d705 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com> (cherry picked from commit a7b99151f4445755c91d5227607d9ea2f785301f)
* Don't fetch credentials from cache following a failed proxy authenticationShane Kearns2012-01-044-10/+32
| | | | | | | | | | | Add variable to QAuthenticatorPrivate for tracking failure Track authentication success/failure in http proxy socket engine Track authentication success/failure in http connection channel Task-number: QTBUG-22875 Change-Id: Id5d39e839428271ad687e9da12fbbdea9c478f4f Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com> (cherry-picked from d24aad82896addce88f1ffb4040560e406acf083)
* Fix for assertion failureShane Kearns2012-01-042-1/+6
| | | | | | Change-Id: I97b9ecc37e938a3050793fc746288243a1cb40b7 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com> (cherry picked from commit 96cda705dcbeb79429055c1acca91f149d318820)
* Fix faulty logic in http connection pipeliningShane Kearns2012-01-041-2/+6
| | | | | | | | | | The code which prevents pipelining of requests when authentication is in use had || where && should have been used. Also check for blank user with a password. Change-Id: Ic278cedd370c9d81377f49a0af43aef415cb49ad Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com> (cherry picked from commit 058fb94afff8a1a9989ab6d18dacc1fe43769fdb)
* Fix null pointer dereference in NTLM authenticationShane Kearns2011-12-121-2/+5
| | | | | | | | | | | | If NTLM authentication is required for the URL with an empty path, then QNetworkAuthenticationCache::findClosestMatch(url.path()) returns 0. e.g. "http://10.1.2.3". Return a default constructed credential in this case. Change-Id: I84ad3b308ee3f74fbbac9ad0f11dbdc66047b50b Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com> (cherry picked from commit b830c9cededf995fab1b0919a81658ceaec8d422)
* Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-earth-staging into ↵Qt Continuous Integration System2011-11-141-0/+1
|\ | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/qt-earth-staging: network auto tests: add QNetworkReply test for pipelining HTTP: blacklist server for pipelining
| * HTTP: blacklist server for pipeliningPeter Hartmann2011-11-141-0/+1
| | | | | | | | | | | | | | | | | | that server was found out not to support HTTP pipelining. tested manually; for more information see the task. Reviewed-by: Markus Goetz Task-number: QTBUG-21369
* | Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-earth-staging into ↵Qt Continuous Integration System2011-11-121-2/+4
|\ \ | |/ | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/qt-earth-staging: Fix crash in QHttpNetworkReplyPrivate::gunzipBodyPartiallyEnd Fix warning when using QXmlInputSource with non opened QIODevice HTTP proxy engine - accept standard Connection header
| * Fix crash in QHttpNetworkReplyPrivate::gunzipBodyPartiallyEndSami Rosendahl2011-11-111-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-earth-staging into ↵Qt Continuous Integration System2011-11-103-3/+8
|\ \ | |/ | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/qt-earth-staging: networking: regenerate effective TLD table for cookies QNAM: Fix authentication cache when the password is in the URL
| * QNAM: Fix authentication cache when the password is in the URLOlivier Goffart2011-11-083-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 branch 'master' of scm.dev.nokia.troll.no:qt/qt-doc-staging into ↵Qt Continuous Integration System2011-11-011-2/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/qt-doc-staging: Missing icon in the designer documentation Fridge magnet example code snippet error qpaintdevice-qt3.html documentation errors QWebElement example missed information QSPlitter style-sheet example was invalid Errors in QSqlDriver::handle examples QGLColormap example was invalid QPointer made no mention of QWeakPointer Invalid links to http://developer.symbian.org QNetworkDiskCache documentation missed information QStyleSheet example used a property that is hidden. QList document referenced to non existing function QXmlQuery::bindVariable documentation bug Fix multiple typos in QLineF documentation. Qmake project file docs lacked information. Documentation error in SSL document Fix multiple typos in documentation. Fix for QVector::toList - code example documentation.
| * | QNetworkDiskCache documentation missed informationartoka2011-11-011-2/+2
| |/ | | | | | | | | | | | | | | | | | | | | Documentation didn't mention which unit (B,kB,MB) is used in setMaximumCacheSize and maximumCacheSize. Added unit to be bytes. Task-number: QTBUG-15562 Merge-request: 2698 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* | Merge remote-tracking branch 'origin/4.7' into qt-4.8-from-4.7Liang Qi2011-10-311-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/declarative/declarativeui.qdoc doc/src/mainpage.qdoc doc/src/platforms/supported-platforms.qdoc doc/src/qt-webpages.qdoc src/network/access/qnetworkdiskcache.cpp
| * | Symbian - disable memory mapping in QNetworkDiskCacheShane Kearns2011-10-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The implementation of memory mapped files in Open C requires munmap to be called from the same thread as mmap. As the QIODevice can be handed off to another thread, this breaks application code that works on other operating systems. Task-number: QT-5309 Reviewed-by: Tadaaki Matsumoto
* | | Use QBasicAtomicInt as a static variableShane Kearns2011-10-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | QAtomicInt has a constructor, so QBasicAtomicInt needs to be used instead to allow compile time initialisation. Task-Number: QTBUG-20343 Reviewed-By: Olivier Goffart
* | | FTP - fix interoperability issues with SIZE commandShane Kearns2011-10-181-2/+2
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Certain FTP servers refuse the SIZE command in ASCII mode (proftpd) or refuse the SIZE command in ASCII mode for large files. This is a security feature, as the SIZE command requires reading the whole file and counting line ends which can cause denial of services. In binary mode, the file size on disc is reported, which is a relatively quick operation. Qt had two problems here: 1. when size command fails, the total size was reported as -1, whereas the documentation of QFtp::dataTransferProgress states it should be reported as 0 (so that QProgressDialog can display a wait note rather than progress bar) 2. SIZE command was sent before setting the type of the transfer to ASCII / Binary. This is a problem as the size reported by the server is incorrect. Also it usually means sending ASCII SIZE for Binary transfers, which results in the 550 error on FTP servers with DOS protection. Task-Number: QTTH-1428 Reviewed-By: Peter Hartmann
* | Merge remote-tracking branch 'qt/4.8'Sami Lempinen2011-10-144-19/+26
|\ \
| * \ Merge remote-tracking branch 'origin/4.7' into qt-4.8-from-4.7Liang Qi2011-10-073-5/+22
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into ↵Qt Continuous Integration System2011-10-051-1/+1
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: Create auto test for http HEAD request QNAM - fix poor performance of HEAD request with authentication
| | | * QNAM - fix poor performance of HEAD request with authenticationShane Kearns2011-10-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QHttpNetworkReply was waiting for a body to be sent for 401 and 407 responses, whereas with a HTTP HEAD request, there will be no body. This delayed the authentication signal until after the http channel is closed by the server after a timeout. For example with the server used for autotesting, the authentication signal is delayed 15 seconds. When the server has a very long timeout, the authentication signal may not be emitted at all. 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-09-151-2/+5
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Add missing checks for httpReply in QNetworkHttpBackend.
| | | * | Add missing checks for httpReply in QNetworkHttpBackend.Jocelyn Turcotte2011-09-131-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | httpReply is not guaranteed to be non-null. Adding missing checks for methods that can be called from outside the class. Reviewed-By: Peter Hartmann
| | * | | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into ↵Qt Continuous Integration System2011-09-152-4/+21
| | |\ \ \ | | | |/ / | | |/| / | | | |/ | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: Refactor dangerous multiple inheritance Fix RConnection handle leak in symbian bearer plugin Prevent crash when cache is changed on the fly
| | | * Prevent crash when cache is changed on the flyShane Kearns2011-09-142-4/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling QNetworkAccessManager::setCache while there were requests being processed using the existing cache caused crashes due to deleting the old cache invalidating pointers to the cache data streams (QTemporaryFile in case of QNetworkDiskCache). Using pointer to deleted data caused a crash in some cases. It has undefined behaviour because the memory may have been overwritten or decommitted. To fix this, use the deleted signal to notify QNetworkReplyImpl that the cache has been destroyed. It then clears the pointer to the data stream and disables caching. This avoids the crash that previously happened when trying to write to the cache file. Task-number: QT-5252 Reviewed-by: Peter Hartmann
| * | | Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2011-10-041-2/+0
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1: add integrity gbuild to the project file for convenience don't build activeqt examples on mingw QNetworkAccessBackend::start() is used although QT_NO_BEARERMANAGEMENT is defined. Updated Russian translation Ukrainian translation updated for 4.8 retreving -> retrieving Removed duplicate Spectrum Analyzer entry from demos doc page. Removed obsolete QWS_ALPHA_CURSOR feature. Removed duplicate link from QFinalState documentation. Clarified keypad navigation specific event documentation. docs: Typo and link fixes. Use the right callback in QObject::disconnect()
| | * | | QNetworkAccessBackend::start() is used although QT_NO_BEARERMANAGEMENT is ↵shkim2011-09-291-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | defined. Merge-request: 2690 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
| * | | | Merge branch '4.8' into earth-staging-masterSinan Tanilkan2011-09-212-10/+15
| |\ \ \ \ | | |/ / / | | | | | | | | | | | | | | | Conflicts: dist/changes-4.8.0
| * | | | Remove support for multiple cookies in one Set-Cookie header to follow RFC6265.Jocelyn Turcotte2011-09-161-13/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This also allows cookie values to contain commas to increase compatibility like most popular browsers do even though the RFC still reserves them for future uses. Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com> Task-number: QTBUG-21456
* | | | | Fix construction races in QtNetworkShane Kearns2011-10-061-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When two threads construct a QNetworkAccessManager at exactly the same time on an SMP system, there are construction races for some Q_GLOBAL_STATIC data. This is normal and expected - the losing thread deletes its instance as part of the Q_GLOBAL_STATIC macro. However, for two of the classes, destruction of the loser had side effects. For QNetworkConfigurationMangerPrivate, there was a crash because of uninitialised variable on the losing side. For QNetworkAccessBackendFactoryData, a guard mechanism intended to prevent the data being reconstructed by destructors of other global static classes was being set by the loser. To fix this, the bool is changed to a QAtomicInt. In the normal case, it will have value 0->1 on startup and 1->0 on shutdown. In the race case, it will have values 0->1->2->1 on startup and 1->0 on shutdown. Task-Number: QTBUG-20343 Reviewed-By: mread
* | | | | QNAM - fix poor performance of HEAD request with authenticationShane Kearns2011-10-041-1/+1
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QHttpNetworkReply was waiting for a body to be sent for 401 and 407 responses, whereas with a HTTP HEAD request, there will be no body. This delayed the authentication signal until after the http channel is closed by the server after a timeout. For example with the server used for autotesting, the authentication signal is delayed 15 seconds. When the server has a very long timeout, the authentication signal may not be emitted at all. Task-Number: QT-5304 Reviewed-By: Martin Petersson
* | | | Merge branch 'qt-4.8-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration ↵Qt Continuous Integration System2011-09-161-0/+5
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into master-integration * 'qt-4.8-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration: StrictlyEnforceRange with snapOneItem/Row and header behavior change Release font engine refcount when done using it in QTextEngine Migrate addMarkUp function to QChar. update the proxy info before session is opened in QNAM by Aapo Makela QSslCertificate: block all DigiNotar (intermediate and root) certs QSslCertificate: also check common name for blacklisted certificates Fix typo in header guard. fix doc typo Ensure that the corewlan plugin can be built with the Mac OS X 10.7 sdk remove obsolete define Fix assert error on Windows with a negative char. Doc: Fixed the example of an encoded URL in the class description. Added an additional check to workaround an issue on Windows.
| * \ \ \ Merge remote branch 'origin/4.8' into 4.8-from-4.7Rohan McGovern2011-09-1447-7819/+3815
| |\ \ \ \ | | |/ / / | | | / / | | |/ / | |/| | | | | | Conflicts: src/gui/text/qtextengine_p.h src/network/ssl/qsslsocket_openssl.cpp
| * | | update the proxy info before session is opened in QNAM by Aapo MakelaKranthi Kuntala2011-09-081-0/+5
| | |/ | |/| | | | | | | Reviewed-By: Kranthi Kuntala <kranthi.kumar-kuntala@nokia.com>
* | | Fix QNetworkReply::errorString returning an untranslated stringGiuseppe D'Angelo2011-09-121-10/+10
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | The QHttpNetworkConnectionPrivate::errorDetail is supposed to return a translated string, which is then set as the QNetworkReply error. The current code incorrectly uses QT_TRANSLATE_NOOP, which mark the strings for translation, but does not translate them. The result is that even with a translator loaded those strings are written in English. Fixes QTBUG-18382. Merge-request: 2671 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* | HTTP backend: invoke methods directly for synchronous requestsPeter Hartmann2011-08-101-2/+2
| | | | | | | | | | | | | | | | | | | | when using synchronous requests, we need to invoke some methods directly, e.g. "metaDataChanged" would otherwise not be called when reading data from the cache. Patch-by: Siddharth Mathur Reviewed-by: Peter Hartmann Task-number: QTBUG-20796
* | Merge remote-tracking branch 'earth-team/master'Olivier Goffart2011-07-201-2/+3
|\ \
| * | QNetworkAccessFileBackend: Add warning for file url without scheme.Martin Petersson2011-07-191-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge branch 4.7 into qt-4.8-from-4.7Qt Continuous Integration System2011-07-064-6/+16
|\ \ \ | | |/ | |/|
| * | HTTP internals: continue gzip decompression if buffer fills exactlyPeter Hartmann2011-07-051-1/+1
| | | | | | | | | | | | | | | | | | Reviewed-by: Markus Goetz Reviewed-by: Prasanth Ullattil Task-number: QTBUG-12908
| * | HTTP internals: do not discard data if not receiving gzip end markerPeter Hartmann2011-07-053-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | some servers send gzip data without the gzip end markers. In that case, we should deliver all content and tear down the gzip data structures. Reviewed-by: Markus Goetz Patch-by: Tor Arne Vestbø and Peter Hartmann Task-number: QTBUG-16022
| * | Add a null check for the backend in QNetworkReplyImpl.Jocelyn Turcotte2011-07-051-1/+1
| | | | | | | | | | | | | | | | | | This is a blurry attempt to fix a crash happening during bearer session loss/recovery. Reviewed-by: Markus Goetz
* | | Push the data together with the error in the synchronous case.Pierre Rossi2011-06-281-0/+1
| |/ |/| | | | | | | | | | | As it turns out some test cases in QtWebKit rely on this. Task-number: QTBUG-19556 Reviewed-by: mgoetz