| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Pick-to: 6.5
Fixes: QTBUG-111248
Change-Id: I94a033fedf546c4d7f36af6c82a166dc33800f1f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
|
|
|
|
|
|
|
|
| |
Move clashing constants to QWebSocketPrivate.
Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: I6d22f2134683c2fb65b79732b991c7ff05338a8c
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
QWebSocketPrivate was getting destroyed before the emscripten
close callback was getting called, which was then calling back into the
already destroyed object.
So we set the UnconnectedState before it gets destroyed.
Fixes: QTBUG-108996
Pick-to: 6.5 6.4
Change-Id: I8ebbe5a55188a31209a95d2a71eea2faee3465ad
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
|
|
|
|
|
| |
Change-Id: I26214261662e466777b7438be13d91a0557f5e3c
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds the authenticationRequired signal.
[ChangeLog][QWebSocket] QWebSocket now supports 401 Unauthorized.
Connect to the authenticationRequired signal to handle authentication
challenges, or pass your credentials along with the URL.
Fixes: QTBUG-92858
Change-Id: Ic43d1c12529dea278b2951e6f991cc1004fc3713
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
It is not always possible to translate such strings, and the number of
occurrences don't matter, it's an error as soon as there is 1.
Amends 99ebe2f669258b3919a0933ffd5d4c85fb13c0c0
Pick-to: 6.5 6.4
Change-Id: I4b12311813b26cd6e8e21e55826ec60dd301692a
Reviewed-by: Juha Vuolle <juha.vuolle@insta.fi>
|
|
|
|
|
|
|
| |
Makes it a little nicer when adding new branches
Change-Id: I1075c00c5bfc83d868adbc98d8c086f6065e9688
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
|
|
|
|
|
|
|
|
| |
It is unexpected that websocket does not disconnect once
it knows the handshake has failed.
Pick-to: 6.5 6.4 6.2 5.15
Change-Id: I11e64745ffdb01c11ac79739cf7f384ad6cc4590
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
We would error out with a ConnectionRejected if the server accepted
one of the protocols specified directly in the header since we
did not consider those at all.
Fixes: QTBUG-108276
Pick-to: 6.4
Change-Id: Ifbb316c9d4871fd764e03c74caefa10f5b757155
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
|
|
|
|
|
|
|
|
| |
It's _usually_ correct, but if all protocols have been filtered
out then it will be an empty string.
Pick-to: 6.4
Change-Id: I3aa3221b7e36cfd253cd1152b13e57183bf4f905
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a semantic patch using ClangTidyTransformator as in
qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8:
auto QtContainerClass = anyOf(
expr(hasType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes))))).bind(o),
expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o));
makeRule(cxxMemberCallExpr(on(QtContainerClass),
callee(cxxMethodDecl(hasAnyName({"count", "length"),
parameterCountIs(0))))),
changeTo(cat(access(o, cat("size"), "()"))),
cat("use 'size()' instead of 'count()/length()'"))
a.k.a qt-port-to-std-compatible-api with config Scope: 'Container',
with the extended set of container classes recognized.
Change-Id: Ic219197507870fd2b739f2e04ff138021e58d550
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
|
|
|
|
|
|
|
| |
Amends: bbd9f2f4f5e0fda85029fa320f793973ea607c2b
Pick-to: 6.3 6.4
Change-Id: I4af7b167e5f45ad5ead25f6421a2af8638494fd4
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
|
|
|
|
|
|
|
|
| |
Amends: bbd9f2f4f5e0fda85029fa320f793973ea607c2b
Fixes: QTBUG-106937
Pick-to: 6.3 6.4
Change-Id: Ia805df3e3dd8ba61e53592ebfb0a8bfae9184042
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
The signal error(QAbstractSocket::SocketError) is deprecated because
it overloads the function error() and the naming does not match other
similar signals.
Fixes: QTBUG-101756
Change-Id: Ifbddef73ea39b03a6c72b0e09caa2031135d7687
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
License files are organized under LICENSES directory.
Pick-to: 6.4
Task-number: QTBUG-67283
Change-Id: Ief6ca28118c5ce0abe5dccf1854731cf2215e2b6
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The processHandshake function may make no progress and return.
The loop calling processHandshake previously had no way of knowing this
and would happily loop forever despite the outcome being the same every
time.
This was particularly noticeable with any response that doesn't include
the \r\n\r\n sequence the first time we call processHandshake.
Since processHandshake either fails or succeeds, not performing any
partial-reads, we simply move it out of the loop and restructure some of
the code around it.
Pick-to: 6.3 6.3.0
Fixes: QTBUG-102111
Change-Id: I3955e4b90eb1be0a0ef5dfcf8a46921a086a8b49
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sub-Protocol support follows RFC 6455 Sections 4.1 and 4.2. See also
https://datatracker.ietf.org/doc/html/rfc6455.
This patch introduces a new class QWebSocketHandshakeOptions which
collects options for the WebSocket handshake. At the moment, this
contains only accessors for sub-protocols. In the future, it can be
extended with things like WebSocket extensions.
[ChangeLog] Add support for WebSocket Sub-Protocols
Fixes: QTBUG-38742
Change-Id: Ibdcef17f717f0a76caab54f65c550865df1ec78d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
readyRead() signal had been connected with QueuedConnection which caused
disconnected() signal to sometimes come before last message signals of
a connection. Reasoning for this was some issue regarding SSL sockets,
but there is a good chance it has been fixed since then.
Removing this doesn't seem to cause hangs now at least.
Fixes: QTBUG-100054
Pick-to: 6.3 6.2
Change-Id: Id465916d111a5520f4039cf57f822918f3afbca0
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
|
|
|
|
|
|
|
| |
Socket options need to be set after connectToHost() to take any effect.
Change-Id: I006a8c59ba1c78d5edaa77d545bb0f640b7224fe
Pick-to: 6.3 6.2 5.15
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
|
|
|
|
|
| |
Fixes: QTBUG-80700
Change-Id: I7b713fd869ac802d5eee8ebb8d90a2115365b509
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
|
|
|
|
|
|
| |
Fixes: QTBUG-80701
Change-Id: Ic430a7dbc4448fc6d5fc000129a8e08bbed7e77d
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
When setting ignoreSslErrors(List<QSslError>) during the sslErrors
signal handling the call got ignored. Only the internal config for
creating a QSslSocket would be updated but not the current QSslSocket.
The request of the caller to ignore specific QSslErrors would be
ignored.
Pick-to: 5.12 5.15 6.2
Change-Id: I6aaea2111fe1d26e07e6eaaa7532ae1b14a187a8
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
By parenting them. And to do that without crashing they need to be
allocated dynamically.
A couple missed "parenting"s caused the object to not be moved to the
other thread when the websocket was moved. This caused it to print
warnings when the timer was started and stopped since this cannot be
done across threads.
Fixes: QTBUG-83722
Pick-to: 5.15
Change-Id: Iee60fe1c498f8f6d1e0c2cfcb2923bd5b9560acb
Reviewed-by: Jesus Fernandez <jsfdez@gmail.com>
|
|\
| |
| |
| | |
Change-Id: I7b3d96575073eb6537b40286c027074969bf8076
|
| |
| |
| |
| |
| |
| | |
Task-number: QTBUG-82605
Change-Id: Ibaa722ae26a71680426cecc3a0e25acc72d9527b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This change allows the user to set a lower allowed frame/message size
for reception. The purpose is to avoid an attacker to exhaust the
virtual memory of the peer.
Fixes CVE-2018-21035
[ChangeLog] Added public API to set the maximum frame size and message size
Task-number: QTBUG-70693
Change-Id: I5dc5918badc99166afdcc8d9c6106247a9f8666f
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
|\ \
| |/
| |
| | |
Change-Id: Ib31d3b50e4498cdfc55b68ebc5993750b5ee7ce1
|
| |
| |
| |
| |
| |
| |
| |
| | |
The Qt version was added in 5.14 "for use as eventual replacement for
QString::SplitBehavior." Move another step closer to that goal.
Change-Id: If65be10a7c86e7b4173fd31f1d277c63c6accb0a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|\ \
| |/
| |
| | |
Change-Id: Ib6762714c19354c7adbf0c032d2f9995f576114f
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit 938ad6373415fa8b0767a987c37ce51ec546859f.
Reason for revert: Was undeprecated and replacement removed
Change-Id: I79d6e931d72ec518a43fe058e1067b3754f6cf05
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
|\ \
| |/
| |
| | |
Change-Id: I7434fcdb376d1227fff3ebe28f614736e7efb395
|
| |
| |
| |
| |
| |
| |
| | |
Because insertMulti is deprecated
Change-Id: I3965ea7159b2516b35c45072115eba1ab621b89a
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Use 'socketError' instead.
Task-number: QTBUG-80369
Change-Id: I30527721677be0fc0f71ca33b08f608472bc8b71
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
|/
|
|
|
|
| |
Task-number: QTBUG-68419
Change-Id: Icdc41079cb946d4316cc0ec2ae40522e6de52725
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
|\
| |
| |
| | |
Change-Id: Icd1a2fd565d5d85ac6d1378578a92dbb1a9692ce
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
No longer add port to Host header in WebSocket handshake unless it was
explicitly specified in the URL.
This change fixes issues with some WebSocket servers rejecting the
connection if the Host header does not match the URL.
Fixes: QTBUG-77526
Change-Id: I9b028ce434416e61cae7b217d2eafe621d2660b4
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
|/
|
|
|
|
|
|
|
|
|
| |
Header ends with \r\n\r\n but there might be more data inside the
tcpbuffer
Never read past the header
Task-number: QTBUG-70000
Change-Id: If3d4cb362646e43a91faf00f89e50510ff00fa56
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Gerrit ate my change and somehow created an impossible state where a
patch was able to merge due to its fix but couldn't actually pass its
tests.
Amends 6e1fa958c289de639753a60a9384bd94db0e91a8
Task-number: QTBUG-77830
Change-Id: Iedc23616816bb2c1758969a1d76b9536b509c38a
Reviewed-by: Ryan Chu <ryan.chu@qt.io>
Reviewed-by: Jesus Fernandez <jsfdez@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the processing of QWebSocketFrame is not done and waiting for more
data, QWebSocketPrivate::processData should return the control and wait
for next readyRead signal.
Continue the change of b2fc794ffaf48c9d9c401b54cf39ea0220617a27
Change-Id: Idf5af0710267e59e63b8e234d6dab5843d821696
Reviewed-by: Jesus Fernandez <jsfdez@gmail.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
|\
| |
| |
| | |
Change-Id: I2eaffbe6e9519a78d0f8663c0870f24cb006d222
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Asynchronously process socket frame in QWebSocketDataProcessor::process.
If the processing of QWebSocketFrame is not done and waiting for more
data, QWebSocketDataProcessor::process will return the control and wait
for next readyRead signal to continue processing the unfinished socket
frame. QWebSocketDataProcessor::process gets timeout after 5 seconds,
and then an errorEncountered signal will be emitted.
Fixes: QTBUG-74464
Change-Id: I03b7f874c1c266617e7eadf59c59ae43fa8540ce
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
|/
|
|
|
|
|
|
|
| |
The use of QTime for determining intervals is deprecated:
qwebsocket_p.cpp:1214:61: warning: ‘int QTime::elapsed() const’ is deprecated: Use QElapsedTimer instead [-Wdeprecated-declarations]
Change-Id: I26e1dabcba5ba54a4fead02b43c3fe7ace740be0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
|
|
|
|
|
|
| |
Fixes:QTBUG-73689
Change-Id: I5993eb38a8fc45a06a8ced46f71034e4b87ec67b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
|
|
|
|
|
|
|
|
|
| |
On macOS it will only allow proxies in a PAC script to use http/https
protocols, so this enables them to work by automatically setting these
as the type instead.
Change-Id: I66589057d40d135229cbae4986ef0819287ea69a
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
|
|
|
|
|
|
|
|
| |
No need to keep the CRLF ending of status line.
Task-number: QTBUG-67424
Change-Id: I7f94c7bedf40412b338c56cfe59751f6a9e78f0a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
|
|
|
|
|
|
|
|
|
| |
Implement the QWebSocket API using HTML WebSocket.
Change-Id: I2284f8606d512943d2abc2a96fc48effcc45a786
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
|
|
|
|
|
|
| |
Change-Id: I994b34614b2e2ee95fed145e7f5dcd873ff7c3f4
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
|
|
|
|
|
| |
Change-Id: I087b72412db19f34b8e890ddc6a3a0fcdd434141
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Some private classes had a q_ptr pointer shadowing
the QObjectPrivate::q_ptr pointer. Q_Q casts the QObjectPrivate::q_ptr
pointer to match the public class so there is no need to store a
different pointer.
Change-Id: I8f5c4323b1dcf45a9796c0dd9f522bdbc63add18
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|