summaryrefslogtreecommitdiffstats
path: root/src/network
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-05-065-123/+224
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/qnx-x86-qcc/qplatformdefs.h src/corelib/global/qglobal.h src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/qgl.cpp src/opengl/qglpixelbuffer.cpp src/opengl/qglshaderprogram.cpp tests/auto/opengl/qglthreads/tst_qglthreads.cpp Change-Id: Iaba137884d3526a139000ca26fee02bb27b5cdb5
| * Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2014-05-011-1/+1
| |\ | | | | | | | | | | | | | | | This merge adds the opengl rename. Change-Id: I84ea0b6abee9780ebb2cf3f64ab9e3fdf2acab3e
| | * QAbstractSocket: enable read notification for unbuffered socketsPeter Hartmann2014-04-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This restores behavior for UDP sockets as it was in 5.2.1. Change 13c246ee119fdb10d91f509b968a221d4fc1d8ba introduced a behavioral change / regression in that respect. Task-number: QTBUG-37489 Change-Id: I8f0b26d763dd66ea6edcc343e91ff5c9c7bdc0f2 Reviewed-by: Richard J. Moore <rich@kde.org>
| * | Add missing QT_NO_NETWORKPROXY guards around HTTP connect statementsAndrew Knight2014-04-291-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Without these, a spew of connection warnings will occur when using HTTP on Qt builds with QT_NO_NETWORKPROXY. Change-Id: I330f6d98d1abdbadc57768dc48b8fab0ee1f6655 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
| * | Merge remote-tracking branch 'origin/release' into stableJani Heikkinen2014-04-232-122/+215
| |\| | | | | | | | | | Change-Id: Id13b4a3803664692f32f9d57549be8a0c4a08567
| | * WinRT: Fix TCP socket readsAndrew Knight2014-04-222-122/+215
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All read calls are now pulled from an intermediate buffer which is populated from the asynchronous callback (this was a TODO previously, and was breaking downloads of large requests). As a side-benefit, the use of only async callbacks ensures fewer first-chance exceptions appear in the debug output. Task-number: QTBUG-30196 Change-Id: I5653742d8d94934a4b4a4227298865d20518bc4c Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
| * | Fix build against older OpenSSL.Sérgio Martins2014-04-141-0/+2
| |/ | | | | | | | | | | | | The declaration of q_SSL_ctrl is ifdefed, so ifdef it's usage too. Change-Id: I99a53af6f4f24ed991d39ab89f18e03b8f38c617 Reviewed-by: Richard J. Moore <rich@kde.org>
* | Provide new API: QSslCertificate::isSelfSigned()Daniel Molkentin2014-04-304-0/+19
| | | | | | | | | | Change-Id: I382a017a0b865b849667301aff8b2f87b676ecc6 Reviewed-by: Richard J. Moore <rich@kde.org>
* | SPDY: use QUrl's logic for determining the correct "Host" headerPeter Hartmann2014-04-291-19/+1
| | | | | | | | | | | | | | | | | | | | | | ... and not duplicate part of the logic in the SPDY code. This code was also existent in QNetworkRequest. The next step will be to actually respect the header if set via QNetworkRequest::setRawHeader(). Change-Id: Ifda2658ea826d039c9dad61ed6fa42aaedaee6b6 Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Marc Mutz2014-04-117-14/+101
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-04-117-14/+101
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/qnx-armv7le-qcc/qplatformdefs.h src/printsupport/kernel/qcups.cpp src/widgets/styles/qstyle.h tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp Change-Id: Ia41e13051169a6d4a8a1267548e7d47b859bb267
| | * Support for DH and ECDH key exchange for QSslSocket serversRichard J. Moore2014-04-093-0/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Despite supporting DH and ECDH key exchange as a client, Qt did not provide any default parameters which prevented them being used as a server. A future change should allow the user to control the parameters used, but these defaults should be okay for most users. [ChangeLog][Important Behavior Changes] Support for DH and ECDH key exchange cipher suites when acting as an SSL server has been made possible. This change means the you can now implement servers that offer forward-secrecy using Qt. Task-number: QTBUG-20666 Change-Id: I469163900e4313da9d2d0c3e1e5e47ef46320b17 Reviewed-by: Daniel Molkentin <daniel@molkentin.de> Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
| | * Ensure we initialize things before checking the openssl version.Richard J. Moore2014-04-081-0/+3
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-37783 Change-Id: Ie276e597062d8bfc74ef57251ed21a94020e030f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
| | * QNetworkReplyHttpImpl: fix misuse of QDateTime::addSecs()David Faure2014-04-081-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QDateTime::addSecs() is a const function and returns a new QDateTime with the given seconds added, thus the current statement had no effect. Found by applying Q_REQUIRED_RESULT in dev branch. Change-Id: Id712334f91e0adb40bafc23470bf46479334c81a Reviewed-by: Richard J. Moore <rich@kde.org>
| | * Fix QNetworkRequest::setRawHeader() for QT_NO_CAST_FROM_BYTEARRAYRichard J. Moore2014-04-081-1/+1
| | | | | | | | | | | | | | | | | | | | | Avoid the implicit conversion in the doc snippet. Change-Id: Iacec6dab371a22c16f537af471f6653d9c5ad43d Reviewed-by: Andy Shaw <andy.shaw@digia.com>
| | * network: finish all pending replies upon errorPeter Hartmann2014-04-071-11/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... and not only one. This was a problem e.g. when there were several requests to the same host and the host was not reachable; only one reply would get an error signal in case we suppressed other errors in "happy eyeballs" host lookup style. Task-number: QTBUG-36890 Change-Id: I1b5757498bd644b0d773cf6c43e4950620949c5c Reviewed-by: Richard J. Moore <rich@kde.org>
* | | QNetworkAccessManager: optimize QNetworkAccessAuthenticationManager allocationMarc Mutz2014-04-111-1/+1
|/ / | | | | | | | | | | | | | | | | Use QSharedPointer<T>::create(), which co-locates the refcount with the payload in a single memory allocation, instead of QSharedPointer<T>(new T), which causes two allocations. Change-Id: I58196b6390dcc9bd52417e279fd9e000ab9ee9cc Reviewed-by: Richard J. Moore <rich@kde.org>
* | QNetworkReplyImpl: optimize QRingBuffer allocationMarc Mutz2014-04-101-2/+2
| | | | | | | | | | | | | | | | | | Use QSharedPointer<T>::create(), which co-locates the refcount with the payload in a single memory allocation, instead of QSharedPointer<T>(new T), which causes two allocations. Change-Id: I84980e98c4fe9773f12533983937eafa0b0ab250 Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
* | Add QNonContiguousByteDeviceFactory::createShared()Marc Mutz2014-04-072-4/+4
| | | | | | | | | | | | | | | | | | | | for more efficient creation of QNonContiguousByteDevices held in shared pointers. Use the new functions in QNetworkAccessBackend::createUploadByteDevice() and QNetworkReplyHttpImplPrivate::createUploadByteDevice(). Change-Id: I8a3c76f7c8d5926850303992c77e9382a39a55e8 Reviewed-by: Richard J. Moore <rich@kde.org>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-03-249-22/+82
|\| | | | | | | | | | | | | Conflicts: src/gui/image/qjpeghandler.cpp Change-Id: I9db3acea7d5c82f5da679c8eaeb29431136665f0
| * network: add support for NTLM Session SecurityPeter Hartmann2014-03-201-2/+9
| | | | | | | | | | | | | | | | | | tested manually with internal proxy. Patch-by: Jonathan Lauvernier <Jonathan.Lauvernier@gmail.com> Change-Id: Ief5b4579b3444ce70eb99637edf771d37d3971fb Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
| * BlackBerry networking: call special select() methodPeter Hartmann2014-03-201-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ... so that the socket notifiers are enabled after selecting and thus emit signals even after selecting (select() is called e.g. by the waitFor* methods). Task-number: QTBUG-36144 Change-Id: I385f288e8c42f92a9c84e53bce843e52f8094ada Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Fanda Vacek <fvacek@blackberry.com> Reviewed-by: Bernd Weimer <bweimer@blackberry.com> Reviewed-by: Richard J. Moore <rich@kde.org>
| * Fix crash if SSL_get0_next_proto_negotiated() cannot be resolved.Friedemann Kleint2014-03-201-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Crash occurs after warnings like: QSslSocket: cannot call unresolved function SSL_get0_next_proto_negotiated Task-number: QTBUG-37515 Task-number: QTBUG-33208 Change-Id: I18b803e4709b9d5f6b33717c2ac43179676351a4 Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
| * HTTP internals: keep consistent state in channel and protocol handlerPeter Hartmann2014-03-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | It could be that the channel has its reply already reset to 0, while the protocol handler thinks the reply is still active, which might lead to weird behavior including hard to reproduce crashes. Task-number: QTBUG-37424 Change-Id: I89b65d34caaa546a343edc2ee205aa76425de88f Reviewed-by: Richard J. Moore <rich@kde.org>
| * Fix compilation with QNATIVESOCKETENGINE_DEBUG enabledFrederik Gladhorn2014-03-141-9/+9
| | | | | | | | | | Change-Id: Ie60b70aaa1fe11de613ba99427be00e307b6769d Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
| * fix namespaced WinRT buildJoerg Bornemann2014-03-141-2/+2
| | | | | | | | | | | | Change-Id: I613a737600f85ef90155e3b8647197b4fd092998 Reviewed-by: Andrew Knight <andrew.knight@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
| * fix warningJoerg Bornemann2014-03-141-2/+0
| | | | | | | | | | | | Change-Id: I7afedbf679ae1c8467eea749e79eb10f2516d039 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Andrew Knight <andrew.knight@digia.com>
| * correct send vs sent grammarDavid Fries2014-03-142-3/+3
| | | | | | | | | | | | | | | | Correct the tense of send vs sent in comments and documentation. Change-Id: I1c5ce9a7b1e49b8b0e8dcfde7d732e4c69acf73a Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * Cancel NSURLConnections before releasing them.Morten Johan Sørvig2014-03-141-0/+1
| | | | | | | | | | | | | | | | Task-number: QTBUG-37042 Change-Id: I7ddcbc315b4b720e7da7880fc00731c28beb4bb2 Reviewed-by: Peter Hartmann <phartmann@blackberry.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* | QNativeSocketEngine(UNIX): Report the native socket error, not the ↵Robin Burchell2014-03-211-3/+12
| | | | | | | | | | | | | | | | | | | | Qt-derived error This prevents error reporting from being useless in case an errno value isn't one we anticipate. Change-Id: I65f8c2570d07971a06ba3687d75e9df91a0e7611 Reviewed-by: Richard J. Moore <rich@kde.org>
* | QNetworkReplyHttpImpl: optimize QAtomicInt allocationMarc Mutz2014-03-141-2/+2
| | | | | | | | | | | | | | | | | | Use QSharedPointer<T>::create(), which co-locates the refcount with the payload in a single memory allocation, instead of QSharedPointer<T>(new T), which causes two allocations. Change-Id: I3f70d15a6d1bfaaa8b48a36ed3c877e817a5b701 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QNetworkReplyHttpImpl: optimize QRingBuffer allocationMarc Mutz2014-03-141-2/+2
| | | | | | | | | | | | | | | | | | Use QSharedPointer<T>::create(), which co-locates the refcount with the payload in a single memory allocation, instead of QSharedPointer<T>(new T), which causes two allocations. Change-Id: I280caf861b894f87996a9d3ae783943f55d54ff3 Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
* | Merge remote-tracking branch 'origin/stable' into devSergio Ahumada2014-03-1317-53/+111
|\| | | | | | | Change-Id: Idec54e19963e8d88c711cb179cffc81596323899
| * Replace Note: with \note in documentationKurt Pattyn2014-03-1313-19/+18
| | | | | | | | | | | | Change-Id: I213ac1fb2733e675f3641441fe6c621bab06c1f0 Reviewed-by: Peter Hartmann <phartmann@blackberry.com> Reviewed-by: Richard J. Moore <rich@kde.org>
| * Cleanup SPDY stream closingAllan Sandfeld Jensen2014-03-061-33/+16
| | | | | | | | | | | | | | | | | | | | | | | | We should not accept or process messages on closed streams, and unless we are in a half-closed state (having initiated close ourselves), we should respond to FIN with a FIN of our own. This patch means we no longer trigger all the corner case teardown on common sites that were fixed in earlier patches. Change-Id: I0d2bab62700a0022a959e66c7053afbad07a9f7e Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
| * SPDY must handle destoyed QNetworkReplyAllan Sandfeld Jensen2014-03-042-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | A QNetworkReply may be deleted before it is closed by the protocol. Since QSpdyProtocolHandler tracks pointers to QNetworkReplies it must keep track of their destruction as well to avoid links to deleted objects. This fixes the last issue with SPDY access of Google Mail in QtWebKit. Change-Id: I2c56dc080fdcb249b6ed9189fef84cbbc1220cbd Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
| * Remove deleted QNetworkReplies from SPDY queuesAllan Sandfeld Jensen2014-03-041-0/+13
| | | | | | | | | | | | | | | | | | We already remove QNetworkReply from most queues, but we also need to remove it from the SPDY queue. Otherwise we might end up trying to send an already deleted message. Change-Id: Ib39bf8f26315b66179755a6f66dbd657576cbbe3 Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
| * Fix some typosSergio Ahumada2014-03-031-1/+1
| | | | | | | | | | | | Change-Id: I7dbe938bff5ac3ab50a0197f94bdb2f6c22fbd16 Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
| * Do not upload on closed SPDY streamsAllan Sandfeld Jensen2014-02-281-0/+17
| | | | | | | | | | | | | | | | | | | | | | We should never upload on a SPDY stream in a closed or half-closed state. To avoid it we need to stop listening for readyRead on the upload device, and ignore WINDOW_UPDATE on completed streams. This fixes SPDY access of facebook.com. Change-Id: Icad45ffc109b2c14b921f1571e114b70a30f40a9 Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
| * SPDY: Fix compiler warning about unused variableSergio Ahumada2014-02-281-0/+2
| | | | | | | | | | Change-Id: Ib3dcd8616ab8167de31a01b3e6f0188d384ff244 Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
| * Protect against malicious SPDY messagesAllan Sandfeld Jensen2014-02-281-0/+34
| | | | | | | | | | | | | | | | Add handling of invalid stream-ids and buffer overflow in header parsing. Change-Id: I712af189d72612639d25890a8861a8f4fe084ce3 Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
* | Add accessors for the build-time version of openssl.Richard J. Moore2014-03-104-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | Many bugs originate due to mismatches between the build-time and run-time versions of openssl but they're hard to debug as we don't provide access to the build-time info. This addresses that weakness. [ChangeLog][QtNetwork][QSslSocket] Added accessors for the version of openssl used at build-time. This will help when debugging problems caused by a mismatch with the run-time version. Change-Id: I6a4c21c8f16ab4c90cdf166f38c62fe37bf1f165 Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
* | Add support for finding the version of SSL/TLS in use.Richard J. Moore2014-03-1010-1/+61
| | | | | | | | | | | | | | | | | | | | | | | | Previously we allowed you to specify which version(s) you wanted to use, but did not provide access to the version that was actually negotiated. [ChangeLog][QtNetwork][QSslSocket] Add support for finding the version of SSL/TLS in use by a connection. Task-number: QTBUG-28471 Change-Id: I6d50d2bc9f1ce7f98192e67992178fe7e41c0575 Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
* | Merge remote-tracking branch 'origin/stable' into devSimon Hausmann2014-02-2821-90/+1953
|\| | | | | | | | | | | | | Conflicts: src/network/access/qhttpthreaddelegate.cpp Change-Id: Ia15372687c93cd585967b006c0baaac3a5f29e91
| * Do not assume nice behavior in error handlingAllan Sandfeld Jensen2014-02-281-2/+3
| | | | | | | | | | | | | | | | | | SPDY is currently assuming it will only receive RST_STREAM messages on active steams. This is however not always a safe assumption. Task-number: QTBUG-37100 Change-Id: Ied89a68a209891992ad72daa513066efc1d7c421 Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
| * Handle multiple header values in SPDYAllan Sandfeld Jensen2014-02-261-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | SPDY sends multiple header values for the same header key by null-byte separating them. This patch maps the multiple values the same way qnetworkreplyhttpimpl.cpp does. With this patch applied we can now log on to GMail using SPDY. Change-Id: I03656ad1695d13b5c3ed252794dc6c89c67c7b97 Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
| * Fix compile error when enabling the QHOSTINFO_DEBUG defineAndy Shaw2014-02-261-6/+6
| | | | | | | | | | Change-Id: Id82b3aad3b2951e6d0dee57ac993535930db31fc Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
| * network: fix doc typo in QNetworkConfigurationManagerPeter Hartmann2014-02-251-1/+1
| | | | | | | | | | Change-Id: I6d3e7e4fb62dfc13f3cc156138604cabea119b75 Reviewed-by: Richard J. Moore <rich@kde.org>
| * QSslCipher: make QString constructor explicitMarc Mutz2014-02-211-1/+1
| | | | | | | | | | | | | | | | A QSslCipher is not an equivalent representation of a QString, so the constructor that takes a QString should be explicit. Change-Id: I4c1329d1eebf91b212616eb5200450c0861d900f Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * network: add support for the SPDY protocolPeter Hartmann2014-02-1918-82/+1931
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the only supported SPDY version is 3.0. The feature needs to be enabled explicitly via QNetworkRequest::SpdyAllowedAttribute. Whether SPDY actually was used can be determined via QNetworkRequest::SpdyWasUsedAttribute from a QNetworkReply once it has been started (i.e. after the encrypted() signal has been received). Whether SPDY can be used will be determined during the SSL handshake through the TLS NPN extension (see separate commit). The following things from SPDY have not been enabled currently: * server push is not implemented, it has never been seen in the wild; in that case we just reject a stream pushed by the server, which is legit. * settings are not persisted across SPDY sessions. In practice this means that the server sends a small message upon session start telling us e.g. the number of concurrent connections. * SSL client certificates are not supported. Task-number: QTBUG-18714 [ChangeLog][QtNetwork] Added support for the SPDY protocol (version 3.0). Change-Id: I81bbe0495c24ed84e9cf8af3a9dbd63ca1e93d0d Reviewed-by: Richard J. Moore <rich@kde.org>