summaryrefslogtreecommitdiffstats
path: root/src/network
Commit message (Collapse)AuthorAgeFilesLines
* Updated year in copyright headerKai Koehne2014-03-26164-164/+164
| | | | | | | | | | | | | | | | | | 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>
* network: fix doc typo in QNetworkConfigurationManagerPeter Hartmann2014-03-131-1/+1
| | | | | | | (cherry picked from commit 32794abe722161e1224920865c77c37d74ab977b) Change-Id: Icc66ac3fef52508abda85bafe225fc93f4eb9d4c Reviewed-by: Richard J. Moore <rich@kde.org>
* Prevent spurious SSL errors from local certificates.Richard J. Moore2014-03-131-3/+0
| | | | | | | | | | | | | | | | | | | Qt since approximately 4.4 has set the verify callback on both the SSL store and the SSL context. Only the latter is actually needed. This is normally not a problem, but openssl prior to 1.0.2 uses the verify code to find the intermediate certificates for any local certificate that has been set which can lead to verification errors for the local certificate to be emitted. Backport of 7c8131763de9e70ca56f16635716e7e00559b5d1 Task-number: QTBUG-33228 Task-number: QTBUG-7200 Task-number: QTBUG-24234 Change-Id: I65db8b658df9ff86095381c7b87d690258f03c3a Reviewed-by: Daniel Molkentin <daniel@molkentin.de> Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
* QDeclarativeTypeLoader doesn't close processed QNetworkRepliesFrantisek Vacek2014-02-111-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | backport of Qt5 patch https://codereview.qt-project.org/#change,76825 This bug causes that Cascades QML application cannot open more than system ulimit defined number of different asset:///*.qml files. The realFile is ordinary closed in the ~QNetworkReplyFileImpl(), the QDeclarativeTypeLoader::networkReplyFinished() calls reply->deleteLater(). There are tricky situations when event-loop is not entered and too many read already files are waiting for close. This patch close() file when all the data is read. It can be done this way since the QNetworkReplyFileImplnetworkreply is a sequential device. For more info, please, read comments on QTBUG-36032 cherry-pick from: qtbase cc88e6e92c806def34bce8cdcab275934ab646bf Task-number: QTBUG-36032 Change-Id: I896cf9a89c541d743db1ccc11ab853219d844884 Reviewed-by: Richard J. Moore <rich@kde.org>
* Fix problem with QNetworkAddressEntry returning a invalid netmask.Christian Strømme2014-02-031-6/+6
| | | | | | | | | | | The ip address should be set before the netmask. The reason for this is that QNetworkAddressEntry::setNetmask() compares the protocol of the netmask and the ip, if they don't match the netmask won't be set. Task-number: QTBUG-33911 Change-Id: Ic344b3653c5dfdc5df912dee16e4dbe069d57d24 (cherry-picked from qtbase commit e82951611c6d965cc8ef9cbf4ee7fbccf615bb3f) Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
* Correct algorithm for digest auth when using the CONNECT verbBradley Buda2014-01-231-1/+2
| | | | | | | | | | | | | | | | | | QHttpSocketEngine fails to authenticate to an HTTP proxy that is using Digest authentication and the CONNECT method (i.e. when you are tunneling TLS over HTTP). The bug is due to a bad parameter being passed to QAuthenticatorPrivate::calculateResponse - the requestMethod parameter is passed in as "CONNECT " instead of "CONNECT" (note the trailing space). Because an MD5 hash is derived from this method when using the qop="auth" flavor of Digest auth, the hash does not match the expected value and authentication always fails in this configuration. (cherry picked from commit 5cab14b8a1dfbb03e22b10af385fb90900a9f280) Change-Id: Ief025ada714e03d96a316116f6b9f1711ab2a7f7 Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
* SSL: blacklist ANSSI intermediate certificatePeter Hartmann2013-12-121-0/+2
| | | | | | | | | | ... because it was used to operate a man-in-the-middle proxy. Task-number: QTBUG-35474 (backported from commit 7eecbb07184bc8b2c5e7645af2805ba0a2488082) Change-Id: Ibf15faf0b89fa29a8ca9d9dfeeeab120dd644526 Reviewed-by: Richard J. Moore <rich@kde.org>
* network: fix multi-phased NTLM authenticationPeter Hartmann2013-10-311-2/+3
| | | | | | | | | | | tested manually with internal NTLM proxy. Patch-by: Jonathan Lauvernier <Jonathan.Lauvernier@gmail.com> (cherry picked from commit 338da730e8bc23e227e26b094cba6bb6233c42de) Change-Id: I889056545b60deccf55053c2b41ecb1ea0cba62d Reviewed-by: Richard J. Moore <rich@kde.org>
* QHttpMultiPart: fix data corruption in readData methodPeter Hartmann2013-08-031-1/+2
| | | | | | | | | | | | | | | | When readData() is called repeatedly, we need to keep track which part of the multipart message we are currently reading from. Hereby we also need to take the boundary size into account, and not only the size of the multipart; otherwise we would skip a not completely read part. This would then later lead to advancing the read pointer by negative indexes and data loss. Task-number: QTBUG-32534 Change-Id: Ibb6dff16adaf4ea67181d23d1d0c8459e33a0ed0 Reviewed-by: Jonathan Liu <net147@gmail.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com> (cherry picked from qtbase/af96c6fed931564c95037539f07e9c8e33c69529) Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QNX: adapt SSL lib file name lookup heuristicsPeter Hartmann2013-07-311-1/+4
| | | | | | | | | | | | | | | | | | I.e. do not try to load file names that are not there anyhow. The code would search for libcrypto.so.1.0.0 and libssl.so.1.0.0, while on QNX the libs are called libcrypto.so and libssl.so, and there are no symlinks with version numbers. This saves ~ 45 ms in real apps (tested with Facebook, Twitter and Foursquare), and ~ 24 ms at app startup in an isolated app without GUI (difference maybe because threads are fighting for CPU or so). Task-number: QTBUG-32548 (backport of commit 69b31f7b657a7ca611ad980c2974597de160598c) Change-Id: I33e1c9e2c490b9c7f94aca06add8dc183cce083d Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QNX: hardcode on-demand SSL root cert loadingPeter Hartmann2013-07-301-0/+2
| | | | | | | | | | | | The c_rehash'ed symlinks are always there on QNX, so no need to check at every app start for the feature. This saves ~ 17ms at each app start. Task-number: QTBUG-32549 (backport of commit 28ff65f4dc67349ff88e4cd161b6bced7e9bf477) Change-Id: Ibcc2b5fee806d4a885657746516f4682df2bfa29 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* HTTP internals: do not access reply that was deleted alreadyPeter Hartmann2013-07-251-0/+3
| | | | | | | | | | ... rather than crashing. Task-number: QTBUG-32404 (cherry picked from commit 78f9f4b4970e6f4155b7cf2e88c6ac540dec47bc) Change-Id: Ibdffcb9f57e841655998cf72d0ee8206b4987aa7 Reviewed-by: Richard J. Moore <rich@kde.org>
* QNetworkProxyFactory: check all the proxy environment variablesAdrien Bustany2013-07-161-2/+17
| | | | | | | | | | | QNetworkProxyFactory used to check only for the http_proxy environment variable in systemProxyForQuery. This patch makes it look as well in https_proxy, ftp_proxy and all_proxy. http_proxy is still used as a fallback value. Change-Id: I7934af70d191cd17dbce3b3789260ae1a8332986 (cherry-picked from qtbase commit a7d1b6419d7503474ed5e02f7fb984e4ad5f9219) Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* QNetwork: Check AuthenticationReuseAttribute when using credentials from urlEl Mehdi Fekari2013-06-241-2/+4
| | | | | | | | | Note: This is not needed in Qt5, as the authenticationRequired method in Qt5 has an allowAuthenticationReuse parameter (bool) that is checked before the credentials are used. Change-Id: I5a2734de615a1a96d1fe648bd251850f3b45e167 Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
* Fix various NTLM/Digest multi-threading and usage issuesAron Rosenberg2013-06-202-37/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | - Fix multi-threading bug where NTLM/Digest auth would fail when concurrent requests were on the wire. The fix for this is too not internally share QAuthenticationPrivate pointers, since the challenge values would get overridden in different threads. This was failing because the internal QAuthenticationPrivate members would have been set with the status/values of the current request which would mess up the state of the new request. As currently implemented, the helper functions inside QAuthenticationPrivate can't call detach to implement proper copy on write symantics. - Fix issue where if user was set via constructor, the NTLM domain parsing would not occur. Parsing of DOMAIN\user is now redone if proxy type is determined to be NTLM. Task-number: QTBUG-15472 Task-number: QTBUG-17322 Task-number: QTBUG-18794 Task-number: QTBUG-13063 Task-number: QTBUG-16585 (cherry picked from commit 6ccbfd6ca498da04e4ef02102c4ded9768225b5a) Cherry-picked-by: Peter Hartmann <phartmann@blackberry.com> Change-Id: I58ae6ae362baadfb25eaa7b29556e6e8250d5d95 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* network requests: do not access 1st byte of empty byte arrayPeter Hartmann2013-06-191-1/+2
| | | | | | | | | | | | ... because otherwise this would crash. Apparently there are cases where the header name is empty. Task-number: QTBUG-31667 (cherry picked from commit dd050d35d77e2f6ac37bd1266a843df55848022f) Change-Id: I4c99094d2bad3ebb7cf44f83f9ed6a5f73b73016 Reviewed-by: Richard J. Moore <rich@kde.org>
* QHttpMultipart: reset read pointer when device is resetPeter Hartmann2013-04-271-0/+1
| | | | | | | | | | | ... otherwise we would not read from the beginning when trying to read again. The device is reset when we try to resend a request (e.g. remote host closed etc.). (cherry picked from commit 795468bdc68931a90454bd1c975f7de7ba670e3b) Change-Id: I8d7b3afb64b9cd25ee7c13b78f0b470d9dae3021 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* SSL internals: do not write after shutting down the socketPeter Hartmann2013-04-243-4/+13
| | | | | | | | | | ... but rather throw an error, so the HTTP layer can recover from a SSL shutdown gracefully. In case the other side sent us a shutdown, we tried to send one as well, which results in an error. (backport of commit e145b67fbd54f147dab0f8e460280a9c8533aa7b) Change-Id: I57291a5363cb0f6585dbd6aaa521c748766a1fdf Reviewed-by: Richard J. Moore <rich@kde.org>
* Increase the size of the QHostInfo cache.Richard Moore2013-04-241-2/+2
| | | | | | | | | | | | | This change increases the size of the DNS cache in QHostInfo from 64 entries to 128. Given the figures in the google chrome performance paper http://www.igvita.com/posa/high-performance-networking-in-google-chrome/ this should mean we can cache enough entries to handle 4 tabs at once. (cherry picked from commit fd9013658bab096839154ae6e68adfd1a4e10189) Change-Id: I824aa4127b6067c3ed6a2be3dbc819288ba41d1c Reviewed-by: Peter Hartmann <phartmann@blackberry.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* Allow QHostInfo::lookupHost() with no receiver to warm the DNS cache.Richard Moore2013-04-241-1/+8
| | | | | | | | | | | | This change lets you call QHostInfo::lookupHost() with a null receiver in order to warm up the DNS cache. This allows you to try to get the DNS request in flight early. (cherry picked from commit 4030b6339c3dae4474f60b07700526fccf428b0c) Change-Id: Ieac3c535b8f9b12a2f894510a898b349712e2fce Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
* QNX host lookup: do not try to load libresolv.so, it is not therePeter Hartmann2013-04-241-1/+1
| | | | | | | | | | Not trying to load the lib saves 30 - 50ms upon an apps' 1st host lookup. Task-number: QTBUG-30809 (cherry picked from commit b4985215df767c14ddd888cbb2919be3a7617cfd) Change-Id: If7338188c05f7fdf2ff80d06d91e7c7022e0e3d7 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* QNetworkConfigurationManager: check whether app is shutting downPeter Hartmann2013-04-161-1/+4
| | | | | | | | | | | | | | | | | ... before trying to update the configurations. Before, we would check whether the pointer to the QNetworkConfigurationManagerPrivate instance was 0 and in that case construct it. This would mean that this code path was taken "at app shutdown", i.e. when the qAddPostRoutine had already been called but the other statics were still accessed. Note: This is not thread safe, but neither is the rest of the code; making it thread-safe would require additional changes. Task-number: QTBUG-30585 (backport of commit cc028650e590ac49293558099b3fb87720e9793b) Change-Id: Ifaae4d758a10b44bc7f838cdc0d3a1129ed63228 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* SSL code: store SSL parameters for debugging, guarded by definePeter Hartmann2013-03-251-0/+35
| | | | | | | | | | | | | ... so SSL traffic can be decrypted with e.g. tcpdump / Wireshark. For this to work, the define needs to be uncommented and QtNetwork recompiled. This will create a file in /tmp/qt-ssl-keys which can be fed into Wireshark. A recent version of Wireshark is needed for this to work. (cherry-picked from commit 1f180e9690a0a5f6cc849c1988ccda13de1b1e20) Change-Id: I413ffd2494c780f92ccad7e4fdc11b790966e7ce Reviewed-by: Richard J. Moore <rich@kde.org>
* QSslConfiguration: toggle on demand loading of root certs properlyPeter Hartmann2013-03-044-1/+21
| | | | | | | | | | | | | | | | | make sure we keep track of when we can load root certs and when we cannot (we cannot when the developer set the certs explicitly). This is implemented the same way for QSslSocket already, and needs to be duplicated because we have 2 methods for setting CA certificates: one in QSslSocket and one in QSslConfiguration. In addition, adapt the auto test which checks whether setting a default QSslConfiguration works: There is no way to set on demand loading through the API, so it should be enabled by default. Task-number: QTBUG-29103 (backport of commit ce35c0db0d9dd849c736eabaeb57d597186aaa13) Change-Id: Idf15c21092c7727e1080b1c261ce055f30dbcf63 Reviewed-by: Richard J. Moore <rich@kde.org>
* SSL docs: Be more explicit about the threats of ignoring SSL errorsPeter Hartmann2013-02-272-5/+14
| | | | | | | | | ... because almost everybody gets it wrong almost every time. (cherry picked from commit eaa18f306341818165c2ee4fc22750da04d5e45e) Change-Id: I3ca1dfe9723d4d29339c2c0a1ebe421f5929c760 Reviewed-by: Richard J. Moore <rich@kde.org>
* BB10 systemProxyForQuery: query system proxy also for non-URL requestsPeter Hartmann2013-02-122-4/+28
| | | | | | | | | | | | | | | ... like e.g. in QAbstractSocket::connectToHost(). We can set the scheme on the query URL based on well-known ports; even if the port is not well-known, we can just query the URL anyhow and let the netstatus API resolve the right proxy for us. In addition, return early for local schemes like "file" and "qrc". Task-number: QTBUG-29425 (cherry picked from commit 28d526db74c50977215133159e565e7c15fd18e3) Change-Id: I40a4865aa7765aad9145e956c0069e78c54670e7 Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* BlackBerry bearer plugin: check whether device is online several timesPeter Hartmann2013-02-031-0/+11
| | | | | | | | | | | | | | | | This is supposed to workaround a race condition in the underlying netstatus API: Sometimes we get an event that the Wifi interface changed, but it is not up, e.g. no gateway (yet). In that case we need to check back (currently: 300 ms) whether the interface has come up or not. This commit can be reverted again once the race condition in the netstatus API has been resolved. Task-number: QTBUG-29421 (cherry picked from commit 3dc47622a469ded1c99397fdedc2053b73d57189) Change-Id: I252c39411340fe3f6af8440a8f21482ca9b6e62d Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* BlackBerry: change SSL root cert folderPeter Hartmann2013-01-141-1/+1
| | | | | | | | | | | Currently /etc/openssl/certs is symlinked to /var/certmgr/web/user_trusted, but this will be changed in the future. /etc/openssl/certs is the folder to be used to read the root certs. (cherry picked from commit 4c8d8a72ec65f409394075ef50401265e495c1dd) Change-Id: I80820374586b5a9038e8b69206b6c9b05f486a07 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-13164-164/+164
| | | | | | Change-Id: I52bf8ef0447b701b4ebf7d7d240013a72adb9425 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* QtNetwork: blacklist two more certificatesMartin Petersson2013-01-051-0/+2
| | | | | | | | | | | | | | | | | The comodogate 72:03:21:05:c5:0c:08:57:3d:8e:a5:30:4e:fe:e8:b0 certificate is a test certificate and the MD5 Collisions was created as a proof of concept deliberately made to be expired at the time of it's creation. Task-number: QTBUG-24654 (cherry picked from commit 4c0df9feb2b44d0c4fcaa5076f00aa08fbc1dda5) Signed-off-by: Peter Hartmann <phartmann@rim.com> Apparently this commit was forgotten to cherry-pick to Qt 4. Change-Id: I86949eaa3c02483b0b66b4a620bfa88aaa9aa99b Reviewed-by: Richard J. Moore <rich@kde.org>
* Centralise handling & ignoring of SIGPIPE in qcore_unix_p.hThiago Macieira2013-01-052-27/+3
| | | | | | | | | | | | We had two instances of this function in the Qt source code, one clearly a copy of the other, so both had the same thread-safety issue. Instead, let's have one copy and have both write_nosignal() and sendto() call them. (cherry-picked from qtbase commit cb7d64170d62c9cda11ced7e5047070af678338b) Change-Id: I0f1354a8e9df8e6b10a02f86a940e3c6d1222087 Reviewed-by: Peter Hartmann <phartmann@rim.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Fix thread-safety of qt_ignore_sigpipeThiago Macieira2013-01-051-1/+5
| | | | | | | | | | | | | | The testAndSet operation would mean another thread could see the value of 1 and proceed to write(2)/sendto(2) before SIGPIPE had been ignored. If the pipe or socket were already closed by then, a SIGPIPE would be delivered to the application with its default action: terminate. (cherry-picked from qtbase commit 3f970c20f9afd5c9a1cc14d7f69882e13f6aaf1b) Change-Id: I62dc8f5fa14c1dd453d13e4053c642bd78fbc468 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Peter Hartmann <phartmann@rim.com>
* SSL certificates: blacklist mis-issued Turktrust certificatesPeter Hartmann2013-01-041-0/+3
| | | | | | | | | | | | Those certificates have erroneously set the CA attribute to true, meaning everybody in possesion of their keys can issue certificates on their own. backport of bf5e7fb2652669599a508e049b46ebd5cd3206e5 from qtbase Task-number: QTBUG-28937 Change-Id: Iee57c6f983fee61c13c3b66ed874300ef8e80c23 Reviewed-by: Richard J. Moore <rich@kde.org>
* Fix binary incompatibility between openssl versionsShane Kearns2012-12-113-1/+13
| | | | | | | | | | | | | | | OpenSSL changed the layout of X509_STORE_CTX between 0.9 and 1.0 So we have to consider this struct as private implementation, and use the access functions instead. This bug would cause certificate verification problems if a different version of openssl is loaded at runtime to the headers Qt was compiled against. Task-number: QTBUG-28343 Change-Id: I47fc24336f7d9c80f08f9c8ba6debc51a5591258 Reviewed-by: Richard J. Moore <rich@kde.org> (cherry picked from commit eb2688c4c4f257d0a4d978ba4bf57d6347b15252)
* Fix compile issue with building with openssl and in a namespaceAndy Shaw2012-11-181-7/+11
| | | | | | | Task-number: QTBUG-25207 Change-Id: I20ab722d3fcb74d90d9010c5c7c303f586e0d7c7 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Adding PAC and exclusion list support to BlackBerry Qt proxy implementation.Andrey Leonov2012-11-062-4/+26
| | | | | | | | | The additional proxy functionality is only available starting BPS API version 3.1.1. (cherry picked from commit 4b71432987ca9ff059d04f0e5f567b8eb09717f9) Change-Id: Ia59adf00a15e7b0a8fc124fcbb598c9c7c331358 Reviewed-by: Peter Hartmann <phartmann@rim.com>
* fix bug in QLocalSocket::waitForReadyRead on WindowsJoerg Bornemann2012-11-051-1/+1
| | | | | | | | | | | | | | | | | | We must not close the socket, if there's still data in the read buffer. Also waitForReadyRead must return true, even if the pipe is broken after we've read data. QLocalSocket::readData will close the socket after the buffer has been drained. This fixes the flakiness of tst_QLocalSocket::threadedConnection. In Qt5 large portions of this code has been rewritten and this fix does not apply. Task-number: QTBUG-27816 Task-number: QTQAINFRA-574 Change-Id: I467340d4dbab11056e6720b145a94a87156cb419 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* QtNetwork: introduce configure switch to use system proxies by defaultPeter Hartmann2012-10-312-0/+7
| | | | | | | | | | | | This option is opt-in (default: no). When configured with "-system-proxies", Qt automatically picks up the system proxies. (backport of commit f7893223e84db86dcdd860c625663d7006fcdad6) Change-Id: I95c3b17abee0691991a60a386052b4c2989f896c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Implementation of the BlackBerry Qt Proxy support.Andrey Leonov2012-10-143-0/+138
| | | | | | | | | An implementation for BlackBerry devices based on the BPS netstatus API. (backport of qtbase/cf66e41728ae70595365833c9ed00d0e2e6c4200) Change-Id: I155f287274c4d92e0546740b8dbe595ea030b505 Reviewed-by: Peter Hartmann <phartmann@rim.com>
* Add Proxy Auto Config support (PAC) on MacDaniel Molkentin2012-10-122-5/+113
| | | | | | | | | | | | | | Adds support for fetching and parsing Proxy Auto Config files if one is specified in the Mac System Preferences Task-Number: QTBUG-2069 Task-Number: QTIFW-28 Reviewed-by: Shane Kearns <shane.kearns@accenture.com> (cherry picked from commit c524bbbb8aa4ba10bac68292a3078534f1b51df5) Change-Id: Iad8fa2a7517f9254e9c9a3c573bec0f7f4df0dfb Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Fix g++/MinGW compiler warnings.Friedemann Kleint2012-09-291-1/+1
| | | | | | | | | | - Assigned/Unused variables. - Unsigned comparison >= 0 is always true. - Constructor initialization order. - Signed/Unsigned comparisons. Change-Id: I1f9edab0506573420ed0bf3055252ba48625c8eb Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-29165-3962/+3962
| | | | | | | | 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>
* HTTP header may be damaged - fix, unit testTomasz Duda2012-09-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | "HTTP/1.1 100 CONTINUE\r\n" If the header from a server is splitted between two packets the first packet contains "HTTP/1.1 100" and the second one contains " CONTINUE\r\n", one space (0x20) is skipped. After processing the line looks in this way "HTTP/1.1 100CONTINUE". QHttpNetworkReplyPrivate::readStatus(QAbstractSocket *socket) is called twice, if a http header is splitted as above. The function always removes whitespace from the beginning of a packet, even if it is the second part of a http header QHttpNetworkReply returns QNetworkReply::RemoteHostClosedError due to damaged http header during processing. Task-number: QTBUG-27161 Backported qtbase/60f4fc8b706db9cbeacd5dc4886a7aa347daafc0 Change-Id: I07ec43641bbb9966285a8a1f57a51fb27d2643d4 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Fix build for platforms that use QPA other than IOSPeter Hartmann2012-09-191-1/+1
| | | | | | | | | | | For instance on Blackberry this would try to include Mac libraries as well. In Qt 5 this is still working. Change-Id: Iae9d3b7e1b988ac8932c58deabfeb249cd2cfc2e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Disable SSL compression by default.Richard Moore2012-09-193-4/+9
| | | | | | | | | | | Disable SSL compression by default since this appears to be the a likely cause of the currently hyped CRIME attack. This is a backport of 5ea896fbc63593f424a7dfbb11387599c0025c74 Change-Id: I6eeefb23c6b140a9633b28ed85879459c474348a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Peter Hartmann <phartmann@rim.com>
* Refactor coreservices -> ios & QT_NO_CORESERVICES -> Q_OS_IOSIan Dean2012-09-183-6/+6
| | | | | | | Similar work was done in Qt5 in Change Id3b02316 Change-Id: I392d2a5bfffb9a335f28d5dbc5ea27b800fc4487 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* QtNetwork: bypass proxy for local connectionsJulien Brianceau2012-09-072-10/+13
| | | | | | | | | | | According to Qt doc, "Network proxy is not used if the address used in connectToHost(), bind() or listen() is equivalent to QHostAddress::LocalHost or QHostAddress::LocalHostIPv6. This is not the case in current implementation. cherry-picked from qt5/qtbase commit 5b1bc864a91c3bdb02e36e7546dadebabb42fdec Change-Id: I20585b4be1149f67f77f02903aac53ee8b140eab Reviewed-by: Richard J. Moore <rich@kde.org>
* Parse yearless date strings on leap years during LIST in QFtpPhilip Van Hoof2012-08-231-2/+35
| | | | | | | | | | Adapted _q_parseUnixDir to handle yearless date strings during a leap year while performing LIST. Task-number: QTBUG-26911 Change-Id: I3193400a274a896530d45de986ec8fa5b159abb4 Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Philip Van Hoof <philip@codeminded.be>
* add configure options for debug/release OpenSSLPeter Kümmel2012-08-151-0/+13
| | | | | | | | | msvc cannot use the same library for debug and release builds if openssl libraries are linked statically into the network library. Backported from 952788d64bc30c7aac5f9572533241ab8f48fb63 Change-Id: I8332b8293a27b6f9bd87ca1e6ebc63327589ab78 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* test: Re-enable tst_Headers test.Sergio Ahumada2012-08-021-0/+6
| | | | | | | | The test had one stable failure which should be fixed by adding missing QT_MODULE and QT_BEGIN_NAMESPACE macros Change-Id: I10801e4c495bee66e1937a57d14019dae8b43a9d Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>