summaryrefslogtreecommitdiffstats
path: root/src/network/access
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'symbian-socket-engine' into staging-masterShane Kearns2011-05-106-31/+87
|\
| * Update QTBUG-17223 for Qt 4.8Shane Kearns2011-05-053-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Qt 4.7, http network requests are assigned to http connection channels before connecting the channel. In Qt 4.8, channels are connected "blind" as this gives a performance improvement in certain circumstances. On the assumption that User-Agent should be the same for all the requests being sent to the server in a given burst, we use the first queued request to set the user agent for a http proxy. Task-number: QTBUG-17223 Reviewed-by: Markus Goetz Reviewed-by: Martin Petersson
| * Send User-Agent from the network request in http proxy CONNECT commandShane Kearns2011-05-051-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | 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 QNetworkReplyImpl error handlingShane Kearns2011-04-181-4/+13
| | | | | | | | | | | | | | | | | | The backend was never started when compiled without bearer management, now it is. Now emits the error signal in case of startup errors which would leave the state machine hanging. Previously it just printed a warning. Reviewed-by: Peter Hartmann
| * Enable per network configuration proxy settings in QNetworkAccessManagerShane Kearns2011-04-182-27/+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
* | Merge remote-tracking branch 'origin/4.8'Olivier Goffart2011-05-053-1/+8
|\ \
| * \ Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2011-05-052-0/+7
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1: don't crash in QProcessEnvironment::systemEnvironment() qmake: Introduce new template type no environment on WinCE fix Widestring vs. Ansi mixup fix potential crash in QProcessEnvironment::systemEnvironment() on windows Fix compilation with QT_NO_* fix build on symbian skip widget when its focusPolicy is Qt::ClickFocus in TabOrderEditor fix build on mac make QProcessEnvironment on Unix cache converted values make QProcessEnvironment::systemEnvironment() encoding-safe make QProcessEnvironment on Unix cache converted variable names move key/value converters to the private class make QProcessEnvironment on Windows preserve variable name case split QProcessEnvironmentPrivate::Unit into Key and Value remove unused functions minor optimization: use QList::reserve() use the Hash typedef Changelog: Qt Designer 4.8
| | * | Fix compilation with QT_NO_*Tasuku Suzuki2011-05-022-0/+7
| | | | | | | | | | | | | | | | | | | | Merge-request: 1206 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
| * | | Merge branch 'qt-4.8-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration ↵Qt Continuous Integration System2011-05-041-1/+1
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into master-integration * 'qt-4.8-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration: Clarified sendCustomRequest documentation to include HTTPS
| | * \ \ Merge branch 4.7 into qt-4.8-from-4.7Qt Continuous Integration System2011-05-031-1/+1
| | |\ \ \ | | | |/ / | | |/| |
| | | * | Clarified sendCustomRequest documentation to include HTTPSJanne Anttila2011-05-031-1/+1
| | | | | | | | | | | | | | | | | | | | Reviewed-By: mgoetz
| | * | | Fix warnings on unused parameters and variablesThiago Macieira2011-04-261-1/+0
| | | | |
* | | | | HTTP cache backend: do not load resources that must be revalidatedPeter Hartmann2011-05-041-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | HTTP backend: do not load resources from cache that must be revalidatedPeter Hartmann2011-05-041-7/+5
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | QNetworkCookie: allow spaces in unquoted valuesPeter Hartmann2011-04-291-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We should follow http://tools.ietf.org/html/draft-ietf-httpstate-cookie-23 , which says parse the value until reaching the next ';' or the end of the line. Other cookie implementations allow spaces in unquoted values as well. Reviewed-by: Martin Petersson Task-number: QTBUG-18876
* | | | Fixes warnings about unused variablesOlivier Goffart2011-04-281-1/+0
|/ / / | | | | | | | | | Reviewed-by: Peter Hartmann
* | | Merge remote-tracking branch 'earth-team/master' into earth-staging-masterOlivier Goffart2011-04-2016-15/+177
|\ \ \
| * | | QNetworkCookie: do not access date string out of boundsPeter Hartmann2011-04-201-1/+1
| | | |
| * | | HTTP+SSL: use default SSL configuration, and avoid setting it explctlyPeter Hartmann2011-04-142-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | do not use a null configuration, but a default configuration in QNetworkRequest by default. In addition, setting an SSL configuration explicitly will cause the on-demand loading of root certs to be disabled (because it could be that the user has set the CA certificates explicitly). Reviewed-by: Markus Goetz
| * | | Merge branch 'symbian-socket-engine' of scm.dev.troll.no:qt/qt-symbian-networkShane Kearns2011-04-1214-12/+174
| |\ \ \ | | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | Conflicts: configure.exe src/s60installs/bwins/QtCoreu.def src/s60installs/bwins/QtGuiu.def src/s60installs/eabi/QtCoreu.def
| | * | Merge remote branch 'earth/master' into symbian-socket-engineShane Kearns2011-04-111-6/+1
| | |\ \ | | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/qabstractnetworkcache/tst_qabstractnetworkcache.cpp
| | * \ \ Merge branch 'master' of scm.dev.troll.no:qt/qt-earth-team into ↵Shane Kearns2011-04-116-47/+96
| | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * | | | Fix assert fail when debug log is enabledShane Kearns2011-04-051-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enough debug logging allows time for the proxy server to close the http connection after sending a 407 response. This errors the connection, but then the queued _q_startNextRequest is immediately run, causing an assertion failure. Changed this to a soft failure which allows the error to propagate rather than crashing. Test case is tst_qnetworkreply::ioPostToHttpFromSocket Reviewed-by: Markus Goetz
| | * | | | Merge remote branch 'earth/master' into symbian-socket-engineShane Kearns2011-03-2523-53/+1097
| | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/access/qhttpnetworkconnectionchannel.cpp src/network/socket/qlocalsocket.cpp src/s60installs/bwins/QtCoreu.def src/s60installs/bwins/QtGuiu.def src/s60installs/bwins/QtTestu.def src/s60installs/eabi/QtCoreu.def src/s60installs/eabi/QtGuiu.def
| | * | | | | 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
| | * | | | | Bearer support for threaded http backendShane Kearns2011-03-103-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Reviewed-by: Markus Goetz
| | * | | | | Fix synchronous http deadlock when aborted by internal timeoutShane Kearns2011-03-101-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QHttpThreadDelegate::abortRequest was deleting itself, but not exiting the event loop. For the synchronous usage, both these are incorrect. Without exiting the event loop, the main thread waits forever. If it deletes itself, then the main thread will access the deleted memory on return (the delegate->incomingErrorCode class member) which can crash with frequency depending on heap implementation. With this change, abort acts more like the synchronousFinishedWithErrorSlot. Reviewed-by: Markus Goetz
| | * | | | | Add debug logging to QHttpThreadDelegateShane Kearns2011-03-101-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Activated by defining QHTTPTHREADDELEGATE_DEBUG Reviewed-by: Markus Goetz
| | * | | | | Merge branch 'symbian-socket-engine' of ↵Shane Kearns2011-03-0811-9/+110
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | scm.dev.troll.no:qt/qt-symbian-network into symbian-socket-engine Conflicts: src/network/access/qnetworkaccessmanager.cpp tests/auto/qsslsocket/tst_qsslsocket.cpp
| | | * | | | | Fix duplicate calls to _q_startOperationShane Kearns2011-02-223-6/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because of the shared QNetworkSession, we need to disconnect the signals before detaching from the session. Otherwise we may receive signals from an old session after switching configurations. Also, when a session is connected, we get both the state change (connected) and the opened signals from the session. This needs to be distinguished from the roaming->connected state change to avoid getting the networkSessionConnected signal twice. Reviewed-by: Markus Goetz Task-Number: QTBUG-16901
| | | * | | | | Implement network session for HTTP backendShane Kearns2011-02-214-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reviewed-by: Markus Goetz
| | | * | | | | Explicit network session for QNetworkAccessManagerShane Kearns2011-02-173-1/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | | * | | | | Merge remote branch 'qt/master' into symbian-socket-engineShane Kearns2011-02-0756-71/+6614
| | | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/access/qnetworkaccessmanager.cpp src/network/bearer/qnetworksession.cpp src/network/kernel/qnetworkproxy_symbian.cpp src/network/socket/qnativesocketengine_unix.cpp tests/auto/platformsocketengine/tst_platformsocketengine.cpp
| | | * | | | | | 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
| | | * | | | | | Change default type for http POST to application/octet-streamShane Kearns2011-02-031-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the application did not set the mandatory content-type header for POST requests, Qt was putting in application/x-www-urlencoded. While this is the default for HTML forms, it isn't valid because Qt was not also encoding the data. Reviewed-by: Markus Goetz
| | | * | | | | | Fix header not found build errorShane Kearns2011-02-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-Number: QT-4378
| | | * | | | | | Workaround crash when multiple QNetworkAccessManager instances are usedShane Kearns2011-02-014-39/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 branch 'master' of scm.dev.nokia.troll.no:qt/qt-earth-staging into ↵Qt Continuous Integration System2011-04-1816-55/+1070
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/qt-earth-staging: (163 commits) QLocale: Fixed double to currency string conversion on Mac. Fix qstringbuilder4 test on mac Compile on Mac. Revert "HTTP caching internals: fix logic for PreferNetwork and PreferCache" Use the qt_static_metacall in QueuedConnection Fix crash after merge of the native symbian thread branch. Fix bad merge Re-apply part of ba8e5eedf5f40091eb67dd391a7dcaf9299db2f5 Removed useless comment SSL code: introduce new error value for blacklisted certificates Disable DEF files by default for symbian-gcce. HTTP caching internals: fix logic for PreferNetwork and PreferCache Added a consistency check for number of missing symbols in elf2e32. Updated def file after symbol removal. QLocalSocket: fix abort on Windows. QStringBuilder: add operator += for QString and QByteArray Dummy commit to trigger pulse. Fix QMetaObject::indexOfSlot Fix compilation Documentation for the initilize_list constructor ...
| * | | | | | | | Merge earth-team into origin/master'Olivier Goffart2011-04-121-8/+5
| |\ \ \ \ \ \ \ \ | | |_|_|_|_|_|/ / | |/| | | | | | |
| * | | | | | | | Revert "HTTP caching internals: fix logic for PreferNetwork and PreferCache"Markus Goetz2011-04-111-6/+1
| | |_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e5d27e7aeac984e46f3aa8de20160cc00fc63155. Broke the CI.
| * | | | | | | HTTP caching internals: fix logic for PreferNetwork and PreferCachePeter Hartmann2011-04-071-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PreferNetwork means: send out a request and read from cache if it has not been modified. PreferCache means: load resource from cache if it has not expired yet. This commit makes the cache behave according to the documentation. Reviewed-by: Markus Goetz
| * | | | | | | Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt into earth-masteraxis2011-04-072-2/+7
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/thread/qthread_unix.cpp
| * | | | | | | | HTTP backend: rename method that loads resource from cachePeter Hartmann2011-04-042-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reviewed-by: Markus Goetz
| * | | | | | | | HTTP backend: make cache validation method return boolPeter Hartmann2011-04-042-14/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... rather than storing it in a bool reference. Reviewed-by: Markus Goetz
| * | | | | | | | HTTP backend: return earlier when resource loaded from cachePeter Hartmann2011-04-041-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | no need to add headers to the request if it is not sent but loaded from cache anyway. Reviewed-by: Markus Goetz
| * | | | | | | | QNetworkDiskCache: clean up after merge requestPeter Hartmann2011-04-011-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | changes include whitespace, parenting, recovering erroneously deleted code etc. Reviewed-by: Markus Goetz
| * | | | | | | | QNetworkDiskCache: change file organizationSiddharth Mathur2011-04-012-24/+65
| | |_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Faster disk cache for mobile devices. Reduce file-system touching operations and work around FAT performance issues. Features new on-disk layout. Cached objects are now saved in multiple subdirectories and filenames are shorter in length. Merge-Request: 2505 Reviewed-by: Peter Hartmann
| * | | | | | | fix spelling error in HTTP multipart documentationPeter Hartmann2011-03-231-1/+1
| | | | | | | |
| * | | | | | | network API: add support for HTTP multipart messagesPeter Hartmann2011-03-2210-5/+964
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | | | | QNAM HTTP: Fix bug with explicitly zero-length compressed responses.Andreas Kling2011-03-221-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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