summaryrefslogtreecommitdiffstats
path: root/src/network/access/qhttpnetworkconnection_p.h
Commit message (Collapse)AuthorAgeFilesLines
* QNAM: Prepare protocol handlers for local socketMårten Nordheim47 hours1-5/+5
| | | | | | | | | + a small stretch into adjacent functions, because some are used from the protocol handler(s). Task-number: QTBUG-102855 Change-Id: Ie394378fef2b1723e69286fd870fc34b7306734a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QHttpNetworkConnection: make channels member constMårten Nordheim8 days1-1/+1
| | | | | | | | | They are set in the ctor and should not change afterwards, so make it explicit by making them const. Task-number: QTBUG-102855 Change-Id: Ie1838a532f89d9cc0c3ae16521fa1829b5cdff61 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QNAM: Trivial AbstractSocket*=>IODevice* transformsMårten Nordheim11 days1-4/+4
| | | | | | | | | In preparation for the socket potentially being a QLocalSocket. Task-number: QTBUG-102855 Change-Id: I9889f72fc55d945ba6c392d573293628ec052164 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mate Barany <mate.barany@qt.io>
* QHttpNetworkConnectionPrivate: mark NO_COPY_MOVEMårten Nordheim2024-04-171-0/+1
| | | | | | | | | To get clang-tidy to stop complaining about missing copy/move-ctor/assign Task-number: QTBUG-102855 Change-Id: Iefc19da324090db3a38d017859ad0a32ae7d6ff5 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QHttpNetworkConnectionPrivate: NSDMIMårten Nordheim2024-04-171-4/+4
| | | | | | | | Initialize the hardcoded things inside the class. Task-number: QTBUG-102855 Change-Id: I06da0a615ec066e63d9cd0359313e8e8f588718e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QHttpNetworkConnectionPrivate: fix clang-tidy mismatching argumentMårten Nordheim2024-04-171-2/+2
| | | | | | | | It complains about the declaration arg. name differing from the definition name Task-number: QTBUG-102855 Change-Id: I005ab69b0f41db0bda3ef64f2c779c3cb3f6fd38 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QHttpNetworkConnection: Remove redundant/unused ctorMårten Nordheim2024-04-171-5/+0
| | | | | | | Task-number: QTBUG-102855 Change-Id: Ifcd25c241f2e331b0c271d3462b5a2896797d101 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* tst_QHttpNetworkConnection: Move to use only one ctorMårten Nordheim2024-04-171-1/+2
| | | | | | | | | We want to get rid of the other one, it's all internal API anyway. Task-number: QTBUG-102855 Change-Id: I2b621c20f4dd7c8bf5f07db8db908c2b7b86976f Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Make the QtNetwork private symbols visibleAlexey Edelev2024-01-221-1/+1
| | | | | | | | | Export QHttpNetworkConnection and QHttpNetworkReply classes, this is required to use the freshly introduced QHttp2Stream. Pick-to: 6.7 Change-Id: I4920d342af943b393afa78a187b562549fa919e0 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QHttpNetworkConnection: mark some methods as constAnton Kudryavtsev2023-10-301-2/+2
| | | | | | | | These get methods (sslContext and connectionType) are part of private API, so it's safe Change-Id: I6c2e14d5dbcbefc051d69985d1e9b490274ba7ef Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Make QHttpNetworkConnectionPrivate::parseRedirectResponse staticMårten Nordheim2023-10-181-1/+1
| | | | | | | | We will use it without holding an instance later. And there's no reason it is not static already. Change-Id: I06d455bb2852244c8a4993ea75ceda4e1cb679fb Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* HTTP: Make redirect response parsing more genericMårten Nordheim2022-02-111-0/+6
| | | | | | | | | | | | | | To enable its use in the http2 protocol handler. This factors out the error-reporting code for HTTP 1, which in any case has to be done differently for HTTP 2, saving duplication and simplifying the redirect handling code. Task-number: QTBUG-100651 Pick-to: 6.3 6.2 5.15 Change-Id: I4b470646a9ad5ee702c9b1921d115e137d3d5b8b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QNetworkReply: Add two new signalsMarkus Goetz2021-07-201-0/+1
| | | | | | | | | | | These signals allow monitoring where in the HTTP1/HTTP2 flow a request is currently in. Fixes: QTBUG-71698 Fixes: QTBUG-18766 Change-Id: Icc2fe435afc9f680fa7a76c32731e25fcdfeb4b4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Hold QSslContext in shared_ptrMarc Mutz2021-07-181-3/+3
| | | | | | | | | | | ... instead of QSharedPointer. QSharedPointer performs twice as many atomic operations per pointer copy as std::shared_ptr, and this is private API, we're not bound by BC constraints, so we can port to the more efficient version. Change-Id: I2e2a02493565a7ca51c86ec0ed66b6ce7c763e41 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Another round of 0->nullptr cleanupAllan Sandfeld Jensen2020-07-311-2/+2
| | | | | Change-Id: Ic8db7dc252f8fea46eb5a4f334726d6c7f4645a6 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Remove bearermanagement usage inside QNAM and QNetworkProxyMårten Nordheim2020-04-011-16/+0
| | | | | Change-Id: I2c4fdf598b46daf1b69a65848ebe0fd78ef8be24 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devLiang Qi2020-02-131-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/widgets/graphicsview/boxes/scene.h src/corelib/Qt5CoreMacros.cmake src/corelib/Qt6CoreMacros.cmake src/network/ssl/qsslsocket.cpp src/network/ssl/qsslsocket.h src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite.cpp src/testlib/CMakeLists.txt src/testlib/.prev_CMakeLists.txt tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp Disabled building manual tests with CMake for now, because qmake doesn't do it, and it confuses people. Done-With: Alexandru Croitor <alexandru.croitor@qt.io> Done-With: Volker Hilsheimer <volker.hilsheimer@qt.io> Change-Id: I865ae347bd01f4e59f16d007b66d175a52f1f152
| * QNetworkAccessManager: deprecate bearer related functionsMårten Nordheim2020-01-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | In Qt6 QNAM will no longer use bearer in any way so we deprecate it now. Also mark bearermanagement-conditioned sections for removal in Qt6, the _q_networksession property is part of how QNAM passes the QNetworkSession around. Task-number: QTBUG-81609 Change-Id: I04aad9dd96482c6822dffba1b9af7aa58961149c Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Retire SPDY protocol implementation (Qt6)Timur Pocheptsov2019-09-251-2/+0
|/ | | | | | | | | | | | | | | | | | | As it was superseded by HTTP/2. Bye, Speedy. Since it's Qt 6, we also fix the attribute's enumerator to fit our coding convention with HTTP2AllowedAttribute becoming Http2AllowedAttribute, and the same for HTTP2WasUsedAttribute. tst_qnetworkreply in 'benchmark' directory of qtbase/tests was updated - we have the logic they tested in preConnectEncrypted in tst_http2 now. Manual qnetworkreply test was updated (instead of SPDY in NPN failure we can use H2, the second test was deleted - again, auto-tested in tst_http2). Change-Id: I559c140c333ddf72664911c6e275b1d0d2b980a9 Task-number: QTBUG-78255 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Add means to configure HTTP/2 protocol handlerTimur Pocheptsov2019-08-201-3/+5
| | | | | | | | | | | | | | Similar to TLS configuration that we can use on QNetworkRequest, we can configure different options in our HTTP/2 handling by providing QNetworkAccessManager with h2 configuration. Previously, it was only possible internally in our auto-test - a hack with QObject's properties and a private class. Now it's time to provide a public API for this. [ChangeLog][QtNetwork][QNetworkRequest] Add an ability to configure HTTP/2 protocol Change-Id: I80266a74f6dcdfabb7fc05ed1dce17897bcda886 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Introduce QNetworkConnection/Status/MonitorTimur Pocheptsov2019-05-021-0/+13
| | | | | | | | | | | Private classes to replace broken or even not working at all 'session management' and 'bearer manager' (on at least two major platforms we support). This implementation is macOS/iOS-specific and uses SystemConfiguration framework, or more precisely SCNetworkReachability's part of it. Task-number: QTBUG-40332 Change-Id: Iac5f44c4063c4092b93b8cf2bde3fb2c524855b3 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* More nullptr usage in headersKevin Funk2019-03-141-2/+2
| | | | | | | | | | | Diff generated by running clang-tidy's modernize-use-nullptr checker on the CMake-based Qt version. Skipping src/3rdparty, examples/, tests/ Change-Id: Ib182074e2e2fd52f63093f73b3e2e4c0cb7af188 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add support for setting the peer verify name via the QNetwork* classesAndy Shaw2019-02-061-0/+4
| | | | | | | | | | This adds functions to QNetworkRequest to be able to set the peerVerifyName. An overload of connectToHostEncrypted is also added to have an extra argument to allow setting it directly in this manner too. Fixes: QTBUG-73125 Change-Id: I371e90035b53a74c9eb3cef64f367e307dce073e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Use Q_DISABLE_COPY_MOVE for private classesFriedemann Kleint2018-12-121-1/+1
| | | | | Change-Id: I3cfcfba892ff4a0ab4e31f308620b445162bb17b Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Merge "Merge remote-tracking branch 'origin/5.10' into dev" into ↵Liang Qi2017-11-061-0/+6
|\ | | | | | | refs/staging/dev
| * Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-051-0/+6
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/minimum-linux.S src/network/access/qhttpthreaddelegate.cpp src/widgets/kernel/qwidgetwindow.cpp Change-Id: Id2e817e85f85c68f5482c9a12912d35590f9d5f8
| | * HTTP/2 - make protocol settings configurablev5.10.0-beta3Timur Pocheptsov2017-10-261-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Recently we have updated our receive window size to a larger value. Unfortunately, this also results in auto-test pumping through more data, which probably takes more time on CI. At the moment we do not have any public API on QNAM's level to customize HTTP/2 parameters (aka 5.10/FF and so on). So we use the fact that QNAM is QObject and we can set a property on it. This property is our Http2::ProtocolParameters object that allows us to configure: - HPACK parameters (in 5.10 - noop) - session receive window size - different SETTINGS as described by RFC 7540, 6.5.2. 2. Undocumented environment variable to set ENABLE_PUSH is not needed anymore. 3. In 5.11 Http2::ProtocolParameter will become a public API and we'll introduce a new setter in QNAM. Change-Id: If08fd5e09e7c0b61cf9700b426b60b5837b6b2e6 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Modernize use of 'http' featureUlf Hermann2017-11-061-3/+1
|/ / | | | | | | | | | | | | | | | | | | Exclude QHttp(Multi)Part from being built if http is disabled, and replace the exclusion macros. Use the qmake project files to exclude source files, and QT_REQUIRE_CONFIG(http) in headers. Change-Id: I432fa3c78aa97b5ed2eb1027ac1dc3bdb134f9ba Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* / Introduce Http2DirectAttributeTimur Pocheptsov2017-09-041-1/+2
|/ | | | | | | | | | | | | | | | | Now that we have a proper ALPN/NPN + Protocol Upgrade, we can also add H2Direct - this can be useful for our users that have to work with either Secure Transport or a TLS implementation not supporting ALPN/NPN and with 'h2direct' servers in case they have prior knowledge of HTTP/2 support. The difference with RFC 7540 is the fact we also allow this 'direct' in case of 'https' scheme (it appears existing HTTP/2 server implementations support such mode too). [ChangeLog][QtNetwork] Add Http2DirectAttribute to enable 'direct' HTTP/2 protocol without ALPN/NPN and without protocol upgrade negotiations. Task-number: QTBUG-61397 Change-Id: I0499d33ec45dede765890059fd9542dab236bd5d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* HTTP/2 - implement the proper 'h2c' (protocol upgrade)Timur Pocheptsov2017-08-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Without TLS (and thus ALPN/NPN negotiation) HTTP/2 requires a protocol upgrade procedure, as described in RFC 7540, 3.2. We start as HTTP/1.1 (and thus we create QHttpProtocolHandler first), augmenting the headers we send with 'Upgrade: h2c'. In case we receive HTTP/1.1 response with status code 101 ('Switching Protocols'), we continue as HTTP/2 session, creating QHttp2ProtocolHandler and pretending the first request we sent was HTTP/2 request on a real HTTP/2 stream. If the first response is something different from 101, we continue as HTTP/1.1. This change also required auto-test update: our toy-server now has to respond to the initial HTTP/1.1 request on a platform without ALPN/NPN. As a bonus a subtle flakyness in 'goaway' auto-test went away (well, it was fixed). [ChangeLog][QtNetwork][HTTP/2] In case of clear text HTTP/2 we now initiate a required protocol upgrade procedure instead of 'H2Direct' connection. Task-number: QTBUG-61397 Change-Id: I573fa304fdaf661490159037dc47775d97c8ea5b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QHttpNetworkConnection: fall back gracefully to HTTP/1.1Timur Pocheptsov2017-03-081-0/+3
| | | | | | | | | | | | | | Both SPDY and HTTP/2 work with a single qhttpnetworkchannel (and this means one socket per qhttpnetworkconnection). Normally, HTTP/1.1 connection is using up to 6 channels/sockets though. At the moment a failure to negotiate SPDY/HTTP/2 leaves us with a downgraded HTTP/1.1 connection (with only one channel vs. default 6). Since we initialize channels (and establish connections) in a 'lazy' manner it's ok to pre-allocate all 6 channels and then either use 1 (if SPDY/HTTP/2 indeed was negotiated) or switch back to 6 in case of failure. Change-Id: Ia6c3061463c4d634aaed05ce0dde47bfb5e24dd8 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-10-111-0/+1
|\ | | | | | | | | | | | | | | Conflicts: src/gui/image/qpixmap.cpp src/widgets/kernel/qformlayout.cpp Change-Id: I8a8391a202adf7f18464a22ddf0a6c4974eab692
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-10-081-0/+1
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/access/qhttpnetworkconnection.cpp src/network/access/qhttpnetworkconnection_p.h Change-Id: I11f8641ef482efa8cee1b79977d19cc3182814b4
| | * Make sure SSL configuration is correct in QNetworkReply::encrypted.Vladimir Prus2016-10-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some cases, when QNetworkReply::encrypted is emitted, QNetworkReply::sslConfiguration is not yet initialized, in particular certificate chain is empty, which breaks the documented usage of 'encrypted' to perform additional checks on certificate chain. It looks to be caused by the fact that QHttpNetworkReply is originally associated with 0th QHttpNetworkConnectionChannel, and this association is not updated if HTTP pipelining is not used. Therefore, a reply on channel >0 might arrive before reply on channel 0, and then using ssl configuration from channel 0, which not made it through handshake, is not usable. Task-number: QTBUG-49554 Change-Id: Ie5d4b5a0c503d5bdc44761ce8581f6ffe4e3bac2 Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
* | | Remove SSL includes from qhttpnetworkconnection_p.hFriedemann Kleint2016-07-121-11/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Windows, qsslcontext_openssl_p.h pulls in an unsanitized windows.h, causing the infamous min/max macros to be defined, requiring a #define NOMINMAX in qhttp2protocolhandler.cpp. This in turn breaks the MinGW developer build since that has NOMINMAX globally defined: access\qhttp2protocolhandler.cpp:40:0: error: "NOMINMAX" redefined [-Werror] Remove the include, adding missing forward declarations and include directives to the source files. Change-Id: Ic1c2c711d87599b15ad6e2d87eae7153a44ace47 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* | | HTTP2 protocol handlerTimur Pocheptsov2016-07-081-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add HTTP2 support in QNAM - QHttp2ProtocolHandler + aux. classes. [ChangeLog][QtNetwork] Added support for HTTP/2 protocol Task-number: QTBUG-50956 Change-Id: I3a119cfbb1fb3118d9003225f5e54b46ae2829b6 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Add qtnetworkglobal.h and qtnetworkglobal_p.hLars Knoll2016-07-031-0/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | | | The new modular configuration system requires one global header per module, that is included by all other files in this module. That header will later on #include the configuration file for Qt Network. For now it defines the Q_NETWORK_EXPORT macro for this library. Change-Id: I9c45d425baf881c431ed71fd457c7feb2c123855 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | QtNetwork: use const (and const APIs) moreAnton Kudryavtsev2016-04-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | For CoW types, prefer const methods to avoid needless detach()ing. Mark predictNextRequest() as const, because this method does not modify the object. Change-Id: Ic94e2b31445ece46ab1423bf5b5f4e66d9a5b6ca Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | network: Pass types with copy-ctor or dtor by const-refSérgio Martins2015-12-131-1/+1
|/ | | | | Change-Id: I7bea3e03bff6f424b02335476211dd466ce4d720 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fix warning and improve the signature of parseRedirectResponseAllan Sandfeld Jensen2015-03-131-1/+1
| | | | | | | | | Fixes unnecessary indirect return value and deprecated construction of QString from QByteArray. Change-Id: I4b654348285923ac1df39fc03784175ad6acb674 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* QNetworkAccessManager: Support HTTP redirectionMandeep Sandhu2015-03-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for following HTTP redirect responses on a per request basis. This behavior is disabled by default. It can be switched on by setting the QNetworkRequest::FollowRedirectAttribute to true. 2 new error codes have been added to QNetworkReply: * TooManyRedirectsError: Set when the number of redirects exceed a given value set by the user (defaults to 50 if not set) * UnsecureRedirectError: Set when we are redirecting from a 'https' to 'http' protocol. Test cases for the following scenarios: * Single HTTP redirect using local test server * Changing max-redirects * Testing all redirect related error scenarios The next commit will extend this feature at a QNAM level. Task-number: QTBUG-8232 Change-Id: If9e28ad12bad08bcdc5bc511b1cd59dc9d8150f0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Update credentials on cached http-connectionsAllan Sandfeld Jensen2014-11-031-0/+2
| | | | | | | | | | | | | | When sending a second request with implied credentials the connection used may be cached as a connection without credentials, and thereby incorrectly reused later for other connections with different implied credentials. This patch updates the credentials a cached http-connection is using before sending a request on it. Task-number: QTBUG-39456 Change-Id: I1609234136a89c32e00432a67720cd62a73a488a Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-18/+10
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Introduce secure transport backend for Windows RuntimeOliver Wolff2014-08-131-0/+2
| | | | | | | | | | The change creates a stub implementation for WinRT, adding the needed files and classes to build SSL support on that platform. Task-number: QTBUG-37497 Change-Id: Idc3e8aa91c5eb8a938705f2385d1074fe6c1d83e Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* SSL: split ssl files into general and "_openssl" implementationOliver Wolff2014-08-091-2/+2
| | | | | | | | | | | | | | | In order to prepare the addition of WinRT and iOS (SecureTransport) implementations of SSL the structure of some SSL files has to be redone. Parts of certificate that probably can be reused by other ports stayed in qsslcertificate.cpp while other parts were moved to qsslcertificate_openssl.cpp. qsslcontext, qsslkey and qsslsocket were suffixed by _openssl to show that these are pure openssl implementations. Change-Id: I7b022dec49759f882274999c0991bf95788f2a3a Reviewed-by: Andrew Knight <andrew.knight@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* Fix QT_NO_BEARERMANAGEMENT compile of QHttpThreadDelegate.Steffen Imhof2014-06-101-2/+2
| | | | | | | Re-order the constructor parameters for QHttpNetworkConnection to be consistent with the #ifndef version. Change-Id: Icd8be4406ff549d468e06d635fac2ddc34826b1c Reviewed-by: Richard J. Moore <rich@kde.org>
* network: add support for the SPDY protocolPeter Hartmann2014-02-191-7/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>