| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The "\page" command for QDoc, used to construct a standalone
documentation page in the output documentation of a project, was able to
take a second argument, apart from the first argument representing the
name for the generated documentation page, that roughly represented the
type of the page that was to be generated.
This second argument was not actually used by QDoc, such that it had no
meaningful effect.
QDoc was recently modified to not support this second argument,
internally, and officially removed its use.
For technical legacy reason, QDoc will still support the usage of a
second argument for a "\page" command, albeit it will do nothing, as
before.
To avoid confusion for future readers who might not be aware of the
history of the "\page" argument and that will not find an explanation in
QDoc's documentation anymore, the usages of the second argument in
"\page" commands are now removed.
Change-Id: Ia41f57d5afd76b0c369f58b3f9c25854e55a33fc
Reviewed-by: Topi Reiniö <topi.reinio@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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
Qt 6.2 will be first Qt 6 release for Qt WebSockets
Pick-to: 6.2
Change-Id: I2141785c3f5bf6604418e3d1b8d8c311c916400d
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
|
|
|
|
|
|
|
| |
Pick-to: 5.15
Change-Id: Ic74407b17d03fbfd3077ac1dd4f689a7207ccb51
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
|
|
|
|
|
|
|
|
| |
Also adapt to qtbase 45c0f45e04, Move QAlertLevel and QAlertType enums
into the namespace QSsl.
Change-Id: I3ddbbdaf22127fe0478ce7fac5879ed36bea0b30
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
|
|\
| |
| |
| | |
Change-Id: I7b3d96575073eb6537b40286c027074969bf8076
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|/
|
|
|
|
| |
Task-number: QTBUG-68419
Change-Id: Icdc41079cb946d4316cc0ec2ae40522e6de52725
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@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: 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>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|\
| |
| |
| |
| |
| |
| |
| | |
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: I0988a4119b5bd790d286c16b5647d97d4d95aef0
Reviewed-by: Lars Knoll <lars.knoll@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>
|
|
|
|
|
|
|
| |
[ChangeLog][QWebSocket] It is now possible to use TLS PSK ciphersuites.
Change-Id: I9e96669494cec5e6a4e076fe9f10fcd4ef6358a4
Reviewed-by: Liang Qi <liang.qi@qt.io>
|
|\
| |
| |
| | |
Change-Id: I7ebcdc16a8b65103abfb9640c990eddbeccdef05
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Also sanitize some linking, e.g. by referencing to
the paper by title, not by link.
Change-Id: I95482994ca569001a23a3beb0e3cbe6739f4ed77
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
|
|/
|
|
|
|
|
|
|
|
| |
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: I8c17da1f7e2f0a620e3627fa7f8087f185545c8a
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
tests/auto/websockets/qwebsocket/tst_qwebsocket.cpp
Change-Id: Ie4184b0788b6a0a5a85ca8e4d1547c33f7027ca0
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
After moving the websocket into another thread
current code doesn't work because then the QTcpSocket/QSslSocket
objects reside in a different thread, for instance:
"QSocketNotifier: Socket notifiers cannot be enabled or disabled from another thread"
QObject::moveToThread(QThread*) also moves QObjects's children,
therefore their internal socket objects need to be children of QWebSocket.
QWebSocket has ownership of the internal socket, and the
smart pointer is not needed any more.
Change of cleanup code to prevent crashes with clang/msvc builds:
QWebSocketPrivate is a scoped member of QObject (not QWebSocket)
and is destroyed after QObject destructor body was executed,
and so m_pSocket&co had already been destroyed (being children)
when the destructor of QWebSocketPrivate is called via the
scoped pointer.
Analogous to 64927e04f202d33b9a9a1f94141ef692c0b513ac
Change-Id: I1ade6cda3fa793c30332cc5e103025e2dda3c78c
Reviewed-by: Luca Niccoli <lultimouomo@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
| |
| |
| |
| |
| | |
Task-number: QTBUG-40842
Change-Id: I02787a0e55701966e564a312d51297f4160bd89a
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
|
|/
|
|
|
|
|
|
|
|
|
| |
Request headers are not yet handled, only the QNetworkRequest::url() is
taken into consideration.
[ChangeLog][QWebSocket] Added open(const QNetworkRequest &) and request()
Task-number: QTBUG-40842
Change-Id: Ia2e10f22c79b0a085afb9a2eb8437b7a73d4a045
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
| |
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.
Change-Id: I8467410bfad44e8d3fe6bd5724c61bb0c07c91f9
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1.) The websocket qml types page is now hooked into Qt's QML Type by Module
page.
2.) Correct incorrectly documented import statement for Qt.WebSockets
module in QML.
3.) Add missing \since tags (see QTBUG-36775).
Change-Id: I1321db70215fcd16cfbd77dd71a459244241d8a3
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
|
|
|
|
|
|
|
| |
- Added LICENSE.LGPLv3, LICENSE.GPLv2 & LICENSE.LGPLv21
Change-Id: I0586e35a7aa99be1b5b3bda580b05897f451acbf
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
|
|
|
|
|
|
|
|
| |
- "WebSocket" is one word, with uppercase 'W' and 'S'.
- "HTTP"/"HTTPS" is fully uppercase
Change-Id: Ice3a50c94394433c97f7347291af5cda69b234ce
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
|
|
| |
Task-number: QTBUG-37149
Change-Id: Ic0c28928404fc515de40e6fdff11849cdb2929d6
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
|
|
|
|
|
| |
Change-Id: I8fca0df0ea66adba0898d95f8249ea1b7f33892a
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
| |
Change-Id: I9773492d3673d8aabdb4dd178be6af12eca7ba74
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
|
|
|
|
| |
Created a QMaskGenerator abstract base class to serve as a basis for
user specific mask generators. Added the possibility to override the
default mask generation in QWebSocket.
Change-Id: Iaa02b44193f854d103b5f352617789175fe61f89
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
New line characters (\r\n) in the resource part of a url and in the origin
string can be used to forge the http header and can lead to insertion of
unwanted header entries. This can be an indication of an attack,
so QWebSocket immediately refuses a connection.
Change-Id: I9cdb309bfbe7025ad675925e6ea3e038476a1fd6
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
|
|
|
|
|
|
|
|
|
| |
Removed the mask parameter because a web socket client does not have
a choice between masking and not masking.
Change-Id: I3c33acc235bb2a99476abb6201e6dbb6f881dd70
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Inside the ctor of the private data, the QObject has not yet
been associated with the data. Thus, accessing it indirectly i.e.
to setup private signal/slot connections, will trigger crashes.
Now we delay accessing this API and call an init() function manually
in the parent QObject-inheriting class.
Change-Id: I2c3ce7335c54d42af6bce87de867ee0ef197efc6
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
| |
Change-Id: I3f69a2b0ca81e1e003200bb8e0a337b9532e64a0
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
|
|
|
| |
Changed isValid() to only return true when the socket is also in connected
state. Also updated the documentation.
Change-Id: Id80dbc1f28c82bef19984c5ed7b34a7d474ee011
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Removed the setSocketOption() and socketOption(0 methods as they are
not really relevant for web sockets. Also, internally for the underlying real
socket the LowDelayOption and KeepAliveOption are already set.
If ever needed, these methods can be added later.
Change-Id: Ibfa279990c5277970eaa2dbc2dd3a7d0cce7154e
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
|
|
|
|
|
|
|
|
| |
Clarified which versions are supported and that subprotocols
and extensions are not supported. Fixed some typos.
Change-Id: I99ef2fbbf74c287bea7d1b7a07881bf0542135ff
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
Removed subprotocol and extension getter functionality, as this
is currently not supported by QtWebSockets. I left the backend
implementation intact (in the _p files), for future reference.
Change-Id: Ia00739f6f225cd557ceb10b40c83fc81d98aae0b
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
|
|
|
|
| |
Renamed the write methods to sendTextMessage
and sendBinaryMessage respectively. This makes
the code more readable.
Change-Id: Ie49abf07a37f54c84bd01c5c788d2e42b28bcfdd
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
| |
Change-Id: Ida5c46e3e42685f5e78f2aee657d12af62286810
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
| |
Change-Id: I9fc1d996584c1136efca4412fe76c570cc4201ec
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
| |
Change-Id: I309104e808cd6749d8f9430fcbcf170c78056730
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
| |
Change-Id: I9da963570b174b9a5a33e65cf144402677b4bab5
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The QWebSocketServer::waitForNewConnection() was just calling
QTcpServer::waitForNewConnection(), which was not correct because
a connection is only complete when the handshake succeeds.
Waiting for the handshake to complete would need a separate thread
for the handshake handling code, which would complicate the code a lot.
It was decided to leave out all waitXXX() methods from the module,
as it is easier to add this functionality later, then to remove it.
Change-Id: I778bae45b67f81e151ad2362f772c75e9f537ff0
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
| |
Change-Id: Ib616c4c932cb2797036d2d821af7726fcfe2f877
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|