summaryrefslogtreecommitdiffstats
path: root/src/network/access/qnetworkaccessbackend.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright headersAkseli Salovaara2015-03-311-13/+13
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I7e3e96183e073877b46bc8071b2ccae19e69426b Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
* Updated year in copyright headerKai Koehne2014-03-261-1/+1
| | | | | | | | | | | | | | | | | | find . -path '*/3rdparty/*' -prune -o -type f -print | xargs -L1 sed -i -E 's/Copyright(.*) 2013 Digia/Copyright\1 2014 Digia/g' Manually patched files: demos/spectrum/3rdparty/fftreal/fftreal_wrapper.h demos/spectrum/3rdparty/fftreal/fftreal_wrapper.cpp src/3rdparty/s60/eiksoftkeyimage.h tools/qdoc3/test/qt-project.qdocconf tests/auto/qsharedpointer/nontracked.h tests/auto/qsharedpointer/nontracked.cpp Change-Id: I3f9074923b4d6bd4666258ab04f01476cc6e901c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Sergio Ahumada <sahumada@blackberry.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-131-1/+1
| | | | | | 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-291-24/+24
| | | | | | | | 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>
* Update contact information in license headers.Sergio Ahumada2012-08-011-2/+2
| | | | | | | | | | | | | - 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>
* QNAM - maintain a weak reference to the QNetworkSessionShane Kearns2012-06-061-5/+6
| | | | | | | | | | | | | | | | When handling signals from the session, a pointer is needed. Also the QNetworkReplyImpl needs to access the manager's session. So, the manager should have a strong and weak reference. The strong reference is held during connection establishment. The weak reference is held all the time, though it will become null when the session is destroyed in idle. The non static member function getNetworkSession() is used to create strong references from the weak reference where required. Task-number: ou1cimx#1004278 Change-Id: I4b5b36b1d996b98e659d993969006c61b4440c15 Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com> (backported from commit bae1613c4c3d8c38b90ed2ba5c1b149e1bc87987)
* QNetworkReply::setReadBufferSize fix for threaded httpMartin Petersson2012-05-131-0/+12
| | | | | | | | | | | | Added the setReadBufferSize functionallity again by limiting the amount that the delegate read from the channel. Each time that data is fetched from the reply buffer, we communicate back to the thread so that more data can be fetched. Task-number: QTBUG-25327 Change-Id: I08a246f4e7fbfdb8d58f4c5982ed0c9fa474f560 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Update year in Nokia copyright messages.Jason McDonald2012-01-111-1/+1
| | | | | | | | | 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>
* 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
* 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
* Update licenseheader text in source files for qt4.8Jyri Tahtela2011-05-131-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Enable per network configuration proxy settings in QNetworkAccessManagerShane Kearns2011-04-181-23/+53
| | | | | | | | | | | | | | Delayed the resolving of the proxy until the backend is being started. This is because the proxy settings are not known until after QNetworkAccessManager has brought the network online using QNetworkSession. On Nokia's symbian3 phones, the default network configuration is a service network containing a list of access points in priority order. For a typical user, this will include one or more WLAN networks and a cellular network - each of which can have different proxy settings. Task-number: QTBUG-18618 Reviewed-by: Peter Hartmann
* Fix network session use with the localhost optimisation in QNABShane Kearns2011-03-101-5/+2
| | | | | | | | | | | | | QNetworkAccessBackend has an optimisation to not start the bearer when the destination is localhost. On symbian, if the bearer is specified but not started, then socket creation will fail. To fix this, delay pushing the network session until start() is called, at which point we know if the localhost optmisation will be applied or not. When using localhost, don't specify any network session - symbian socket engine will create the socket successfully in thie case. Reviewed-by: Markus Goetz
* Merge branch 'symbian-socket-engine' of ↵Shane Kearns2011-03-081-1/+6
|\ | | | | | | | | | | | | | | scm.dev.troll.no:qt/qt-symbian-network into symbian-socket-engine Conflicts: src/network/access/qnetworkaccessmanager.cpp tests/auto/qsslsocket/tst_qsslsocket.cpp
| * Explicit network session for QNetworkAccessManagerShane Kearns2011-02-171-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implemented a tunnel to get the QNetworkSession from QNetworkAccessManager down to the socket engine. This is currently a private API for QNAM. This patch only implements the FTP backend - the other backends are to follow. On Symbian, the native socket engine will extract the native session (RConnection) from the QNetworkSession implementation, and use that to open sockets using the explicitly specified session. When no session is specified on the socket (default for networking usage outside of QNAM) then the socket is opened with no RConnection specified, which allows the IP stack to find any route via an open interface. The QFtp autotest is enhanced to test QFtp with an explicit session as well as implicit connectivity (where a QNetworkSession is opened by the user, and then QFtp is used without a specified connection). This autotest gives better coverage than the FTP test cases in QNetworkReply. Reviewed-by: Markus Goetz
* | QNAM: Threaded HTTP implementationMarkus Goetz2011-02-211-15/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | HTTP requests are run in a separate thread now. This required some big changes in the QNetworkAccessHttpBackend. There is a new class QHttpThreadDelegate which lives in the HTTP thread and is the communication layer between HTTP code and QNetworkAccessHttpBackend. Communication is done via signals/slots. The synchronous HTTP code (private QtWebKit API) also had to be completely re-worked and uses its own thread now. Reviewed-by: Peter Hartmann Task-number: QTBUG-14162
* | QNAM: Move authentication cache to separate classMarkus Goetz2011-02-041-1/+1
|/ | | | | | | | Also make the authentication cache thread-safe by using a mutex and making QNetworkAuthenticationCredential a value-class. Reviewed-by: thiago
* Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-01-171-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/webkit/imageanalyzer/imageanalyzer.h examples/webkit/imageanalyzer/mainwindow.h mkspecs/unsupported/qws/linux-x86-openkode-g++/qplatformdefs.h src/corelib/io/qfsfileengine_iterator_unix.cpp src/corelib/io/qfsfileengine_iterator_win.cpp src/corelib/kernel/qcoreapplication.cpp src/network/access/qnetworkaccessdatabackend.cpp src/plugins/bearer/connman/qconnmanservice_linux.cpp src/plugins/platforms/openvglite/qwindowsurface_vglite.h src/s60installs/bwins/QtCoreu.def src/s60installs/eabi/QtCoreu.def src/s60installs/s60installs.pro tools/assistant/tools/assistant/helpviewer_qwv.h tools/qdoc3/test/qt-html-templates.qdocconf
| * Update copyright year to 2011.Jason McDonald2011-01-101-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-12-061-0/+1
|\ \ | |/ | | | | | | | | | | | | | | | | Conflicts: configure qmake/generators/win32/msbuild_objectmodel.cpp src/gui/image/qpnghandler.cpp src/network/access/qnetworkaccessdatabackend.cpp src/opengl/qgl_x11egl.cpp tests/auto/qnetworkreply/tst_qnetworkreply.cpp
| * QNetworkAccessManager: enable synchronous HTTP callsPeter Hartmann2010-11-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | To enable synchronous calls, an attribute in the QNetworkRequest has to be set. If set, when QNetworkAccessManager::get() (and post(), put()) returns, the reply is finished and all data has been read in case of success. This feature is semi-public for now (usable, but not documented). To enable this, an attribute in the QNetworkRequest must be set. If this attribute is set, we open a new connection to the server with only one channel and call the channels' sockets' waitFor* methods. Reviewed-by: Markus Goetz
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-11-121-12/+0
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure doc/src/snippets/code/doc_src_qmake-manual.qdoc mkspecs/features/symbian/application_icon.prf mkspecs/features/symbian/default_post.prf mkspecs/features/symbian/symbian_building.prf qmake/generators/symbian/initprojectdeploy_symbian.cpp src/multimedia/audio/audio.pri src/network/access/qnetworkaccessmanager.cpp src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/qgl_p.h src/plugins/bearer/corewlan/qcorewlanengine.mm src/plugins/phonon/mmf/mmf.pro tests/auto/qscriptvalue/tst_qscriptvalue.cpp tests/auto/qscriptvalue/tst_qscriptvalue.h tools/qdoc3/doc/qdoc-manual.qdocconf
| * QNAM: Do not need QNetworkSession in AlwaysCache load modeMarkus Goetz2010-11-081-12/+0
| | | | | | | | | | | | | | Move the creation code to the top of QNAM::createRequest() to avoid setting up a QNetworkSession when it is not needed. Reviewed-by: ogoffart
* | Merge branch 4.7 into qt-master-from-4.7Qt Continuous Integration System2010-10-291-1/+1
|\ \ | |/
| * QNAM: Internal function renamingMarkus Goetz2010-10-271-1/+1
| | | | | | | | | | Reviewed-by: Prasanth Task-Number: QTBUG-13234
* | QNAM: New QNetworkReply::setFinished() protected functionMarkus Goetz2010-08-241-1/+1
| | | | | | | | | | | | | | | | This function custom allows subclasses of QNetworkReply to also use the behaviour that is enabled by having isFinished(). Task-Number: QTBUG-11737 Reviewed-by: Peter Hartmann
* | QNAM Zerocopy: QNAM implementation partMarkus Goetz2010-08-121-0/+11
|/ | | | | | Reviewed-by: Peter Hartmann Reviewed-by: Jeremy Katz Reviewed-by: Aleksandar Sasha Babic
* Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Olivier Goffart2010-05-171-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/demos.pro mkspecs/features/resources.prf mkspecs/features/uic.prf src/corelib/io/qurl.cpp src/corelib/tools/qlocale_symbian.cpp src/gui/graphicsview/qgraphicsscene.cpp src/gui/graphicsview/qgraphicswidget_p.cpp src/gui/graphicsview/qgraphicswidget_p.h src/gui/util/qsystemtrayicon_win.cpp src/multimedia/audio/qaudioinput.cpp tests/auto/qhostinfo/qhostinfo.pro
| * QNetworkAccessManager: Backends were tried in wrong orderMarkus Goetz2010-05-141-1/+1
| | | | | | | | | | | | | | | | We inversed the order. HTTP shall be tried first, file:// last. See https://bugs.webkit.org/show_bug.cgi?id=38935 Reviewed-by: Thiago
* | QNAM HTTP: Introduce attributes for controlling cookies and authRobert Hogan2010-05-041-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduced QNetworkRequest::CookieLoadControlAttribute, QNetworkRequest::CookieSaveControlAttribute and QNetworkRequest::AuthenticationReuseControlAttribute These are true by default. They only come into play when QtWebKit processes a cross-origin XMLHttpRequest. In such cases QtWebKit sets each of the attributes to false when it creates a QNetworkRequest where the XMLHttpRequest is cross-origin and has withCredentials set to false: var req = new XMLHttpRequest; req.open("GET", "http://host/resource.php", false); req.withCredentials = false; // actually false by default For more information: http://www.w3.org/TR/XMLHttpRequest2/#credentials-flag The QtWebKit counterpart of this patch is tracked at: https://bugs.webkit.org/show_bug.cgi?id=32967 Merge-Request: 592 Reviewed-by: Markus Goetz
* | Introduce a qconfig feature for Bearer ManagementTasuku Suzuki2010-04-151-0/+3
| | | | | | | | | | Merge-request: 517 Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
* | Merge remote branch 'origin/master' into bearermanagement/unit-testsAaron McCarthy2010-02-221-1/+4
|\ \ | | | | | | | | | | | | Conflicts: src/network/access/qnetworkaccessmanager.cpp
| * | QNetworkAccessManager: add method to send custom requestsPeter Hartmann2010-02-161-1/+4
| |/ | | | | | | | | | | | | | | | | | | This method was added to support e.g. HTTP OPTIONS (needed by Webkit); rather than adding one method for each of those exotic verbs, there is now a generic version for all. Reviewed-by: Markus Goetz Reviewed-by: Andreas Kling Task-number: QTBUG-8206
* | Fix build on Windows.Aaron McCarthy2010-02-121-0/+1
| | | | | | | | | | On Windows interface is #defined to struct. Make sure that qnetworksession.h is included before qplatformdefs.h.
* | Rename and remove unused private slots.Aaron McCarthy2010-02-111-2/+3
| |
* | Only create session when valid configuration is available.Aaron McCarthy2010-02-081-0/+5
| | | | | | | | | | Only create a network session when a valid configuration is available. Don't execute session code if a network session has not been created.
* | Remove debug.Aaron McCarthy2010-02-031-10/+3
| |
* | Don't try to resolve names to determine if dest is localhost.Aaron McCarthy2010-02-031-8/+8
| |
* | Progress.Aaron McCarthy2010-02-031-25/+18
| |
* | Wait until session is in the connected state before starting transfer.Aaron McCarthy2010-02-031-6/+13
| |
* | Bearer Management Integration.Aaron McCarthy2010-02-031-20/+4
| | | | | | | | | | | | | | | | | | | | Perform application level roaming when all pending QNetworkReplys have completed. Emit temporary network failure error when connection to network is lost but is possibly recovering due to roaming. Don't save downloads in cache if they are not complete.
* | Progress.Aaron McCarthy2010-02-031-0/+19
| |
* | Start adding network session support into QNetworkAccessManager.Aaron McCarthy2010-02-031-0/+30
|/
* QNAM HTTP: Fix readBuffer maximum size.Markus Goetz2010-01-111-0/+6
| | | | | | | | | | QHttpNetworkReply has now a throttled mode. If this is activated, it will only read HTTP body when its internal buffer is empty. This means that QNetworkReply.setReadBufferSize() can finally be used for bandwidth limiting. Thanks to David Faure for helping out. Reviewed-By: Peter Hartmann
* Update copyright year to 2010Jason McDonald2010-01-061-1/+1
| | | | Reviewed-by: Trust Me
* QNAM: Do not emit uploadProgress() when reply was abortedMarkus Goetz2009-11-061-0/+2
| | | | Reviewed-by: Peter Hartmann
* Update license headers again.Jason McDonald2009-09-091-4/+4
| | | | Reviewed-by: Trust Me
* Merge branch '4.5' into 4.6Thiago Macieira2009-09-011-4/+10
|\ | | | | | | | | | | | | Conflicts: src/network/access/qnetworkaccessbackend.cpp src/network/access/qnetworkreplyimpl.cpp tests/auto/qabstractnetworkcache/tst_qabstractnetworkcache.cpp
| * QNetworkAccessManager can delete the QAbstractNetworkCache pointer atBenjamin C Meyer2009-09-011-1/+3
| | | | | | | | | | | | | | | | | | | | any point. Rather then keep a separate pointer to the cache in the reply use the pointer kept by the manager so the reply never tries to access a cache pointer that has already been deleted. Autotest: included Merge-request: 1124 Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
| * Initialize QNetworkAccessBackend's private variables to 0 in the constructorBenjamin C Meyer2009-09-011-2/+7
| | | | | | | | | | | | | | and when creating a CacheBackend set the manager pointer. Merge-request: 1124 Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>