summaryrefslogtreecommitdiffstats
path: root/src/network/access/qhttpnetworkconnectionchannel.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix compiler warnings in QtNetwork.Friedemann Kleint2012-01-051-2/+2
| | | | | | | | | - Initialization order in QHttpNetworkConnectionChannel - Potential use of uninitialized value in QNetworkReplyDataImpl Change-Id: Ia405147ef81a3f1509149349d6b5b01bb078f853 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Fix race in http connection channelShane Kearns2011-12-221-0/+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>
* Don't fetch credentials from cache following a failed proxy authenticationShane Kearns2011-12-221-1/+11
| | | | | | | | | | 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>
* QNetworkAccessManager: delay IPv4 or IPv6 based on getaddrinfo orderMartin Petersson2011-12-221-2/+2
| | | | | | | | | | | | Instead of always delaying IPv4 when we have both Ipv4 and IPv6 we should use the order we get from getaddrinfo to descide which one that should be delayed. Task-number: QTBUG-23066 Change-Id: Ibe8c4d7000abd6e57fe8c6afac8a4a843e17ff27 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Fix regression in user-agent setting of http proxy in a QNetworkRequestShane Kearns2011-12-191-2/+5
| | | | | | | | | | | Modifying the proxy causes a detach(), so the socket is still using the unmodified proxy. Changed this to setProxy() the modified one back to the socket. Test case tst_QNetworkReply::httpProxyCommands() Change-Id: I448c2f2ab43ce8d78bc6edb8261599bf67372676 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QNetworkAccessManager: delay IPv4 connection with Happy EyeballsMartin Petersson2011-12-161-0/+2
| | | | | | | | | Incase we have both IPv4 and IPv6 available after the host lookup we should delay the connection attempt to IPv4. Task-number: QTBUG-23066 Change-Id: I8c0177cf125c9daae314ada73cacef790a39b856 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* Removing unnecessary hidden property "_q_user-agent".Jonas M. Gastal2011-11-241-1/+1
| | | | | | | | | This property is no longer necessary because we can now set the user agent directly on the proxy. Task-number: QTBUG-17223 Change-Id: I27cb126dd401f02525290d2317650f55cae9f4ef Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* 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. Change-Id: I9120e8be1a9a05f39f99752d6426c92fa3d093f2 (cherry picked from commit ec6d7694f72498d1b156bb0ae8d305e01931f7b2) Reviewed-by: Markus Goetz Task-number: QTBUG-21369 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QNAM: Fix authentication cache when the password is in the URLOlivier Goffart2011-11-081-1/+0
| | | | | | | | | | | | | | | 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) Task-number: QTBUG-18411 Change-Id: I8ea11fa23db4314c3f17ed06d2d7f9ee934ccdba Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* Fix compiler warnings.Friedemann Kleint2011-09-281-1/+1
| | | | | | | Change-Id: I6b6d86097074a12c9c4e3d22fe61a6b962ffa21e Reviewed-on: http://codereview.qt-project.org/5627 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* QHttpNetworkConnection : Fix the case when we only have one channelMartin Petersson2011-08-301-0/+6
| | | | | | | | | | | | | | For the Happy eyeballs implementation we use two channels for the case where a host lookup gives us both Ipv4 and Ipv6 addresses. In the case where the Connection is setup to only use one channel we can not use this solution, so in this case we should use the old way of connecting with one channel. Task-number: QTBUG-20981 Change-Id: I6590fb4c67d6a8261cd0e4da8f99cd3603bbb524 Reviewed-on: http://codereview.qt.nokia.com/3524 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* QNAM HTTP: Re-write compression codeMarkus Goetz2011-07-121-71/+11
| | | | | | | | | | | | | | | This eliminates some code (header parsing) that can be done by zlib already. Add support for 'deflate' encoding. Also do less memory copying while uncompressing. Change-Id: I94de21e3c58b904dd91d004c375ed8cbea56cb0b Task-Number: QTBUG-13191 Reviewed-on: http://codereview.qt.nokia.com/1314 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com> Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com> Reviewed-by: Markus Goetz
* QNAM HTTP: Do zero-copy for small HTTP replies by defaultMarkus Goetz2011-07-121-5/+10
| | | | | | | | | | Task-Number: QTBUG-19046 Change-Id: I34bf432c81d94787524124b7d110a00305a660c1 Reviewed-on: http://codereview.qt.nokia.com/1516 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com> Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* Add Happy-Eyeballs style IPv6 connection establishing.Martin Petersson2011-07-041-3/+28
| | | | | | | | | | | | | | | | In the cases where a DNS lookup will give you both an IPv4 and IPv6 address, this will start two connection channels at the same time. One trying to connect using IPv4 and one on IPv6. This is done so that we can use the fastest one for the connection. To do this we have to do the hostlookup in the connection. The result is then in the cache for the individual socket so it will not need to do another lookup. Task-number: QTBUG-16458 Change-Id: I806c20168d9c5edc2831b80f82a2bd570b36d5fa Reviewed-on: http://codereview.qt.nokia.com/1003 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Update licenseheader text in source files for qtbase Qt moduleJyri Tahtela2011-05-241-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Update QTBUG-17223 for Qt 4.8Shane Kearns2011-05-091-1/+6
| | | | | | | | | | | | | | | 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-091-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
* Initial import from the monolithic Qt.Qt by Nokia2011-04-271-0/+1162
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12