| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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: 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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This allows to correctly use IPv6 literals and also
deals (correctly) with a port (if it's set at all).
Task-number: QTBUG-68245
Change-Id: I6d29543887c4ab58d70f0970a6f0a1b822c301df
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
|\ \
| |/
| |
| | |
Change-Id: If3f9affe2d1768ea9fc741d9be2a749d3baf2153
|
| |
| |
| |
| |
| |
| |
| |
| | |
Because it was connect-ed twice.
Task-number: QTBUG-67778
Change-Id: Ia19d2471c148c615faceb7548566d819683c2193
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add the well-known 'bytesToWrite' function to QWebSocket. Previously
the only way to know how many bytes were left to be written was to
make a guesstimate on the overhead your message would get and then
keep track of the amount sent using the 'bytesWritten' signal.
The tests compare using '>' because there is overhead from the headers.
[ChangeLog][QWebSocket] Added the bytesToWrite function to
QWebSocket. Call this function to see how many bytes are left to write.
Change-Id: I82f17a98b582ee3bc02f0c47597b4a6717761f12
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
|
|
|
|
|
| |
Change-Id: I580d2170f76a501dd95c8377d3f480b65a983d53
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sending an empty “Server” header during handshake
will make Safari error out with
“WebSocket connection [...] failed: Invalid UTF-8
sequence in header value”
This is an open bug in WebKit:
https://bugs.webkit.org/show_bug.cgi?id=139298
As far as I see, “Server” is not a required handshake
header as specified in RFC 6455 section 4.2.2 (5),
and we can omit it if the server name is not set.
Change-Id: Icec142f867813c16e3e3baa1378582164242e049
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
All this home-grown parsing should be replaced with code from the qhttp*
classes. This would result in a big refactoring though, so this commit
at least tries to make the header parsing RFC compliant and not choke
on perfectly legal "Header:Value" messages.
Change-Id: I14303610dc7187b8d8595568fb221c18e4e0d515
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
|\
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/websockets/qwebsocket_p.cpp
tests/auto/websockets/qwebsocketserver/tst_qwebsocketserver.cpp
Change-Id: I40922fab198a09a3fbba1b2f11b42f2d40e53720
|
| |
| |
| |
| |
| |
| | |
Change-Id: I69f37f9304f24709a823fffd14e676c097712329
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
| |\
| | |
| | |
| | | |
Change-Id: I3ae5df71f201cfdb9a4c9e7d90a60d1f9792700a
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If QWebSocket fires signal sslErrors the
QSslConfiguration of QWebSocket is not updated.
So client application cannot check it in
implemented slot.
Fix this by calling the update method like
for encrypted signal.
Sibling of QTBUG-40401.
Change-Id: I18b39f6b6a0791ae67fc2bff5cf2c04a22b0ab85
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In the rare case where the handshake was received before the signal and
slot was connected it would never invoke handshakeReceived and the
server would keep waiting.
Task-number: QTBUG-64026
Change-Id: I86d54031d2583b6a0cf2b5348889b5ef859b9aab
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: Ic41f3745e800ba54153b36f269017075297c2402
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Change-Id: I509332fa23bcf2cf2e6c10b7edacb4157f025ff9
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | |
| | | |
Conflicts:
examples/websockets/simplechat/chatserver.cpp
Change-Id: I98697cef4c05516b5b4122ad81c084546d57115f
|
| |\ \
| | |/
| | |
| | |
| | |
| | |
| | | |
Conflicts:
.qmake.conf
Change-Id: I4af142703e469b56236b73335a93f6960534c0f1
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Found by clazy and fixes "clazy-strict-iterators" warning.
Change-Id: I8f50c92ac054d627499440d593faa43ed5b4ad4b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Avoids a crash that would happen if readyRead was emitted after
calling ::close on the websocket.
Task-number: QTBUG-59179
Change-Id: I1e7bd19d99ee068b8699014fac9a72f839632c85
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The overload selected when you pass a single object pointer is to
disconnect all signals with that object as a receiver. We want to
disconnect all signals with that object as a sender, which is done most
easily by passing no explicit arguments.
Task-number: QTBUG-62667
Change-Id: I3dd9c5aced9160510bff527355ecfbedded690aa
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Romain Pokrzywka <romain.pokrzywka@gmail.com>
Reviewed-by: Liang Qi <liang.qi@qt.io>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: Ie16c88fb0a215efe5f152ea2d12c984f8d9e0878
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Change-Id: Ic1f4b357138457eb33ac9154a280f499664c3c78
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
|/ /
| |
| |
| |
| | |
Change-Id: I0988a4119b5bd790d286c16b5647d97d4d95aef0
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|\ \
| |/
| |
| |
| |
| |
| | |
Conflicts:
.qmake.conf
Change-Id: I3dd9c568ed9160510bff527355ecfbed5d4690a9
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Qt for WinRT now requires Visual Studio 2015.
Change-Id: I8996f2855476315819532df89c6754aa162bd02e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|
|/
|
|
|
|
|
|
|
| |
This makes it secure, instead of insecure, and requires no seeding.
Task-number: QTBUG-61694
Change-Id: Ia53158e207a94bf49489fffd14c782bd4ec24946
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
|
|
|
|
| |
Change-Id: Ie970ce470672f1c849470b0eaf7fe39758341e37
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
|
|
|
|
|
|
| |
That's the correct place and works with C++11 attributes.
Change-Id: I7814054a102a407d876ffffd14b6a2fed3744b03
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This method allows a listening port to process connections with
different protocols. It lets the websocket server handle a TCP
socket, upgrading it to a websocket
[ChangeLog][QWebSocketServer] Add support to handle external QTcpSocket
Done-with: André Klitzing <aklitzing@gmail.com>
Task-number: QTBUG-54276
Change-Id: Ia36b481dc87d6f3806e9f1e61e75e528640f1937
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
.qmake.conf
Change-Id: If50b73b1f1e293269404bd8b38088119a0f59f1f
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Use QUrl::setAuthority() to parse host and port.
The request is invalid when having username or password in Host.
Task-number: QTBUG-57357
Change-Id: I4e7c0370794dce15359d372a1e36dc0383083204
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In QWebSocketDataProcessor::process() the signals text(binary)MessageReceived
are emitted before clear() method. If signal handler blocks loop
(for example, using QDialog::exec()), clear() will be called only after
resuming loop. It may lead to the data corruption due to the fact that
QWebSocketDataProcessor clearing won't be performed before the new data
arrived.
Task-number: QTBUG-55506
Change-Id: Ib7016a91d3987dec7c1af977b17f86a53568c413
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Websocket server always constructed QWebSocketHandshakeRequest like for
non-secure socket without checking SecureMode. This led to the fact that
secure socket had "ws" scheme.
Task-number: QTBUG-55927
Change-Id: I881766f55182136072fd23f3fefe93ea60f3d27d
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Value of NonSecureMode enumerator depends on QT_NO_SSL. If Qt is built with
QT_NO_SSL defined, NonSecureMode is equal to 0, otherwise it is equal to 1.
It may lead to problem if user built app with libs where NonSecureMode = 0,
but run it with libs where NonSecureMode = 1.
[ChangeLog][QWebSocketServer] SslMode::NonSecure enumerator now always has
the same value (1) regardless of SSL enabled or disabled.
Task-number: QTBUG-56129
Change-Id: If17137eff4b19015697c827a985ef89dd95a5611
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Method onSocketDisconnected has never been called, so WebSocketServer did not
handle closed connection properly. Moreover, socket was not freed in time
and this led to increase in memory consumption
Task-number: QTBUG-56414
Change-Id: Ib57f5b88413ffeef4f296a260245ba0a8d25adb2
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
|
| |\
| | |
| | |
| | | |
Change-Id: Ia8c2930d5bf681227cef0730cdf0dca6d068722f
|
| | |\
| | | |
| | | |
| | | | |
Change-Id: I912302259dc84aa15ca8bb8a498c5c5b148c2864
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Change-Id: I4c9f3a50c24f945c0f14010a10ff808d8adf7845
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Task-number: QTBUG-57288
Change-Id: I45978f7c267c8c8742b0cba5bc9469535e2e6f5b
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
|