summaryrefslogtreecommitdiffstats
path: root/src/network
Commit message (Collapse)AuthorAgeFilesLines
* Update contact information in license headers.Jason McDonald2012-01-23160-160/+160
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove the useless connManager() function.Xizhi Zhu2012-01-191-13/+8
| | | | | | Change-Id: Ifac0796ec22d0656ccfcf31b8d45b2342c2ee646 Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: hjk <qthjk@ovi.com>
* Removing QHttpHeader and QHttpResponseHeader.Jonas M. Gastal2012-01-198-965/+31
| | | | | | | | | QAuthenticator used it for the convinience of QHttpSocketEngine only. QHttpSocketEngine has now been ported to use QHttpNetworkReply to parse HTTP responses. Change-Id: Idf6e70aa76613aad6e3d789d81ca1b4fd73575c2 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* Rename all our interfaces from com.trolltech to org.qt-projectLars Knoll2012-01-191-1/+1
| | | | | | Change-Id: I6db7211fcf6b24bd75e360645bbb2fdf1ef8a8bc Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Fix compiler warnings in Qt Network.Friedemann Kleint2012-01-192-3/+4
| | | | | | | | - Missing return value - Wrong format for qint64 Change-Id: Id0de58c85b7c8ed2a62f7237fd23e6c5a5ac92ec Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* Remove QNetworkConfigurationPrivate::bearerTypeName().Xizhi Zhu2012-01-192-16/+9
| | | | | | | | | Also, use QStringLiteral instead of QLatin1String. Change-Id: I232fc02a56261929864c2ea66993ef1c74bc1237 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
* Remove the useless undef for "interface".Xizhi Zhu2012-01-191-4/+0
| | | | | | | | "interface" is not used by QNetworkConfiguration. Change-Id: I742fe179d415ab1424bfddb1f6c034fc98c55e61 Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* Add the missing Q_DISABLE_COPY for public bearer classes.Xizhi Zhu2012-01-192-0/+4
| | | | | | | | | | | QNetworkConfigurationManager and QNetworkSession are QObject, which should not be thought of as values that can be copied or assigned, but as unique identities. Change-Id: I6ff0124a613862c2b411da2df31f03d5033315a9 Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* Remove QNetworkConfiguration::bearerName().Xizhi Zhu2012-01-182-12/+0
| | | | | | | | | It was added only to maintain source compatibility with Qt Mobility. Change-Id: Iea8d40e401bd1f8d5115268e09b256eacca69ea0 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* Fixed build break when bearer is disabled.Xizhi Zhu2012-01-163-0/+8
| | | | | Change-Id: I29e88b046f6502c84acc9c6f566ecc328cf24e38 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* Cleaning up header includes.Jonas M. Gastal2012-01-135-6/+5
| | | | | | | | | | QNetworkCookie doesn't need to know about QNetworkCookieJar and for QNetworkCookieJar header a forward declared QNetworkCookie is enough. Change-Id: I21145ce0f67a0a6bd68a46a5e757f82105cdf520 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* qdoc3: Don't put a \table in a \valueMartin Smith2012-01-131-10/+19
| | | | | | | | | | | | | | | | | | | | In qdoc, the \value command is meant to document a single value of an enum. e.g. \value TypeOfService Text describing the type of service. It runs until the next \value or a blank line. Although it doesn't say you can't build a \table in the \value text, it doesn't work. For now, the fix is to remove the \table from the \value text and make the table separate from the enum \value list and let the description of the \table refer to the value that it belongs to. Task-number: QTBUG-23599 Change-Id: I88b456dca419a565eece30ba20fe09c0bcd4d98d Reviewed-by: Martin Smith <martin.smith@nokia.com> Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Remove shadowing members in QNetworkReplyHttpImplPrivateAlexander Færøy2012-01-121-2/+0
| | | | | | | Task-number: QTBUG-23512 Change-Id: I072dfde1741a1d32a6125f63e52cc22bc499987f Reviewed-by: Zeno Albisser <zeno.albisser@nokia.com>
* Fix compilation of Qt itself with QT_NO_DEBUG_STREAMDavid Faure2012-01-123-5/+5
| | | | | | | Change-Id: I07087dff0f109347ea80434f17eeb7cc1c13114c Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Make QFtp private.Jonas M. Gastal2012-01-127-11/+70
| | | | | | | | | All references to QFtp in documentation have been removed, QFtp's documentaiton was marked internal. The QFtp example was removed. Task-number: QTBUG-23199 Change-Id: Ifff83cac069fb350e8ebeae63e605850e65c0c30 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Remove unused QT_NO_TEXTSTREAM.David Faure2012-01-111-1/+1
| | | | | | | | It was checked in a few places, but it didn't actually remove QTextStream, so it was pretty useless. Change-Id: I8eaf28893cd6c7acbe1c0b69d58de90742aee755 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* qlocalsocket_win.cpp: Fix compiler warning.Friedemann Kleint2012-01-111-1/+1
| | | | | | | Change-Id: Ibdb57f99b98b0c603be3c9be043737687034a958 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Update year in Nokia copyright headers.Jason McDonald2012-01-102-2/+2
| | | | | | | | The previous change missed some headers from years prior to 2011, and a few new files were merged after the previous change. Change-Id: Ib7d1a2b7062228c2a5373da64242b2ee1f0981e1 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* QLocalSocket: make socket descriptor qintptrJoerg Bornemann2012-01-105-12/+12
| | | | | | | | | | | This is consistent with the other socket classes. Also see commit bf7f17060773803f332e8c729a70f47b94243890. Change-Id: Ic4bf01bd4abf778e21fe575c5304f86c9bee82fc Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* SSL - dump failed certificate chains when debug logging is enabledShane Kearns2012-01-091-0/+21
| | | | | | | | | | This is to help us debug problems with CA certificates. Code is not compiled by default, only when QtNetwork is built with QSSLSOCKET_DEBUG defined Change-Id: I404c36bf4c6bf1190f480196038197be30b4b5f9 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* Using proper virtual functions instead of Q_INVOKABLE tricks.Jonas M. Gastal2012-01-096-47/+68
| | | | | | | | | This mantains BC between version compiled with and without OPENSSL, which was the reason for the use of "runtime virtuals". Using proper virtuals should make code clearer. Change-Id: I24f141ebaab68c000c2d602b54addbae1679a424 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make (dis)connectTo(From)Host virtual in QAbstractSocket.Jonas M. Gastal2012-01-094-50/+12
| | | | | Change-Id: Ib1dfae4031f00fb331108152a259f6a2756381c9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Removing QHttp class, its tests and its usage in examples.Jonas M. Gastal2012-01-068-3466/+921
| | | | | | Task-number: QTBUG-22750 Change-Id: I161fad772bfb26797e6ee9d69da925b6747c371f Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix renewed SSL certificates being incorrectly reported as expiredShane Kearns2012-01-061-2/+2
| | | | | | | | | | | | | | | | OpenSSL tries certificates in the order they are added to the store. There was logic to add the expired certificates after the valid ones to ensure the valid certificate is checked first if the OS cert store contains both the expired and renewed version of the same cert (e.g. the verisign class 3 cert on windows) However due to a coding error, the ordering was reversed, ensuring the problem is always encountered instead of always avoided. Task-number: QTBUG-20012 Change-Id: I7c8dba8a09842540a22b44d33c7dcb22bbbc6a58 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* Remove all non-inline of qMalloc/qFree/qRealloc.Robin Burchell2012-01-062-14/+14
| | | | | | | | | | | | We're trying to deprecate these, so don't use them anymore. The inline uses of these have been left intact, for the moment. Inline code will need to create their own non-inline allocation methods (for future-proofing to allow alterations in how e.g. individual containers allocate) Change-Id: I1071a487c25e95b7bb81a3327b20c5481fb5ed22 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Fix crashing data urlsSimon Hausmann2012-01-061-1/+1
| | | | | | | | | | | | | | | | Commit 231369eb043e9c5221da1a4f2a724643a3f380f3 introduced the use of QBuffer::setBuffer with a QByteArray that is allocated on the stack, causing plenty of memory corruption. This patch replaces the use of setBuffer with setData, which correctly assigns the QBuffer's buffer instead of just relying on the pointer passed to setBuffer. Spotted by Rohan in http://codereview.qt-project.org/#change,11859 Change-Id: I7cdf43d438a2a7864de7c35841b42421c1c60e68 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* QNetworkAccessManager: check if networksession is setMartin Petersson2012-01-061-8/+10
| | | | | | | | | | Need to check that the networkSession has been set so we don't crash when bearermanagement is enabled. Task-number: QTBUG-23484 Change-Id: Ifdb71350ba5b4ddbdbd17a8d87189c78c524783e Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com> Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* Add a new QT_NO_SSL feature macro.Richard Moore2012-01-067-15/+15
| | | | | | | | | | | | | | | | | At the moment users of Qt must detect if it was compiled with SSL support by testing for QT_NO_OPENSSL. This means that any code that is conditionally compiled this way is tied to the presence of the openssl backend. This commit makes it possible to implement new SSL backends during the Qt5 lifetime without breaking this code. People can still test for QT_NO_OPENSSL if they really need openssl, but if they simply want to know if there's SSL support at all they should use this define instead. In addition, this commit changes the public API headers to use the new define. Change-Id: Ib57a71aa65836ac9351f120a487bfeb8009d9515 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* Make socket descriptors qintptr.Jonas M. Gastal2012-01-0516-46/+46
| | | | | | | | | | Windows x64 uses 64 bits integer for sockets, to ensure compatibility we should use ptr sized integers for our socket descriptors. Task-number: QTBUG-19004 Change-Id: I4b56023874a4f1bad107c66c054fecfedde33d88 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-05158-158/+158
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix compiler warnings in QtNetwork.Friedemann Kleint2012-01-052-3/+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>
* Emit error if trying to connect while socket is connected or connecting.Jonas M. Gastal2012-01-047-4/+25
| | | | | | | | | This applies to both local and abstract sockets. Task-number: QTBUG-22450 Change-Id: I5c58d68da95ffb6bcde5be510853359b288e5984 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* Always load the openssl configuration.Richard Moore2012-01-031-4/+0
| | | | | | | | | | | | This change makes Qt load the default openssl config always, not just when compiled with OPENSSL_LOAD_CONF. This means that facilities like openssl engines (and their configuration) are usable. An alternative would be to call OPENSSL_config(NULL) ourselves, but that's exactly what the OPENSSL_add_all_algorithms_conf does for us. Task-number: QTBUG-16018 Change-Id: I4cda701f82627e0541b6225009f4e1249aec9d47 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make qDecodeDataUrl return bool.Jonas M. Gastal2011-12-292-10/+6
| | | | | Change-Id: I23b9fed39af7bea6c171b35e10bd72c424bd903e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Clarifying the flow of signals on QNetworkAccessManager.Jonas M. Gastal2011-12-282-1/+10
| | | | | | | Task-number: QTBUG-22858 Change-Id: I07eaecebf17e73f9c3148465d8970ca7672a900c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QLocalSocket shouldn't emit disconnected if it isn't connected yet.Jonas M. Gastal2011-12-271-1/+1
| | | | | | Task-number: QTBUG-22082 Change-Id: I2e1dae133f50a232d4be3ff63cafaf1b417b286c Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* Fix http authentication to a different realm on the same serverShane Kearns2011-12-221-4/+2
| | | | | | | | | | This is a regression caused by the NTLMv2 authentication patch. I have manually tested NTLMv2 authentication against MS IIS and reverting these two lines does not break it. Task-number: QT-5209 Change-Id: I64159cbe468e1a7f834f8726fd0c9d4ab4c54b38 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* Fix race in http connection channelShane Kearns2011-12-222-1/+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-228-13/+52
| | | | | | | | | | 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>
* Handle plain socket write errors in SSLShane Kearns2011-12-221-2/+9
| | | | | | | | | | | | | | When an ssl socket is closed during connecting, and it is using a proxy then it is possible for the plain socket to be in pending close state when transmit() is called. As errors were not handled, this caused the socket (and https request) to "hang". It now propagates the error from plain socket. Change-Id: I6fb86815a2a63e197cea582f4b153e487543477c Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com> Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix for assertion failureShane Kearns2011-12-222-1/+6
| | | | | Change-Id: I97b9ecc37e938a3050793fc746288243a1cb40b7 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* Fix faulty logic in http connection pipeliningShane Kearns2011-12-221-2/+6
| | | | | | | | | The code which prevents pipelining of requests when authentication is in use had || where && should have been used. Also check for blank user with a password. Change-Id: Ic278cedd370c9d81377f49a0af43aef415cb49ad Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* QNetworkAccessManager: fixed foreach copy of host addressMartin Petersson2011-12-222-2/+2
| | | | | Change-Id: I50cb113fb3c803fc5b13c74b3f7ad1fc4283065b Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* Add ToS option to sockets.Jonas M. Gastal2011-12-225-2/+43
| | | | | | | | | | | | | | Creates a new SocketOption called called TypeOfServiceOption that can be used with the existing setSocketOption method to set the ToS byte in a socket socket. This is done only for unix systems because windows doesn't support directly setting the ToS/DSCP byte: http://support.microsoft.com/kb/248611 http://blogs.msdn.com/b/wndp/archive/2006/07/05/657196.aspx Change-Id: Idf9da2dd8307ac7057982fbfdf9e4e9ebe366780 Task-number: QTBUG-6221 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* SSL: fix build with -openssl-linked for OpenSSL 0.9.8*Peter Hartmann2011-12-223-12/+0
| | | | | | | | | | | | | | | OpenSSL's SSL_ctrl() always took a "void *" argument as 4th parameter, since at least version 0.9.7. I have no idea why we had "const void *" in there. Reviewed-by: Richard J. Moore <rich@kde.org> Task-number: QTBUG-23132 (cherry picked from commit 4db91cbd6147e40f543342f22c05b7baddc52e5a) Change-Id: Ie570e1cc59b72f13d3e6f3ed6fc1892444a63743 Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
* QNetworkAccessManager: delay IPv4 or IPv6 based on getaddrinfo orderMartin Petersson2011-12-223-18/+35
| | | | | | | | | | | | 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>
* extract QWindowsPipeReader from qlocalsocket_win.cppJoerg Bornemann2011-12-163-227/+36
| | | | | | | | The code for reading named pipes can now be used in other places as well. Change-Id: Id734617a3927e369491a6c5daf965169ceb01f74 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* QNetworkAccessManager: delay IPv4 connection with Happy EyeballsMartin Petersson2011-12-163-1/+31
| | | | | | | | | 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>
* QLocalSocket/Win: eliminate checkReadyRead()Joerg Bornemann2011-12-151-18/+5
| | | | | Change-Id: I459c0ba42d3e5b0da57884f5cdfc6f44a11600f7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>