summaryrefslogtreecommitdiffstats
path: root/src/network/access/qnetworkaccessmanager.cpp
Commit message (Collapse)AuthorAgeFilesLines
* network API: add support for HTTP multipart messagesPeter Hartmann2011-03-221-1/+92
| | | | | | | | | | | | | | This commit adds two new classes, QHttpPart and QHttpMultiPart, and two new overloads to QNetworkAccessManager: post(const QNetworkRequest &request, QHttpMultiPart *multiPart) and put(const QNetworkRequest &request, QHttpMultiPart *multiPart). With those classes, it is possible to do a HTTP POST with a multipart message in a memory-saving way: The data from the parts is not copied when read from a file or another QIODevice. Reviewed-by: Markus Goetz Task-number: QTBUG-6222
* Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt into earth-masteraxis2011-02-241-3/+4
|\ | | | | | | | | | | Conflicts: src/network/access/qnetworkreplyimpl.cpp tests/auto/moc/tst_moc.cpp
| * Merge branch earth-team/master into earth-stagingJoão Abecasis2011-02-161-243/+11
| |\ | | | | | | | | | | | | Conflicts: doc/src/development/qmake-manual.qdoc
| * \ Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-02-101-3/+4
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/development/qmake-manual.qdoc mkspecs/symbian-gcce/qmake.conf qmake/project.cpp src/corelib/global/qnamespace.qdoc src/declarative/graphicsitems/qdeclarativetext.cpp src/gui/text/qtextdocumentlayout.cpp src/gui/text/qtextdocumentlayout_p.h tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp tests/auto/networkselftest/networkselftest.pro tests/auto/qscriptengine/tst_qscriptengine.cpp tools/designer/src/components/signalsloteditor/signalslot_utils.cpp tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp tools/qdoc3/test/qt-build-docs.qdocconf tools/qdoc3/test/qt-html-templates.qdocconf tools/qdoc3/test/qt-html-templates_zh_CN.qdocconf tools/qdoc3/test/qt.qdocconf tools/qdoc3/test/qt_ja_JP.qdocconf tools/qdoc3/test/qt_zh_CN.qdocconf
| | * | Fix random crashes when bearer suddenly goes downShane Kearns2011-02-041-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. QNetworkSession being deleted from the closed signal caused data abort or E32User-CBase 49 panics. (both observed) 2. Potential E32User-CBase 46 panic in ConnectionProgressNotifier::StartNotifications() Reviewed-by: Aaron Tunney Reviewed-By: Markus Goetz Task-Number: QTBUG-17196
* | | | QNAM: Threaded HTTP implementationMarkus Goetz2011-02-211-0/+13
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-243/+11
|/ / | | | | | | | | | | | | | | 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-251-33/+9
|\| | | | | | | | | | | Conflicts: configure src/network/bearer/bearer.pri
| * Fix header not found build errorShane Kearns2011-01-171-1/+1
| | | | | | | | Task-Number: QT-4378
| * Workaround crash when multiple QNetworkAccessManager instances are usedShane Kearns2011-01-141-33/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of each QNetworkAccessManager owning a QNetworkSession, they now share a QNetworkSession if they have the same QNetworkConfiguration. QNetworkAccessManager now uses passive roaming instead of application level roaming. The state change signal (entering connected state) is used to indicate reconnection instead of being triggered when sending an ALR accept(). This preserves the previous behaviour, as QNAM always accepted the suggested access point from bearer mobility. In the case of multithreaded applications, one QNetworkSession will be created for each thread which uses QNetworkAccessManager, as QNetworkSession is not thread safe. Task-number: QT-4378 Reviewed-by: Markus Goetz Reviewed-by: juhvu
* | 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-111-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-12-061-2/+14
|\| | | | | | | | | | | | | | | | | | | 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-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Fix compilation after merge.Olivier Goffart2010-11-121-0/+1
| | | | | | | | Also fix a warning
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-11-121-0/+20
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0/+21
| | | | | | | | | | | | | | 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-17/+11
|\|
| * QNAM: Internal function renamingMarkus Goetz2010-10-271-6/+6
| | | | | | | | | | Reviewed-by: Prasanth Task-Number: QTBUG-13234
| * QNAM: Do not load credentials from cache prematurelyMarkus Goetz2010-10-271-11/+5
| | | | | | | | | | | | | | | | The credentials shall only be loaded on demand, e.g. after the HTTP code emits authenticationRequired() Reviewed-by: Prasanth Task-Number: QTBUG-13234
| * QNAM: Do not need QNetworkSession for data://Markus Goetz2010-10-141-0/+16
| | | | | | | | | | | | | | This was already fixed in 4.8, this is a hotfix for 4.7 Task-Number: QT-4096 Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
* | QNAM: Move out function calls to new variableMarkus Goetz2010-10-051-2/+3
| |
* | QNAM: Remove QNetworkAccessDataBackendMarkus Goetz2010-10-051-3/+1
| | | | | | | | The QNetworkReplyDataImpl is now used instead.
* | QNAM: New specialized QNetworkReply for data: URLsMarkus Goetz2010-10-051-0/+6
| | | | | | | | | | | | | | | | | | | | | | Implement a QNetworkReplyDataImpl for data: URLs. This avoids having the overhead of a special backend class of QNetworkReplyImpl. Also move the instantiation to the begin of QNAM::createRequest() so no network sesssion is needed. Reviewed-by: Thiago Macieira Reviewed-by: Peter Hartmann
* | QNAM: Rename QFileNetworkReply to QNetworkReplyFileImplMarkus Goetz2010-10-051-2/+2
| | | | | | | | | | | | | | | | This name is more intuitive since that class lives on the same level as QNetworkReplyImpl and not on the lower level like QHttpNetworkReply Reviewed-by: Peter Hartmann
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-09-281-3/+2
|\| | | | | | | | | | | | | | | Conflicts: src/gui/painting/qrasterizer.cpp src/network/access/qnetworkaccessmanager.cpp tests/auto/qpainter/tst_qpainter.cpp tools/assistant/tools/assistant/mainwindow.cpp
| * QNAM: Use QFileNetworkReply for qrc:/ URL schemaMisha Tyutyunik2010-09-221-2/+2
| | | | | | | | | | | | | | Resources do not need network access and can be quicker loaded with QFileNetworkReply. Reviewed-by: Markus Goetz
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-09-101-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: bin/syncqt demos/declarative/snake/content/snake.js demos/declarative/snake/snake.qml doc/src/development/qmake-manual.qdoc src/corelib/plugin/plugin.pri src/gui/kernel/qapplication_win.cpp src/gui/kernel/qdesktopwidget_win.cpp src/gui/painting/qdrawhelper.cpp tests/auto/qdir/tst_qdir.cpp tools/qdoc3/test/assistant.qdocconf tools/qdoc3/test/designer.qdocconf tools/qdoc3/test/linguist.qdocconf
| * QNetworkAccessManager doc: add since tag for added enumPeter Hartmann2010-08-311-1/+1
| |
* | QNAM: Move a qRegisterMetaTypeMarkus Goetz2010-08-241-0/+2
| |
* | Remove the use of deprecated qVariant*Olivier Goffart2010-08-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test directory untouched. This just apply those regexp: git grep -O"sed -i 's/qVariantValue</qvariant_cast</'" qVariantValue git grep -O"sed -i 's/qVariantSetValue(\([^&*\(),]*\), */\\1.setValue(/'" qVariantSetValue git grep -O"sed -i 's/qVariantSetValue *<\([^>]*\)> *(\([^&*\(),]*\), */\\2.setValue<\\1>(/'" qVariantSetValue git grep -O"sed -i 's/qVariantCanConvert *<\([^>]*\)> *(\([^&*\(),]*\))/\\2.canConvert<\\1>()/g'" qVariantCanConvert git grep -O"sed -i 's/qVariantCanConvert *<\([^>]*\)> *(\([^&*\(),]*([^&*\(),]*)\))/\\2.canConvert<\\1>()/g'" qVariantCanConvert git grep -O"sed -i 's/qVariantFromValue\( *[(<]\)/QVariant::fromValue\\1/'" qVariantFromValue git checkout src/corelib/kernal/qvariant* Rev-by: dev mailing list
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-06-081-0/+9
|\| | | | | | | | | Conflicts: tools/qdoc3/test/qt-html-templates.qdocconf
| * QNAM: Improve child deletion orderMarkus Goetz2010-06-021-0/+9
| | | | | | | | | | | | | | | | Delete the QNetworkReply children first because they could access the QAbstractNetworkCache that is also a child of the QNetworkAccessManager. Reviewed-by: brad
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Thiago Macieira2010-06-011-0/+26
|\|
| * Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-05-241-0/+26
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (39 commits) fix typo in documentation Improve Bearer Management related documentation in QNetworkAccessManager Compile with QT_NO_ACTION. Unbreak compilation outside Mac QDBusAbstractInterface: don't set lastError outside the object's own thread tst_bic: make it possible to test for cross-compilation Remove Q_PACKED from QChar and QLocale::Data. QDebug operator for QFlags Removing unneeded qDebug statement. Fixing incorrect addition of public API symbols. Removal erroneous inclusion of new Public API in qmacstyle. Doc: design changes qdoc: Fixed html error, but the problem is still there. qdoc: Changed number of columns to 1. Oila! Doc: Changes to the HTMLGenerator, style and js remove dead code that will never get called. add bytes and activeTime to corelwan. Fix formating of license header. fix irix build clarify wording of warning message ...
| | * fix typo in documentationAlex2010-05-241-1/+1
| | |
| | * Improve Bearer Management related documentation in QNetworkAccessManagerAlex2010-05-241-0/+26
| | | | | | | | | | | | Reviewed-by: trustme
* | | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-05-251-3/+5
|\| |
| * | Do not attempt to setParent of object in a different threadWarwick Allison2010-05-241-3/+5
| |/ | | | | | | | | | | | | QNetworkAccessManager::setCookieJar used to give an error message, now it documents the behavior and avoids the warning. Task-number: QTBUG-10554
* / Revert "Revert "Use QUrl::isLocalFile and fix the scheme checking in local ↵Thiago Macieira2010-05-201-6/+5
|/ | | | | | URLs."" This reverts commit 0828b63ce77846f14994f7c47468f0db8b42fbd4.
* Revert "Use QUrl::isLocalFile and fix the scheme checking in local URLs."Morten Johan Sørvig2010-05-101-5/+6
| | | | This reverts commit ebddf7a8739d7f4aaa7d9cb8a41a14eebb65e4f4.
* Use QUrl::isLocalFile and fix the scheme checking in local URLs.Thiago Macieira2010-05-051-6/+5
| | | | | | | | | RFC 3986 requires that schemes be compared case-insensitively, so "QRC:/" is allowed for Qt resources. Also document the use of file engines and search paths. Reviewed-by: Markus Goetz
* QNAM HTTP: Introduce attributes for controlling cookies and authRobert Hogan2010-05-041-9/+18
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add missing QT_NO_BEARERMANAGEMENT ifdefs.Aaron McCarthy2010-04-151-6/+4
| | | | This add addition ifdefs around code missed by MR 517.
* Introduce a qconfig feature for Bearer ManagementTasuku Suzuki2010-04-151-1/+15
| | | | | Merge-request: 517 Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
* Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Thiago Macieira2010-04-131-0/+10
|\
| * Document Symbian platform security requirements on Qt APIsFrans Englich2010-04-121-0/+10
| | | | | | | | | | | | | | | | | | Work done jointly by Gareth and me. Yields no qdoc errors. Task-number: QTBUG-9342 Task-number: QTBUG-9120 Reviewed-by: Gareth Stockwell Reviewed-by: David Boddie
* | Revert "Don't emit open signal on session close/error."Aaron McCarthy2010-03-191-2/+0
| | | | | | | | This reverts commit 39818f933b958d504b9cc18487658209d1df22da.
* | Rename networkAccess property to networkAccessible.Aaron McCarthy2010-03-191-24/+82
| | | | | | | | Add unit test and update docs.
* | Don't emit open signal on session close/error.Aaron McCarthy2010-03-191-0/+2
| |