| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
- "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>
|
|
|
|
|
| |
Change-Id: Ice7ad51cbbde0ef2459642309c32dd392463754d
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
|
|
|
|
|
|
| |
Change-Id: Ib302db81e0667d0c89c1da8611639db0811ff9f3
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
|
| |
Task-number: QTBUG-37228
Change-Id: I246b858694ea456bce9a0fc4ac963a83502fd058
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>
|
|
|
|
|
|
| |
Task-number: QTBUG-36762
Change-Id: I239bdd06252fb90056a687ace8540bb91b0055a1
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>
|
|
|
|
|
|
| |
Task-number: QTBUG-36676
Change-Id: Ia93751e5a972adf6434b0d749376e2a8c0619514
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The socket is put into an owning QScopedPointer. But if its also
put into the QObject parent-child chain, it will get deleted when
the QWebSocket is destroyed. In the dtor of the QWebSocketPrivate
class m_pSocket will thus already be destroyed and thus be a
dangling pointer.
This crashed the QWebSocketServer test reliably for me on exit.
Change-Id: I7f06e933bfed832e66b943542c351cde639c9465
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The server test sets an empty identifier which results in a
headerLine containing "Server: ". The split then yields a list
with a single entry ("Server"). Calling [1] on it asserts then.
QFATAL : tst_QWebSocketServer::tst_connectivity()
ASSERT failure in QList<T>::operator[]: "index out of range", file
/ssd/milian/projects/compiled/qt5/include/QtCore/qlist.h, line 476
Change-Id: I3e5c4750b304b2a4a5669a39e2d65a6b3e4e99cf
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>
|
|
|
|
|
| |
Change-Id: I3e265ccba334301444611a8013568ba52cca5bcd
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>
|
|
|
|
|
|
|
| |
Set the default error and error string to match those of QAbstractSocket.
Change-Id: I96277ecda1f56da4de7509a22bcab86df8064e7c
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
|
|
|
|
|
|
|
|
|
| |
When calling setReadBufferSize() and setPauseMode(), the internal socket
is not yet created. So we cache these values and apply them when the
internal socket is created.
Change-Id: I4299232342438c7a6c52fa8ea4a95461b3f85ebf
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
|
|
|
|
|
| |
Change-Id: Ifc8cef479147de9fdd9c382ff09be21056cb3e68
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
|
|
|
|
|
| |
Change-Id: I8d96bb2b5c1cf211de50939dc2141572750a4b70
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.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>
|
|
|
|
|
|
|
|
|
| |
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: Id72fe27cec606e7f02b8e9ac1d0d763890e86a95
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
And do the same for QByteArray.
Instantiating the default constructor uses QArrayData::sharedNull() for
the d-pointer which is the cheapest constructor in memory and
instructions.
Change-Id: I1ceaafbc0c0cb1ccc5690edba89ea1100f30b3cd
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
| |
Change-Id: I6cb89b981b70f10510319bfb51b77874e2a4d85a
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
|
|
|
|
| |
In case of processPing we need to make a copy that potentially detaches
when masking is requested, but pings are < 125 bytes.
Before this code would copy the byte array in the same way much earlier.
Change-Id: If0592bb4b508eeb11fdbf05c4bb98b9679ed0549
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
warning: ignoring return value of 'qint64
QWebSocketPrivate::writeFrame(const QByteArray&)', declared with
attribute warn_unused_result [-Wunused-result]
For pings the result is not relevant since they are one frame only.
Change-Id: Iaf958e3e1a333f8d3c0b0f9ba56f7ab58e4900f9
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
| |
Change-Id: Ice4826e7670cffa791250a95387ac1121ddc4089
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
| |
Change-Id: I9da963570b174b9a5a33e65cf144402677b4bab5
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
| |
Change-Id: I8543a74a9b3c8c1b45d9e0e12223072b6637199b
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: Iff0bd801a2dc4cce9b867e9a83320d0f9a716ab3
Reviewed-by: Steven Ceuppens <steven.ceuppens@icloud.com>
|
|
|
|
|
| |
Change-Id: I137ac180b19228e0a5683e21ca87e3fe2db9f97b
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
| |
Change-Id: I5e1176711885ff698b9c05034785adc9a0612ccc
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
| |
Change-Id: Icd293f832e2d7a6272d4953c1994065d16222375
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Correct placement of curly braces
- Remove commented-out code
- Remove superfluous qDebug statements
- Add missing QT_BEGIN_NAMESPACE declarations
- Add move semantics
- Add cleanup handling to QWebSocketServerPrivate
- Add error handling to handshake response, QWebSocketServerPrivate,
QWebSocketServer, dataprocessor
Change-Id: I0690dc2c444fd6fc0db974d1459bf41bd8c31d40
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
| |
Change-Id: I1c7059a8e581ce5179c00f187b03f59fbed63ba6
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
| |
Change-Id: I4eeab1521054e4f4921d25c6a990eeb7486443cb
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
|
|
| |
Add license headers
Change-Id: Ied74cb3db6ceed6c3f361e4afac860a7a3fb7676
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
| |
Change-Id: I510e5e8f263d3ea08dd3d623b054d06b2911c6d6
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
| |
Change-Id: Ibff22b277b89379dc31b0b7a8a02547e12bff58e
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
| |
Change-Id: I1b450bf35760e8a5157cb1013f4668815640be5d
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
|
|
| |
Add bigendian conversion of masks to unit tests
Change-Id: I3f23fb62aac1c6d06e5fafb1bd4bc47cc03765ce
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
| |
Change-Id: I24d336e960038dea235b371449b5a25ca86a7c93
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
| |
Change-Id: I3582e4ebc6aa275a10dd03b9189cafdc72dc236f
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
| |
Change-Id: I789cd780697aedbca7a90a5991df00b2c7e9ec98
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
| |
Change-Id: I81248b9af104c0b3d37c9cfcef250a102f4b1d32
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
| |
Change-Id: I1f96d5e4e327eae211fd6b458168e1f7607e2dcf
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
| |
Change-Id: I23d9e75413c04a8a2f43ea0b940a0bab33d8d8de
Reviewed-by: Steven Ceuppens <steven.ceuppens@icloud.com>
|
|
|
|
|
|
|
| |
Renamed all getXXX() methods by XXX() methods.
Change-Id: I54f52eb5dfc7342b7aecafb3ec65aa54e7b20d13
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|