summaryrefslogtreecommitdiffstats
path: root/src/network/access
Commit message (Collapse)AuthorAgeFilesLines
* Provide more details of failed connectionAndré Klitzing2022-07-231-0/+2
| | | | | | | | | | | Otherwise the errorString from qtls_openssl is lost that would help a lot why a tls connection failed. "Error during SSL handshake: error:1414D17A:SSL routines:tls12_check_peer_sigalg:wrong curve" Pick-to: 6.4 6.3 6.2 Change-Id: Iab74b73488219686e5926308db02bc4063818c9f Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Port QByteDataBuffer to qsizetypeMarc Mutz2022-07-201-1/+1
| | | | | | | | | | | | Less impedance mismatch with the other Qt containers. As a drive-by, fix code style in the touched lines, and remove superfluous inline keywords. Pick-to: 6.4 6.3 Change-Id: I2c9444a8f956e58c361104a19f55fcc783cd1a1d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QHttpHeaderParser: fix int/qsizetype nagsMårten Nordheim2022-06-271-3/+3
| | | | | | | | | | | | These values won't extend past MAX_INT but it may produce warnings nonetheless. Found by clang-tidy. Pick-to: 6.4 6.3 Task-number: QTBUG-104452 Change-Id: Icd8aa80a318274be00a3b32ad26a92745903cecb Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QHttpHeaderParser: fix clang-tidy nagsMårten Nordheim2022-06-271-8/+7
| | | | | | | | | "use empty instead of checking size" "no else following return" "initialize your variables" Change-Id: I4512471ec15a00f7ac1fccf88a3c87b8aa983ad7 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QHttpHeaderParser: Allow larger fields but restrict total sizeLars Schmertmann2022-06-272-11/+40
| | | | | | | | | | | | | | | | | | Our limit of 8k for a single header field was too small for certain services which returned Location values or WWW-Authenticate challenges longer than 8k. Instead, taking inspiration from Chromium, we have a limit of 250k for the full header itself. And increasing our field limit to 100k, which would occupy almost half of what the total header allows. Also took the opportunity to make it adjustable from the outside so we can set more strict limits in other components. Fixes: QTBUG-104132 Pick-to: 6.3 6.4 Change-Id: Ibbe139445e79baaef30829cfbc9a59f884e96293 Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
* Isolate http2protocol_p.h includeAlexey Edelev2022-06-221-1/+1
| | | | | | | | | | http2protocol_p.h is not supposed to be used without the http feature is enabled. Move its include under QT_CONFIG(http) guard. Change-Id: I374dd84d3330de2b4c340b9803d0c3d2c13bc8e3 Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix typos in docs and commentsKai Köhne2022-06-151-1/+1
| | | | | | | | | Found by codespell Pick-to: 6.4 Change-Id: Ie3e301a23830c773a2e9aff487c702a223d246eb Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Remove mentions of SSL 3 in documentationMårten Nordheim2022-05-301-3/+2
| | | | | | | | | | And some s,SSL,TLS, in the same paragraphs. Changing SSL to TLS in the whole codebase looks odd given classes are still called QSsl*, but may be worth considering at some point. Pick-to: 6.3 6.2 Change-Id: I06dfcd99c1f6ac9e029e1914363344b3705d871f Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-1692-3499/+187
| | | | | | | | | | | | | 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>
* QNetworkCacheMetaData: replace qSwap with member-swapMarc Mutz2022-05-111-1/+1
| | | | | | | | | | | | This one seems to have been forgotten the first time around. Amends f438d29b6fdfff0680b09e88590ee47b22877776. Task-number: QTBUG-97601 Pick-to: 6.3 6.2 5.15 Change-Id: Ia9b2667dd69cc4a9778f8c9bdf905ca11b4e079e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix documentation for QNetworkReply::redirectedFlorian Bruhin2022-05-042-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | In d12afeff4097dd78f1311511e0c8f74e1a810d47, the default redirect policy was changed to NoLessSafeRedirectPolicy (from ManualRedirectPolicy), and this was reworded from: This signal is emitted if the QNetworkRequest::FollowRedirectsAttribute was set in the request [...] (i.e.: Qt handles redirect, no manual handling) to: This signal is emitted if the QNetworkRequest::ManualRedirectPolicy was set in the request [...] (i.e.: User handles redirect, no handling by Qt), which is exactly the wrong way around. Only if Qt handles the redirect, it's able to send a signal about it. If the user handles redirects, they would get the RedirectionTargetAttribute in response to the finished() signal. Also see tst_QNetworkReply::ioHttpSingleRedirect(): It sets NoLessSafeRedirectPolicy (default since Qt 6) and then ensures the "redirected" signal has been emitted. Pick-to: 6.3 6.2 Change-Id: I7e80ff69b94a4d94eb541b1021b05601d183c733 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QtNetwork: includemocsMarc Mutz2022-04-281-0/+2
| | | | | | | | | | | Including moc files directly into their classes' TU tends to improve codegen and enables extended compiler warnings, e.g. about unused private functions or fields. Pick-to: 6.3 6.2 5.15 Task-number: QTBUG-102886 Change-Id: Ie027419956d98c971429f2b4c7ae6f8f56c094f6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QHttp: Fix handling of redirect loaded from cacheMårten Nordheim2022-04-271-0/+1
| | | | | | | | | | | | | | | In some situations when loading a redirect from cache which would lead to a real request we would not emit the finished() signal because the replyFinished function has a pre-condition that the response did not originate from the cache. However, after the initial redirect was loaded from the cache we never unset the 'loadingFromCache' boolean, so it was still true after the request had been made to the real target. Pick-to: 6.2 6.3 5.15 Change-Id: I015a2ebae4af4bd17392182c3951e875a7b353c4 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QNetworkReply: update decompress error message and handlingMårten Nordheim2022-04-273-17/+62
| | | | | | | | | | | The error message was quite vague since it would then not require any additional translations. However, in hindsight this was a mistake since now developers just thought their downloads were being corrupted. Pick-to: 6.2 6.3 Fixes: QTBUG-101942 Change-Id: Ie9af42510ca027d15248e5bcf21e836e709898d9 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Fix unused variables in qtbaseAndrei Golubev2022-04-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | clang compiler recently got smarter and detects "pseudo used variable" patterns where we declare a variable and only use it in self-increments, self-decrements and other similar expressions Errors: qtbase/src/corelib/text/qlocale.cpp:3898:9: error: variable 'group_cnt' set but not used [-Werror,-Wunused-but-set-variable] int group_cnt = 0; // counts number of group chars ^ qtbase/src/corelib/text/qunicodetools.cpp:1372:21: error: variable 'uc' set but not used [-Werror,-Wunused-but-set-variable] const char16_t *uc = text + from; ^ and more of the kind Remove the ones that have no usage, mark others with [[maybe_unused]] Pick-to: 6.3 6.2 Change-Id: Ib2d0722110e3da8c39e29ec78c0ec290d064c970 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtNetwork: replace remaining uses of QLatin1String by QLatin1StringViewSona Kurazyan2022-04-214-11/+11
| | | | | | | Task-number: QTBUG-98434 Change-Id: I0bb9d534ee42ccbf7d353e251ef58901a86923b4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QtNetwork: use _L1 for for creating Latin-1 string literalsSona Kurazyan2022-04-2117-103/+124
| | | | | | Task-number: QTBUG-98434 Change-Id: Ic235b92377203f7a1429ae7fd784c4a1fa893e9f Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QtNetwork: stop using QLatin1Char constructor for creating char literalsSona Kurazyan2022-04-217-20/+19
| | | | | | | | | | | Required for porting away from QLatin1Char/QLatin1String in scope of QTBUG-98434. As a drive-by, fix qsizetype -> int narrowing conversion warnings for the touched lines. Change-Id: I121f87214b77aeab1dfd3e62dc5adaa6255cc0e0 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QHttp: Don't reorder content-length header for no reasonMårten Nordheim2022-04-211-2/+3
| | | | | | | | | | | If the user supplied a content-length, and we also know the size of the payload then we would set the content-length again, which is a remove + add on a QList. This is completely avoidable if we are setting the same size anyway. Fixes: QTBUG-102495 Change-Id: If62739cadb453dbda4c21e858ba3a17baaf71fb4 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Replace uses of _qs with _s in sources and examplesSona Kurazyan2022-04-191-1/+3
| | | | | | Task-number: QTBUG-101408 Change-Id: I48360ba3b23965cd3d90ac243c100a0656a4cde8 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QtNetwork: sweep Q_DECLARE_METATYPE → QT_DECL_METATYPE_EXTERN [2/2]: ↵Marc Mutz2022-04-0610-5/+20
| | | | | | | | | | | | | | | private API It's one of our best tools to improve compile times. Can't backport to Qt 6.2 because the macros don't exist there. Pick-to: 6.3 Task-number: QTBUG-102206 Change-Id: Ic8f3870d8eec6211c4be506dc67717cc4e0ff7d6 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QtNetwork: sweep Q_DECLARE_METATYPE → QT_DECL_METATYPE_EXTERN [1/2]: ↵Marc Mutz2022-04-056-4/+13
| | | | | | | | | | | | | | public API It's one of our best tools to improve compile times. Can't backport to Qt 6.3 or 6.2 because this change introduces new exported symbols. Task-number: QTBUG-102206 Change-Id: I6bfa532be34ca847d3b9034d16c94efed3d602c3 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Short live Q_CONSTINIT!Marc Mutz2022-03-261-1/+1
| | | | | | | | | | | | | | | | | | It expands to the first available of - constinit (C++20) - [[clang::require_constant_initialization]] (Clang) - __constinit (GCC >= 10) Use it around the code (on and near static QBasicAtomic; this patch makes no attempt to find all statics in qtbase). [ChangeLog][QtCore][QtGlobal] Added macro Q_CONSTINIT. Fixes: QTBUG-100484 Change-Id: I11e0363a7acb3464476859d12ec7f94319d82be7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Network: Do not depend on transitive includesFabian Kosmale2022-03-173-0/+3
| | | | | Change-Id: Ie37a4d332ff808e2524b1742fa70dc07992fa8c7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtNetwork: compile-optimize inline swap functionsMarc Mutz2022-03-174-4/+4
| | | | | | | | | | | | | | | | | | Instead of using the overly-generic qSwap() monster, use - qt_ptr_swap() for swapping raw pointers - member-swap for swapping smart pointers - std::swap() for swapping scalars In QtCore, this has proven to give a nice reduction in compile time for Qt users, cf. b1b0c2970e480ef460a61f37fa430dc443390358. Pick-to: 6.3 6.2 Task-number: QTBUG-97601 Change-Id: I26586da1f158fe6b18314abd8cf9bb040bc9cad1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix deprecated use of QBA/Q*String::countMårten Nordheim2022-03-152-13/+13
| | | | | | | 'Use size() or length() instead' Change-Id: I284fce29727c4c1ec9ea38a4e8ea13a9e0af5390 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* HTTP2: port to QByteArrayView where it's trivialMarc Mutz2022-03-116-8/+8
| | | | | | | | | | | | | Nothing serious, just was curious and played around a bit, so might as well merge it. There's much more here that could be done, but I lack the time to do it. Change-Id: Idd4ea09a7a413ed5911ffe16841f3d5c944ec1a5 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* HPack: make padding_is_valid static constexprMarc Mutz2022-03-111-0/+1
| | | | | | | | ... because we can. Change-Id: I3a813fa9c33e47d20a00e6a331cbbcf6f85e63e7 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* wasm: fix issue with passing username/password to network requestLorn Potter2022-03-101-3/+7
| | | | | | | | | | | The data scope was wrong, it needs to live beyond the attribute strut Change-Id: If1ceb4967fc1755d4968a69bcd9d82b234bd871d Done-with: Vincent Rouillé Fixes: QTBUG-101551 Pick-to: 6.3 6.2 5.15 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: David Skoland <david.skoland@qt.io>
* Fix deprecated uses of QScopedPointerMårten Nordheim2022-03-082-12/+16
| | | | | | | | | By changing it to unique_ptr. Pick-to: 6.2 6.3 Change-Id: I91abb69445b537d4c95983ae735341882352b29d Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* wasm: fix network reply error finished() signalingLorn Potter2022-03-051-0/+1
| | | | | | | | | | The network reply needs to send the finished() signal after any error. Change-Id: Iafc42d26f91241293042b72201eef2e88613e468 Fixes: QTBUG-101286 Pick-to: 6.3 6.2 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Make sure all qtbase private headers include at least one otherThiago Macieira2022-02-245-7/+8
| | | | | | | | | | See script in qtbase/util/includeprivate for the rules. Since these files are being touched anyway, I also ran the updatecopyright.pl script too. Change-Id: Ib056b47dde3341ef9a52ffff13ef677e471674b6 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Http2: Fix redirect-handlingMårten Nordheim2022-02-201-6/+14
| | | | | | | | | | | | | The redirect handling for http2 was a little simple. E.g. not handling relative URLs. Fix this using the redirect response parsing function which the http1 protocol handler already uses. Fixes: QTBUG-100651 Pick-to: 6.3 6.2 5.15 Change-Id: Ic0cec4cacc92707e7a7fde1f4665f80995a6057e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QHttp: Move the emission of requestSentMårten Nordheim2022-02-181-1/+2
| | | | | | | | | | | Moved to after the header is actually written, not just generated. For requests with data (put/post) we may have to wait for a callback before the data to write is available. Since we then delay writing the header as well it would be disingenuous to emit requestSent(). Pick-to: 6.3 Change-Id: I76c2d40ca48faaa1f6730ce8b3d5a8a4c3156f8f Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* HTTP: Make redirect response parsing more genericMårten Nordheim2022-02-112-16/+29
| | | | | | | | | | | | | | 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>
* Network: Emit authenticationRequired when using NtlmSören Bohn2022-02-021-1/+6
| | | | | | | | | | | | Adds a new state Phase1 to QAuthenticatorPrivate::Phase which is used when authenticating using Ntlm. The new state forces an emit of the authenticationRequired signal and tracks that it is called only once. Fixes: QTBUG-44096 Pick-to: 6.2 6.3 5.15 Change-Id: Icc9662d4fdc1f0f8c8e8bc5538f211baaa055d4c Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QNetworkReply: rename socketConnecting to socketStartedConnectingMårten Nordheim2022-01-317-10/+10
| | | | | | | | | From the API review. Pick-to: 6.3 Change-Id: Ic05737db79327e7811fcd974a70914b837e06601 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QNetworkRequest: Document how Qt handles 301 and 302 status codesMårten Nordheim2022-01-181-0/+5
| | | | | | | | | To make it explicit Pick-to: 6.3 6.2 5.15 Task-number: QTBUG-92909 Change-Id: I8f8dc99628168a566158acef72ae2a5e001eef88 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Convert date-time to UTC before claiming it's in GMTEdward Welbourne2022-01-171-4/+4
| | | | | | | | | | | | | | | | | | QNetworkHeadersPrivate::toHttpDate() used a custom format to output a date-time; the format supplied GMT as suffix, but neglected to convert the date-time to UTC, so local-time was formatted as if it were UTC, regardless of its actual offset from it. Fixing this (by the obvious toUTC() call) broke formatting when the supplied header value was a QDate, since it's packaged as a QVariant and QVariant's conversion of QDate to QDateTime uses local time's (not UTC's) start of day. So fix headerValue() to separate QDate and QDateTime cases and use startOfDay(Qt::UTC) to get the right start of the day. Added tests for non-UTC date-times appearing correctly in HTTP headers. Fixes: QTBUG-80666 Pick-to: 6.3 6.2 6.2.3 5.15 Change-Id: I2792bce14a07be025cf551b0594630260c112269 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QtNetwork: Include moc filesMårten Nordheim2022-01-1515-0/+30
| | | | | Change-Id: I227a9541bf76c1c048a694f022b8fc419c0c2544 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QHttpNetworkConnection: Always set proxy settings to all channelsAndrey Mozzhuhin2022-01-121-2/+2
| | | | | | | | | | | | | | Proxy settings should always be set to all channels because after switching from HTTP/2 to HTTP/1.1 they may all be used. Problem was made in commit 8b9d246225dcd63900399297b0fd553918840bea. It is introduce the QHttpNetworkConnectionPrivate::activeChannel field, which value is 1 got HTTP/2 by default, but can later be changed to 6 if the remote host doesn't support HTTP/2. Pick-to: 6.3 6.2 5.15 Change-Id: Idcdeb22ec806520965f30a22045f99aa009a7362 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Q_{APPLICATION,GLOBAL}_STATIC: use variadic macrosThiago Macieira2021-12-171-3/+3
| | | | | | | | | | | | | | | | | We can't remove Q_GLOBAL_STATIC_WITH_ARGS, for compatibility reasons. It's also the only way to pass uniform initialization (i.e., initialize the value as value{with_braces}), though I don't think this is used almost anywhere due to the fact that you couldn't pass more than one argument. But Q_APPLICATION_STATIC is new in 6.3, so we have time to change it. [ChangeLog][QtCore][QGlobalStatic] The Q_GLOBAL_STATIC macro is now variadic. Any extra arguments are used as constructor arguments, obliterating the need to use Q_GLOBAL_STATIC_WITH_ARGS(). Pick-to: 6.3 Change-Id: Ib42b3adc93bf4d43bd55fffd16be3656a512fe53 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QNetworkAccessBackend: Fix living QObjects after QCoreApplication shutdownMike Achtelik2021-12-132-3/+8
| | | | | | | | | | | Since switching to the plugin bases system for the network backends, Qt again retains some QObjects after QCoreApplication shutdown. This was previously fixed in QTBUG-84234, so make sure we destroy the newly introduced QObjects as well. Task-number: QTBUG-84234 Change-Id: Ibb411c2dfb716b8f2aea2a3e366253fbd9dd8f64 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QNAM: Reintroduce h2c with an attributeMårten Nordheim2021-12-045-5/+26
| | | | | | | | | | | [ChangeLog][QtNetwork][QNetworkRequest] Added QNetworkRequest::Http2CleartextAllowedAttribute which controls whether HTTP/2 cleartext (h2c) is allowed or not. The default is false. This replaces the QT_NETWORK_H2C_ALLOWED environment variable. Task-number: QTBUG-98642 Change-Id: I43ae1cc671788f6d2559cd316f6667b412c8e75e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QNAM: Disable h2c by defaultMårten Nordheim2021-11-303-0/+19
| | | | | | | | | | | | | | | | | | And since it's relatively unlikely to be used, just leave it behind a environment variable for now. [ChangeLog][QtNetwork][Potentially Source-Incompatible] Support for clear-text http/2 was disabled due to incompatibility with certain servers. If you were relying on this feature you must re-enable it by setting the QT_NETWORK_ALLOW_H2C environment variable. For a later version of Qt it will get a dedicated attribute. Pick-to: 6.2 Task-number: QTBUG-98642 Change-Id: Id3e360726e285b3128e3e3f4bce9440404c9ad6e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Add more verification when parsing http headers and add testsØystein Heskestad2021-11-191-23/+61
| | | | | | | | Adding tests from QtWebSockets that will reuse QHttpHeaderParser Task-number: QTBUG-80700 Change-Id: I76294a9156173314a3cf09160d0ca4e0d7c6ef3a Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* wasm: fix network reply status attributeLorn Potter2021-11-061-6/+11
| | | | | | | | | | We were emitting the finished signal before the status code attributes were being set. Fixes: QTBUG-97984 Pick-to: 6.2 5.15 Change-Id: Ib179898dee2b9667d482348ad12180e8bdef74db Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QNetworkAccessAuthenticationManager: don't mix iterators and pointersGiuseppe D'Angelo2021-10-141-8/+11
| | | | | | | | | | | QList::iterator is not a pointer and shouldn't be treated as one. Convert the code to use iterators consistently (using iterators is necessary due to the call to insert()). Change-Id: I917b3ff6fdcf1f7959e35ac5b091a8140e9f833c Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Don't send the default SETTINGS_INITIAL_WINDOW_SIZETimur Pocheptsov2021-10-123-13/+14
| | | | | | | | | | And don't set non-default large value in QNetworkRequest's constructor. Some servers consider those values as 'flow control error'. Pick-to: 6.2 Fixes: QTBUG-97384 Change-Id: I801b7c83fe7e7392a02ba653c36dfa8a22c21d1e Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* network: Fix typos in source code commentsJonas Kvinge2021-10-124-8/+8
| | | | | | Change-Id: Iff505451e3f00de2d753de0f1d891a73cf73ef0d Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>