summaryrefslogtreecommitdiffstats
path: root/src/network/access
Commit message (Collapse)AuthorAgeFilesLines
* 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-144-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
* Update copyright year to 2011.Jason McDonald2011-01-1055-55/+55
| | | | Reviewed-by: Trust Me
* fix build with QT_NO_BEARERMANAGEMENTPeter Hartmann2011-01-071-0/+4
| | | | | | | | start() is only defined when using bearer management; that method calls open(), which we just call directly if not using bearer. Reviewed-by: Markus Goetz Task-number: QTBUG-16477
* Revert "QNAM HTTP: Fix missing error() signal"Markus Goetz2011-01-072-20/+1
| | | | | We don't think this is the right solution. This reverts commit de72670c620e1193fa875bf1a4adee553700bacb.
* fix build with namespaces in new cookie jar tablePeter Hartmann2011-01-061-0/+2
| | | | forgot the QT_END_NAMESPACE macro.
* cookie jar code: enhance security by keeping track of effective TLDsPeter Hartmann2011-01-055-12/+6551
| | | | | | | | | | | | | | The problem was the following: According to the cookie RFC, domains must have at least one dot in their name for setting a cookie (e.g. domain example.com can set a cookie for ".example.com" but not for ".com"). The problem is: Following this rule, one could still set "supercookies" for e.g. ".co.uk". The solution is to generate a table from http://publicsuffix.org which maintains a list of all "effective" TLDs like e.g. ".co.uk". Reviewed-by: Olivier Goffart Task-number: QTBUG-14706
* QNAM HTTP: Fix missing error() signalVille Pernu2010-12-202-1/+20
| | | | | | | | During download, if a QAbstractSocket::RemoteHostClosedError occurs, the error handling is deferred to _q_disconnected() slot. However, the error message is not saved for the function, and thus the _q_disconnected only emits a finished-signal. We now store an unhandled error into a private member. It is handled and reset by the _q_disconnected (or more specifically, allDone-function). Also, an additional check is made that there are no simultaneous HTTP errors. If a HTTP error exists, any socket errors are suppressed. Task-Number: QT-3494 Reviewed-By: Markus Goetz
* Abort working replies with error when network session fails.Aaron McCarthy2010-12-141-2/+2
| | | | | | | Otherwise the connections will stay in a zombie state until the TCP keep alive timer times out in a couple of hours. Task-number: Maemo 201619
* Revert "Fix a missing error-signal when a server is shut down while downloading"Peter Hartmann2010-11-262-18/+1
| | | | | | | | This reverts commit cbf7a7782f465846455a5fd5df339ebde31a5521. This commit caused autotest regressions in tst_qdeclarativeloader and tst_qdeclarativetext; reverting it for now until this has been resolved.
* Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7Ville Pernu2010-11-2415-40/+209
|\
| * HTTP backend: fix build without Qt3 supportPeter Hartmann2010-11-231-1/+1
| | | | | | | | Reviewed-by: Markus Goetz
| * QNetworkAccessManager: enable synchronous HTTP callsPeter Hartmann2010-11-2315-40/+209
| | | | | | | | | | | | | | | | | | | | | | | | | | 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 a missing error-signal when a server is shut down while downloadingVille Pernu2010-11-242-1/+18
|/ | | | | | | | | QT-3494: During download, if a QAbstractSocket::RemoteHostClosedError occurs, the error handling is deferred to _q_disconnected() slot. However, the error message is not saved for the function, and thus the _q_disconnected only emits a finished-signal. Solution: Store an unhandled error into a private member. It is handled and reset by the _q_disconnected (or more specifically, allDone-function).
* QNAM HTTP: Ignore double content-length headersMarkus Goetz2010-11-132-3/+19
| | | | | Task-number: QTBUG-15311 Reviewed-by: ogoffart
* QNAM: Do not need QNetworkSession in AlwaysCache load modeMarkus Goetz2010-11-082-12/+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
* QNAM: Remove dead waitForUpstreamBytesWritten() codeMarkus Goetz2010-11-082-7/+0
|
* QNAM: Remove dead waitForDownstreamReadyRead() codeMarkus Goetz2010-11-0811-61/+0
| | | | Reviewed-by: Thiago Macieira
* QNAM HTTP: Download last chunk properly when readBufferSize() limitedMarkus Goetz2010-11-041-2/+3
| | | | | | Task-number: QTBUG-13431 Task-number: QTBUG-6276 Reviewed-by: ogoffart
* QNAM: Reset authenticator state properly between requestsMarkus Goetz2010-11-031-0/+7
| | | | | | | Reset authenticator and fix operator=(...) of QAuthenticator. Task-number: QTBUG-6792 Reviewed-by: ogoffart
* QNAM: Fix doc rendering of QNetworkRequestMarkus Goetz2010-10-291-10/+0
| | | | Reviewed-by: Morten Engvoldsen
* Network code: Fix code comment spellchecking errors.Markus Goetz2010-10-282-2/+2
| | | | | | Me no speak americano. Reviewed-by: Peter Hartmann
* QNAM: fix buildPeter Hartmann2010-10-271-1/+5
| | | | | | | | * winsock2.h conflicts with qplatformdefs.h * ifndef QT_NO_OPENSSL was missing Reviewed-by: Prasanth Reviewed-by: Markus Goetz
* QNAM HTTP: Remove the error() of QHttpNetworkConnectionMarkus Goetz2010-10-275-29/+9
| | | | | | | | Removed the distinction between reply error and connection error. The QNetworkAccessManager was treating them the same way anyway. Reviewed-by: Prasanth Task-Number: QTBUG-13234
* QNAM HTTP: Remove enableEncryption()Markus Goetz2010-10-272-8/+0
| | | | | Reviewed-by: Prasanth Task-Number: QTBUG-13234
* QNAM HTTP: Remove unused codeMarkus Goetz2010-10-273-42/+0
| | | | | Reviewed-by: Prasanth Task-Number: QTBUG-13234
* QNAM HTTP: Move authenticationRequired() to QHttpNetworkReplyMarkus Goetz2010-10-275-11/+7
| | | | | Reviewed-by: Prasanth Task-Number: QTBUG-13234
* QNAM HTTP: Move proxyAuthenticationRequired() to QHttpNetworkReplyMarkus Goetz2010-10-274-13/+9
| | | | | Reviewed-by: Prasanth Task-Number: QTBUG-13234
* QNAM HTTP: Move cacheCredentials() to QHttpNetworkReplyMarkus Goetz2010-10-274-5/+4
| | | | | Reviewed-by: Prasanth Task-Number: QTBUG-13234
* QNAM HTTP: Use sslErrors() from QHttpNetworkReplyMarkus Goetz2010-10-275-8/+10
| | | | | Reviewed-by: Prasanth Task-Number: QTBUG-13234
* QNAM HTTP: Remove Wait4AuthStateMarkus Goetz2010-10-273-8/+1
| | | | | Reviewed-by: Prasanth Task-Number: QTBUG-13234
* QNAM: Internal function renamingMarkus Goetz2010-10-273-10/+10
| | | | | Reviewed-by: Prasanth Task-Number: QTBUG-13234
* QNAM HTTP: Internal variable spelling mistakesMarkus Goetz2010-10-273-12/+12
| | | | | Reviewed-by: Prasanth Task-Number: QTBUG-13234
* QNAM HTTP: Pause connection when emitting proxy auth signalMarkus Goetz2010-10-271-0/+4
| | | | | | | | | Pause the socket notifiers because the user could be displaying a dialog which makes the event loop run and could make our socket notifiers fire. Reviewed-by: Prasanth Task-Number: QTBUG-13234
* QNAM HTTP: Also pause connection when emitting sslErrors()Markus Goetz2010-10-271-0/+4
| | | | | | | | | | Pause the socket notifiers because the user could be displaying a dialog which makes the event loop run and could make our socket notifiers fire. Reviewed-by: Peter Hartmann Reviewed-by: Prasanth Task-Number: QTBUG-13234
* QNAM HTTP: Also resume uploads after connection pauseMarkus Goetz2010-10-271-3/+4
| | | | | | Reviewed-by: Peter Hartmann Reviewed-by: Prasanth Task-Number: QTBUG-13234
* QNAM HTTP: Process authenticationRequired() from HTTP properlyMarkus Goetz2010-10-274-7/+10
| | | | | | | | | Fixes a bug where a different QNetworkReply(Impl) handles an authentication request. Reviewed-by: Peter Hartmann Reviewed-by: Prasanth Task-Number: QTBUG-13234
* QNAM HTTP: Pause sockets while emitting to user code.Markus Goetz2010-10-272-41/+56
| | | | | | | | | | | This is needed because user code might display a dialog which spins an event loop and could make the sockets readyRead() fire. This event loop recursion is not desired as it can lead to nasty bugs when the state is messed up. Reviewed-by: Peter Hartmann Reviewed-by: Prasanth Task-Number: QTBUG-13234
* QNAM HTTP: Do not copy around credentials when using NTLMMarkus Goetz2010-10-271-0/+7
| | | | | | | | Copying the username and password messes up the state inside the QAuthenticator. Do not do it. Reviewed-by: Prasanth Task-Number: QTBUG-13234
* QNAM HTTP: Move caching of credentials from URLMarkus Goetz2010-10-272-6/+6
| | | | | | | | The credentials are now cached when the request gets sent. Reviewed-by: Peter Hartmann 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 HTTP: Fix error signal emission for unreachable IPsMarkus Goetz2010-10-151-2/+12
| | | | | | | This commit fixes getFromUnreachableIp() Reviewed-by: Thiago Macieira Task-Number: QTBUG-10679
* 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: Use QFileNetworkReply for qrc:/ URL schemaMisha Tyutyunik2010-09-222-3/+6
| | | | | | | Resources do not need network access and can be quicker loaded with QFileNetworkReply. Reviewed-by: Markus Goetz
* Fix one hang of QNAM on Symbian.Jocelyn Turcotte2010-09-201-2/+2
| | | | | | | | | | This one happened especially more often on amazon.de. While one channel was taken by one request, but postponed because it was still in disconnecting mode, another request would come, pick the same channel, and overwrite the request/reply assignment of this channel. The first request would be left unhandled eternally. Reviewed-by: Markus Goetz
* Fix compile warnings.Friedemann Kleint2010-09-141-0/+1
| | | | Reviewed-by: Thomas Hartmann <thomas.hartmann@nokia.com>
* Merge commit 'refs/merge-requests/2464' of git://gitorious.org/qt/qt into ↵David Boddie2010-09-081-6/+0
|\ | | | | | | integration
| * Correct QNetworkReply::downloadProgress and uploadProgress docsJohn Brooks2010-09-011-6/+0
| | | | | | | | | | The signal provides qint64, which cannot be connected to QProgressBar::setValue(int).
* | QNetworkAccessManager doc: add since tag for added enumPeter Hartmann2010-08-311-1/+1
|/
* QNAM HTTP: Fix crash related to aborted uploadsMarkus Goetz2010-08-122-1/+5
| | | | Task-number: QTBUG-12285