| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QWebSocketServer::nativeDescriptor() and its setter were documented
twice, with the duplicated versions under Qt6-specific version check
macro and marked \deprecated.
QDoc still parses those in Qt5 as it doesn't respect the version
guards - remove the offending comments for now.
Fixes: QTBUG-79816
Change-Id: Ie40190c9d32f91efd3428b7f884c9ad923a2bb0e
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
|
|
|
|
|
|
|
| |
Task-number: QTBUG-78690
Change-Id: Ie1de2c3cf46edca2b1441ff94a9bb50cb507c057
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
And rename the int-version of the getter to enable the scenario where
someone does not have chrono.
From the 5.14 API change review.
Amends 2e54dbe86eac61e87782a138dbcc158cb6b10cd9
Change-Id: Icf2f2a3aebc2216defd0a3a569544c4270ddf05a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
|\
| |
| |
| | |
Change-Id: I4052a4c238a0c59b1a0fc01ad3fd6ee6b714595b
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This fixes two issues in sendBinaryMessage(), one
observed, and one theoretical:
1) WebSocket send() does not accept data views backed
by SharedArrayBuffer, which is the case for heap memory
views when threading is enabled.
2) We have no way of observing for how long send() will
retain the memory view passed to it. This means we
don’t know when the QByteArray can be safely freed.
Both can be solved by copying the payload data to a
separate ArrayBuffer, whose lifetime can be managed
by WebSocket.
Fixes: QTBUG-78078
Change-Id: I73209080db66f38b971f2c8a727b43402357b1a9
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
From API review.
Amends 2e54dbe86eac61e87782a138dbcc158cb6b10cd9
Change-Id: Ie55a3ef076e042e4461397996e19bf7d397c3fb5
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Jesus Fernandez <jsfdez@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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 static function QWebSocketFrame::readFrame used to return a parsed
QWebSocketFrame read from QIODevice. This change make QWebSocketFrame
reusable. It will base on its internal state and keep processing the
incoming data from QIODevice.
Change-Id: Ic6dea59529fa935cdb8034519e633ea67e869674
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The macro 'WAIT_FOR_MORE_DATA' is revised because the processing
state is kept by m_processingState. Remove the unused dataWaitSize and
returnState local variables from QWebSocketFrame::readFrame.
Change-Id: I8e270c5c7117b170159d4fb3b2bf1531a9cd5334
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
To reduce the dependency of each state and remove local variables
(bytesRead, hasMask, and payloadLength) from QWebSocketFrame::readFrame,
this change breaks down the states of QWebSocketFrame::readFrame into
subroutines. In this change, it uses a readFramePayloadLength function
to handle PS_READ_PAYLOAD_LENGTH and PS_READ_BIG_PAYLOAD_LENGTH cases.
In addition, a missing error-handling is added in the read-header case
if the bytesAvailable is less than 2 bytes.
The variable hasMask is replaced by transiently using m_mask to
indicate whether to read a mask. After reading mask in readFrameMask,
the transient value will be over-written and used in readFramePayload.
To replace local variable payloadLength with QWebSocketFrame::m_length,
m_length is expanded to hold the payload length.
Change-Id: I1c2d197112cef5cea75215923fa28e6f2e6cbef8
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@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>
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Pass a template argument to std::less/greater.
Amends 54ffd0d0a3bf2c77d53e1cdfe04b362f59682cb4.
Fixes: QTBUG-77500
Change-Id: I0b78906090d8b0e3c910104975c08ff79ba9fc12
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
|
|\ \
| |/
| |
| | |
Change-Id: Ifa55b6563a15a91d7906d9e84936c4484323f809
|
| |
| |
| |
| |
| |
| | |
Task-number: QTBUG-74391
Change-Id: I4f5a70c7439b27db2b02907e460b5804d5c6e104
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
|
|\ \
| |/
| |
| | |
Change-Id: I2a1987a687fafb73b3b8368db93bcca7a91bb5d0
|
| |
| |
| |
| |
| | |
Change-Id: Ib9f98683faf2b3a4041371c80a31de1f0902261d
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fix warnings:
websockethandshakeresponse.cpp:151:46: warning: ‘QSet<T> QList<T>::toSet() const [with T = QString]’ is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations]
qwebsockethandshakeresponse.cpp:151:84: warning: ‘QSet<T> QList<T>::toSet() const [with T = QString]’ is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations]
qwebsockethandshakeresponse.cpp:151:94: warning: ‘QList<T> QSet<T>::toList() const [with T = QString]’ is deprecated: Use values() instead. [-Wdeprecated-declarations]
qwebsockethandshakeresponse.cpp:155:47: warning: ‘QSet<T> QList<T>::toSet() const [with T = QString]’ is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations]
qwebsockethandshakeresponse.cpp:155:86: warning: ‘QSet<T> QList<T>::toSet() const [with T = QString]’ is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations]
qwebsockethandshakeresponse.cpp:155:96: warning: ‘QList<T> QSet<T>::toList() const [with T = QString]’ is deprecated: Use values() instead. [-Wdeprecated-declarations]
qwebsockethandshakeresponse.cpp:157:46: warning: ‘QSet<T> QList<T>::toSet() const [with T = QWebSocketProtocol::Version]’ is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations]
qwebsockethandshakeresponse.cpp:157:82: warning: ‘QSet<T> QList<T>::toSet() const [with T = QWebSocketProtocol::Version]’ is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations]
qwebsockethandshakeresponse.cpp:157:92: warning: ‘QList<T> QSet<T>::toList() const [with T = QWebSocketProtocol::Version]’ is deprecated: Use values() instead. [-Wdeprecated-declarations]
by replacing them with a helper function to created a list intersection.
Change-Id: Iee37632517760133ceebae4eda394170293f25c3
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A websocket connection can involve two types of handshakes. First an
optional SSL handshake and second the websocket handshake itself. Either
one can get stalled/stuck if the other side does not answer.
To be robust by default and for easy mitigation by users of websockets
let's introduce a handshake timeout. We introduce a default timeout of 10
seconds which can be customized by the newly introduced setHandshakeTimeout()
method.
One major location where connections got stuck was when the connection
queue was filled with connections waiting for the SSL handshake. Only
connections that have finished this handshake can be processed anyway so
we now add them to the queue once they are fully ready to start the
websocket handshake.
Task-number: QTBUG-63312
Task-number: QTBUG-57026
Change-Id: Ia286221f1d8da1000e98973496280fde16ed811d
Reviewed-by: Alf Crüger <a.crueger@baxi-innotech.de>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
|\ \
| |/
| |
| | |
Change-Id: I43320389826b0f0deac412bf37df9232f2e68a33
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This follows what was done in d28c9f6a for Qt Quick Controls 2.
The latest import version (e.g. 1.14 in Qt 5.14) will automatically be
registered whenever the Qt version is bumped.
This avoids needing to wait until a new type is added (or a new
revision is added to an existing type) before being able to use the
newest Qt Quick version.
Change-Id: I3a2232d5f7418ec99441a71fb70d88835dc61a61
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|\ \
| |/
| |
| | |
Change-Id: Ic2ff163b19d51fae2c9f2f53c5c046912ab2bc62
|
| |
| |
| |
| |
| |
| | |
Task-number: QTBUG-73739
Change-Id: Ia7aad40aa100b168b9cf2aae511473ce88820a41
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|\ \
| |/
| |
| | |
Change-Id: I8c230768cbb0727da162e504cf18bcc05a43c3dd
|
| |
| |
| |
| |
| |
| |
| | |
Fixes:QTBUG-73689
Change-Id: I5993eb38a8fc45a06a8ced46f71034e4b87ec67b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
|
|/
|
|
|
|
|
|
| |
And compile again after those got changed in qtbase.
Fixes: QTBUG-73728
Change-Id: Ibcd6af650ed1ceb4f9218a49e9a3c2ca466018bb
Reviewed-by: Liang Qi <liang.qi@qt.io>
|
|\
| |
| |
| | |
Change-Id: Ia08fda4945ea3fd0b7b13f6f65963c7b4fa31468
|
| |
| |
| |
| |
| |
| |
| | |
Fixes: QTBUG-72664
Change-Id: I8bd90f8676835d8f7bec135ad3e6c6b3e9cd9d9a
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
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>
|
|\ \
| |/
| |
| | |
Change-Id: I297fa8021bd7520851d139c16b97671d41156919
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This also has the benefit that binary data is no longer
accessed via a global.
Change-Id: I2db744696fe88ca03f55897016d9d38e302f820b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add an empty dependencies.json to avoid the implicit QtQuick dependency.
Task-number: QTBUG-70264
Change-Id: I67b0f8cee04d3cd255c9df3c9bc7caf79ffdf9a9
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Found by clazy
Change-Id: I0d5acebcc1ced28fe4a2f659a1017a33d2e47f79
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
|\ \
| |/
| |
| | |
Change-Id: Ie28fec3c7ddd160b29529841db55a79ae7bc53df
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|/
|
|
|
|
|
|
|
| |
Implemented relying only on \r\n\r\n at the end to be sure that HTTP
request is fully received.
Task-number: QTBUG-70000
Change-Id: I388dca2ce9ef57ef4f4d7a9b6bc22c47ffe42235
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Marks the old functions as deprecated and adds new safe versions.The
new functions give access to the native descriptor safely. It also
fixes the original functions in Qt 6.
warning: implicit conversion loses integer precision: 'qintptr' (aka 'long long') to 'int'
Change-Id: I59177905af0181912d2e7824ce68265cb8ee03d9
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
|
|
|
|
| |
Change-Id: Ic7ce11f1631197e6ee019b66c0d7ec56590c5ab5
Reviewed-by: Edward Welbourne <edward.welbourne@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>
|
|
|
|
|
|
| |
Change-Id: Ibad1bbb351d14ab0de140875d2969b7da483eb21
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
|
|
|
|
| |
Change-Id: I120dcb26eb451930d02e452cc47262eda44cc77c
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
|
|
|
|
|
| |
Change-Id: I9e2b2ff177aa921f7f86319de4a229c1a8a4c410
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
|\
| |
| |
| | |
Change-Id: Iffe66da51d3b7b38d04ca3c185b3b003b157f886
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
All control frames should be limited to 125 frames.
https://tools.ietf.org/html/rfc6455#section-5.5
Task-number: QTBUG-62949
Change-Id: Id9b5a431faab6ff6edf7dc2e5c3525e999bc04ea
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
|