summaryrefslogtreecommitdiffstats
path: root/src/network
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'stable' into devSergio Ahumada2013-09-213-5/+5
|\ | | | | | | Change-Id: I37d85631ab1165ab91457d8880c4da907a9df73b
| * OAuth over XMLHttpRequest failsAllan Sandfeld Jensen2013-09-191-1/+1
| | | | | | | | | | | | | | | | We currently always generate our own Authorization header, which overrides any Authorization headers set the by user application. Change-Id: I3b11c8dd0bc708e795ff697262a383ce28cae2f3 Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
| * HTTP authentication fails if QUrl contains password with %Allan Sandfeld Jensen2013-09-172-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Default for QUrl::password() and QUrl::userName() is in Qt 5.1 QUrl::PrettyDecoded which means the return value may contain percent-encodings. For authentication we need the real decoded result, and should instead use QUrl::FullyDecoded. Note this bug has already been fixed indirectly in Qt 5.2 since the default for the two methods was changed to QUrl::FullyDecoded. Change-Id: Ia0f38c073cb001e37ad8b3eda40b3db756bec3dc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Resolve error caused by server-initiated TLS renegotiationScott Deboy2013-09-171-5/+16
| | | | | | | | | | | | | | | | | | | | Updating the SSL_write code to correctly handle SSL_ERROR_WANT_WRITE and SSL_ERROR_WANT_READ, which are not actual errors. Change-Id: Icd7369b438ef402bf438c3fcc64514a1f9f45452 Reviewed-by: Peter Hartmann <phartmann@blackberry.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* | Android: Fix unused variable/argument warningsEskil Abrahamsen Blomfeldt2013-09-091-0/+3
| | | | | | | | | | | | | | There were a bunch of these in Android specific code. Change-Id: Icf6cda40302171810c1b559f9d442fba6444a3a5 Reviewed-by: BogDan Vatra <bogdan@kde.org>
* | Fix unsigned/signed comparison warning in qnativesocketengine_unixEskil Abrahamsen Blomfeldt2013-09-091-1/+1
| | | | | | | | | | | | | | | | This triggered when building on Android. Make sure we cast the sizeof() to the same type as the variable we compare to. Change-Id: I65d4fe7edc2a39f1a4b68e78f4c19bff6e4aa0f8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix compilation on BlackBerry PlaybookRafael Roquetto2013-09-031-0/+7
| | | | | | | | | | | | | | | | | | Implement pps_decoder_is_integer() function, which is not present on Playbook by default. Change-Id: Iff0974f3f178bf9c39aa05b4e1be87b2b7a9344e Reviewed-by: Peter Hartmann <phartmann@blackberry.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Sergio Ahumada2013-09-021-29/+29
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-271-29/+29
| |\| | | | | | | | | | | | | | | | | | | Conflicts: examples/widgets/doc/src/addressbook-fr.qdoc Change-Id: Id1196e8e0c6445f1616c3f29234c974d809f8e48
| | * Update Linux interface getting to make fewer syscallsThiago Macieira2013-08-241-29/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Each time we call if_nametoindex, if_indextoname or somesuch, the libc needs to open a socket, make an ioctl, and close the socket. Since we've got most of the information we need anyway in the data from getifaddrs(3), let's just use it Change-Id: I572c212a27c4b9ffe57980b36f75bb04e6d5cf29 Reviewed-by: Jonas Gastal <gastal@intel.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* | | Remove workarounds to old GCC bugs we had encountered on IRIXThiago Macieira2013-08-311-8/+0
|/ / | | | | | | | | | | | | | | | | | | | | | | | | The check is bogus anyway. It was bogus when it was added. The bug is not because of "GCC on IRIX", it's simply a GCC bug and was probably tied to some GCC versions. It should have been reported and followed up. I don't even remember what GCC versions we had on the IRIX machines (plastkrakk, I can't remember the other two machine names). But I could bet they were GCC 3.4 or 4.0. Change-Id: I84ce4e1ad68bb0520b63c210f841e0c604dbd03a Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* | HTTP socket engine: support newer HTTP proxiesPeter Hartmann2013-08-222-37/+60
| | | | | | | | | | | | | | | | | | | | After sending authentication, we need to revert all states to be able to read the HTTP header again. Before, we would not try to read an HTTP header after sending authentication. Change-Id: Id4b95eda9881a37bcfbae0570756bb3e4918a568 Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Shane Kearns <shane.kearns.qt@gmail.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-211-0/+4
|\| | | | | | | | | | | | | | | | | Conflicts: qmake/doc/src/qmake-manual.qdoc src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/src.pro Change-Id: I0a560826c420e46988da3776bd8f9160c365459a
| * Add documentation about reconnect attempts.Jonas Gastal2013-08-171-0/+4
| | | | | | | | | | | | Task-number: QTBUG-18082 Change-Id: I3cf667bcd9929d1fc3e8d3c5f9d4e612dddd181e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-147-41/+236
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/macx-xcode/Info.plist.app mkspecs/macx-xcode/Info.plist.lib qmake/doc/qmake.qdocconf src/corelib/global/qglobal.h tests/auto/other/exceptionsafety/exceptionsafety.pro tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp Change-Id: I3c769a4a82dc2e99a12c69123fbf17613fd2ac2a
| * Merge branch 'release' into stableSergio Ahumada2013-08-091-1/+2
| |\ | | | | | | | | | Change-Id: I5e94c4f01564df633c9925561ebb0b553bd31a2e
| | * Android: Get SSL root certificates from TrustManagerPaul Olav Tvete2013-08-074-29/+220
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Android, when not using Ministro, we cannot read certificates from the file system, so we have to get them through Java APIs instead. Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> (cherry picked from commit 591584d9a940d374e20a62573d71054e0081c6ac) Task-Number: QTBUG-32508 Change-Id: Ia157e28bc3b2c141e3444d628e7a7c59eca39db0 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
| | * QHttpMultiPart: fix data corruption in readData methodPeter Hartmann2013-07-291-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>
| * | Avoid one extra if_indextoname per address in QNetworkInterfaceThiago Macieira2013-08-061-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given an IPv6 address associated with a network interface, there's a fairly high chance (of 100%) that any scope ID found is that of the interface. Change-Id: Id7315473f39b68ee4c169207168dc2e60fd7d570 Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Peter Hartmann <phartmann@blackberry.com> Reviewed-by: Jonas Gastal <gastal@intel.com>
| * | Remove unused socket from QNetworkInterface Unix codeThiago Macieira2013-08-061-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This must be a relic from old code, before I split out the code that uses getifaddrs from the code that doesn't. Change-Id: Ia1265da6921c7c7a3dc97315d98fed50b3d2fe1c Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Peter Hartmann <phartmann@blackberry.com> Reviewed-by: Jonas Gastal <gastal@intel.com>
| * | Android: Get SSL root certificates from TrustManagerPaul Olav Tvete2013-07-294-29/+220
| | | | | | | | | | | | | | | | | | | | | | | | On Android, when not using Ministro, we cannot read certificates from the file system, so we have to get them through Java APIs instead. Change-Id: I415329fcb45836735c1112dbe832214b3c73dc9a Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
| * | Merge remote-tracking branch 'origin/release' into stableSergio Ahumada2013-07-261-0/+3
| |\| | | | | | | | | | Change-Id: Ic5a232260a6c8ee71f9ff91e820f54c36ab6b15a
| | * HTTP internals: do not access reply that was deleted alreadyPeter Hartmann2013-07-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | ... rather than crashing. Task-number: QTBUG-32404 Change-Id: Ia2f938394fb451459564ef5966419f952b3e2d0e Reviewed-by: Richard J. Moore <rich@kde.org>
| * | QNX: hardcode on-demand SSL root cert loadingPeter Hartmann2013-07-261-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 Change-Id: Ia9df60aba9d1bd70868b7004b847867a2128f600 Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* | OSX: Make QSslSocket compile on 10.9Liang Qi2013-08-062-15/+15
| | | | | | | | | | | | | | | | | | | | CSSM_DATA_PTR was deprecated in 10.7. Replace SecCertificateGetData with SecCertificateCopyData. Task-number: QTBUG-32715 Change-Id: I762687370689b5b5c032567240667631b1ffde98 Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* | Doc: Setting module pages' \qtvariable.Jerome Pasion2013-08-021-0/+1
| | | | | | | | | | | | | | | | | | Argument to \qtvariable is the QT variable needed for linking to the module. Task-number: QTBUG-32172 Change-Id: I181c0cfaf9529f3aea741cdaee0f20d6cd0e2d2f Reviewed-by: Martin Smith <martin.smith@digia.com>
* | QNX: adapt SSL lib file name lookup heuristicsPeter Hartmann2013-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Change-Id: I25869538bbfa3c2848541415e8361e0bd7a8fd50 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-07-235-39/+42
|\| | | | | | | | | | | | | Conflicts: tests/auto/dbus/qdbusabstractinterface/tst_qdbusabstractinterface.cpp Change-Id: I18a9d83fc14f4a9afdb1e40523ec51e3fa1d7754
| * Ignore or suppress warning and debug messages in tst_QLocalSocketThiago Macieira2013-07-203-3/+5
| | | | | | | | | | | | | | | | | | | | | | The one in tst_QLocalSocket::writeToClientAndDisconnect just needed proper ordering: that's what waitForDisconnect is for. At the same time, we need to make sure we get the same message from all three implementations of QLocalSocket::waitForDisconnect (and without the useless space at the end). Change-Id: I21364263cf908df022df814a6a39fcb5783e84e6 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
| * Fix incomplete override of QIODevice::open in QProcess and QLocalSocketThiago Macieira2013-07-204-33/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rule for a new override is that it must still work if the old implementation is called. The catch is that any class that derives from QProcess and isn't recompiled will still have QIODevice::open in its virtual table. That is equivalent to overriding open() and calling QIODevice::open() (like the tests). In Qt 5.0, QProcess::start() called QIODevice::open directly, not the virtual open(), so there's no expectation that a user-overridden open() be called. With that in mind, simply fix QProcess::start to not call the virtual open at all. Similarly with QLocalSocket, the calls to open were always non-virtual. Task-number: QTBUG-32284 Change-Id: I88925f0ba08bc23c849658b54582744997e69a4c Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
| * Fix compilation of run-time-resolved SSL on AndroidEskil Abrahamsen Blomfeldt2013-07-191-3/+3
| | | | | | | | | | | | | | | | | | | | We need the same code for both the no-sdk and the sdk case for the OpenSSL code, since this is not covered by a system library, but by an external dependency in both cases. Task-number: QTBUG-32130 Change-Id: I976835556fcb0e6c32cfb3da4dd585e45490061b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Make QIPAddress::parseIp6 return the first bad characterThiago Macieira2013-07-201-1/+1
| | | | | | | | | | | | | | In case of undetermined error, returns end. Change-Id: Ic5d16bab5fc56ad24f19da25f73f9b844ce11d3f Reviewed-by: David Faure (KDE) <faure@kde.org>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-07-151-1/+2
|\| | | | | | | Change-Id: I0218a1f08b89f2d56757ab35eec06799d2a1492f
| * Correct algorithm for digest auth when using the CONNECT verbBradley Buda2013-07-121-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. Change-Id: Ia97ce5967bfb57b28db7614347ffdcaa56e4da0c Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
* | Merge branch 'stable' into devSergio Ahumada2013-07-112-1/+21
|\| | | | | | | | | | | | | | | | | | | Conflicts: qmake/generators/mac/pbuilder_pbx.cpp src/corelib/json/qjsonwriter.cpp src/corelib/kernel/qeventdispatcher_blackberry.cpp src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm Change-Id: I24df576c4cbd18fa51b03122f71e32bb83b9028f
| * Add reconnect attempts in more cases in QHNCC.Azat Khuzhin2013-07-101-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | Attempts on: - QAbstractSocket::ProxyConnectionTimeoutError - QAbstractSocket::ProxyConnectionClosedError (closed unexpectedly) Change-Id: I8e85288d724cb2f485f9e61d853dfaac5540032a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Markus Goetz <markus@woboq.com> Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
| * Remove default argument from declarations of qHash as friendGiuseppe D'Angelo2013-07-021-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's illegal in C++11: §8.3.6.4 [dcl.fct.default] "If a friend declaration specifies a default argument expression, that declaration shall be a definition and shall be the only declaration of the function or function template in the translation unit." Clang is starting to enforce this, thus it's making qtbase not compiling. Task-number: QTBUG-32100 Change-Id: Ifd9d4f62354d7cf4ccf275f36aab64e05c59efff Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | QNetworkConfiguration: add public member bearerTypeFamily()Peter Hartmann2013-06-282-3/+72
| | | | | | | | | | | | | | | | | | | | | | ... to let the user know whether he is on e.g. Wifi, 2G, 3G or 4G. In most cases, this is what the user wants to know anyhow, while e.g. BearerEVDO or BearerCDMA2000 go into too much detail. Task-number: QTBUG-31828 Change-Id: I244a4473feb40e106cbc08e09afdee07d4ecc8d7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-06-271-1/+2
|\| | | | | | | | | | | | | | | Conflicts: configure mkspecs/features/create_cmake.prf Change-Id: I94aea83b83833395d5db399209e0e51b92ef23b5
| * Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-06-201-1/+2
| |\ | | | | | | | | | Change-Id: I94bb158562ae6b80a87b40139d7302ea7b9b9aa8
| | * network requests: do not access 1st byte of empty byte arrayPeter Hartmann2013-06-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... because otherwise this would crash. Apparently there are cases where the header name is empty. Task-number: QTBUG-31667 Change-Id: I31b3e964502c05b7614c23876bb3752fa75ab22d Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* | | Doc: Adding navigation configs in the module qdocconf files.Jerome Pasion2013-06-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | -The navigation bar requires the titles of the landing page and relevant pages. Change-Id: I5d5986b2bf74205cd49957b63fd6ac4e32cbb36b Reviewed-by: Martin Smith <martin.smith@digia.com>
* | | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2013-06-243-8/+8
|\ \ \ | | | | | | | | | | | | refs/staging/dev
| * | | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-06-203-8/+8
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp tools/configure/configureapp.cpp Change-Id: I3092bd3276af14304b7ab3ae1e1cc05d11cdede0
| | * | Remove use of 'register' from Qt.Stephen Kelly2013-06-173-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is deprecated and clang is starting to warn about it. Patch mostly generated by clang itself, with some careful grep and sed for the platform-specific parts. Change-Id: I8058e6db0f1b41b33a9e8f17a712739159982450 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | | BlackBerry QNetworkConfiguration: Keep track of bearer typePeter Hartmann2013-06-242-1/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I.e. let the user know whether he is on 2G / 3G / 4G. Since usually apps are rather interested whether they are on Wifi or cellular, change of cellular type (i.e. transition from 3G to 4G etc.) will not trigger emission of the "QNetworkConfigurationManager::configurationChanged" signal. The cellular type check will only be performed if the user queries it by calling the respective member methods (bearerType() and bearerTypeName()). Reading the cellular type takes around 1-2 milliseconds. In addition, add new fields "BearerEVDO" and "BearerLTE" to the public API for QNetworkConfiguration. Change-Id: I4c4ec52926f862b84487c91a88b1e20e590dd793 Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* | | | HTTP internals: fix QHttpNetworkRequestPrivate::operator==Peter Hartmann2013-06-241-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were not comparing all fields. Spotted-by: Richard J. Moore <rich@kde.org> Change-Id: I5c1a773b00b64a26606c47ced292808696c9b4bb Reviewed-by: Richard J. Moore <rich@kde.org>
* | | | HTTP internals: do not open too many sockets when preconnectingPeter Hartmann2013-06-246-10/+50
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Each pair of (normal request, preconnect request) requires only one socket. E.g. if there is 1 preconnect request in-flight and 2 normal requests, we need only 2 sockets in total, and not 3. Therefore, we need to keep track of whether a request is preconnecting or a normal one. Task-number: QTBUG-31594 Change-Id: If92ccc35abadfa6090d64ee92bd466615909c94c Reviewed-by: Richard J. Moore <rich@kde.org>
* | | HTTP internals: consider SSL sockets with pending encryption as usablePeter Hartmann2013-06-182-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We do not decide which socket a HTTP request is sent on until the socket is actually ready for sending a request (i.e. it is connected for HTTP requests and encryption is done for HTTPS requests). When deciding how many sockets we need for the queued requests, we consider an in-flight socket as free if it is still connecting. However, we considered a socket that was connected but needed to complete encryption as busy, and would instead open another socket. Now, we consider an encrypting socket as in-flight as well. Change-Id: I93d6743da6fc430d1424c6965e1475865fd97243 Reviewed-by: Richard J. Moore <rich@kde.org>
* | | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-06-044-3/+12
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.h src/plugins/platforms/cocoa/qnsview.mm Change-Id: I6fe345df5c417cb7a55a3f91285d9b47a22c04fa