summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix for self-signed certificatesKurt Pattyn2014-03-122-4/+17
| | | | | Change-Id: I529976e6fc8813d273290e97e86405f51c3efa57 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Return correct error string for known socket errorsKurt Pattyn2014-03-122-7/+37
| | | | | | Task-number: QTBUG-37228 Change-Id: I246b858694ea456bce9a0fc4ac963a83502fd058 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Update documentation.Kurt Pattyn2014-03-114-0/+87
| | | | | Change-Id: I8fca0df0ea66adba0898d95f8249ea1b7f33892a Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Doc: Review documentation Qt WebSocketsNico Vertriest2014-03-119-8/+31
| | | | | | | Task-number: QTBUG-37149 Change-Id: Ia8fe7b11140d31bc231a17bfcc16887f3af0dbce Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Fix documentation warningsKurt Pattyn2014-03-111-2/+5
| | | | | Change-Id: I5790460aab2377144d041c5b2a75ae0208ec5c00 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Fix Google Chrome connection problemKurt Pattyn2014-03-102-4/+21
| | | | | | Task-number: QTBUG-36757 Change-Id: I6a802e93e28b6281fe03aacf001897003310a027 Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
* Make the constructor explicitSergio Ahumada2014-03-011-1/+1
| | | | | Change-Id: I6dcd225de9fee909c4cd1afa70938c2eb7ff819a Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Use const & for your foreach variablesSergio Ahumada2014-03-012-2/+2
| | | | | Change-Id: I6096111284f02f07e1e7864b8795236563d4f6c1 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Prefer to use normalised signal/slot signaturesSergio Ahumada2014-03-011-4/+4
| | | | | | Change-Id: I92322fc3404795bea8442b9b849564d5cd39b367 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Add .tag file and the git-archive export optionsSergio Ahumada2014-03-012-0/+5
| | | | | | | | The .gitattributes and .gitignore files do not need to be present in packaged sources, as they are for people using the Git repository. Change-Id: I37f69ce0dfbc25592c149118137398f96cdeb117 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Fixed missing line separators in qdocconf file.v5.3.0-alpha1Jerome Pasion2014-02-241-2/+2
| | | | | | | | | -needed to get the documentation to build. Task-number: QTBUG-33360 Change-Id: Ifed61ebb39843936ac3e350f26f6accffda78318 Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Remove superfluous setProtocol callKurt Pattyn2014-02-161-1/+0
| | | | | Change-Id: I14f16bbe0a68602265a28d71464727b671be5099 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Catch SSL errors in exampleKurt Pattyn2014-02-162-0/+9
| | | | | Change-Id: Ib9a399789878030361d9bdddd8dbfbb1832cf756 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Mark html page as being utf-8Kurt Pattyn2014-02-161-0/+2
| | | | | | | | FireFox complained when opening the page without proper indication of the encoding. Change-Id: I4f0891699c72d46bcf0cd488e2ecaf095514fabc Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Fix non-strict warning from AutoBahnKurt Pattyn2014-02-161-2/+0
| | | | | | | | When the reserved bits were set to 3, then the connection was aborted. No a close message is sent before the connection is closed. Change-Id: Iab365a4720c6588e5c6ac73813f63d26c3312265 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Rename websockets.pro -> qtwebsockets.proSergio Ahumada2014-02-167-13/+28
| | | | | Change-Id: Ia42316304a37d151b678a9922071bbb090ec87b5 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Adapt copyright headerKurt Pattyn2014-02-1560-60/+60
| | | | | Change-Id: I9773492d3673d8aabdb4dd178be6af12eca7ba74 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Add user configurable mask generationKurt Pattyn2014-02-1512-22/+553
| | | | | | | | | 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>
* Fix multiple emission of received signalsKurt Pattyn2014-02-152-1/+217
| | | | | | Task-number: QTBUG-36762 Change-Id: I239bdd06252fb90056a687ace8540bb91b0055a1 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Use queued connection for readyRead connectionKurt Pattyn2014-02-141-1/+5
| | | | | | Task-number: QTBUG-36757 Change-Id: I4358563d52ecbff7b7e1575c5d34cef30b5fcd52 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Remove checks on return value of sendXXX methodsKurt Pattyn2014-02-133-10/+5
| | | | | Change-Id: If70aa381e377b832f0b44af97e19abf98f3941eb Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Simplify simple chat exampleJędrzej Nowacki2014-02-112-4/+0
| | | | | Change-Id: Ia4e6973e6531017129ae39c89851fbbf3ade76c4 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Check on newline characters in origin and urlsKurt Pattyn2014-02-114-20/+175
| | | | | | | | | | 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>
* Simplify echoclient exampleJędrzej Nowacki2014-02-113-7/+0
| | | | | Change-Id: I773665754089c1f4548712df280289c77d45eba9 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Re-enable QML componentKurt Pattyn2014-02-115-12/+11
| | | | | | | Change-Id: I84948cf414585af841f3e669ddaf18b7a10fb22f Reviewed-by: Milian Wolff <milian.wolff@kdab.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Remove superfluous argumentKurt Pattyn2014-02-091-1/+1
| | | | | Change-Id: I7fa01d47d66411572f3f66f4ed5d8df04ac6b8b0 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Sanitize open() methodKurt Pattyn2014-02-072-6/+3
| | | | | | | | | 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>
* Connect sslErrors signal when a secure connection is establishedKurt Pattyn2014-02-071-0/+4
| | | | | | Task-number: QTBUG-36676 Change-Id: Ia93751e5a972adf6434b0d749376e2a8c0619514 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Fix tst_QWebSocket::tst_invalidOpen for catch-all DNS setups.Milian Wolff2014-02-061-5/+5
| | | | | | | | | | | | Instead of relying on a hostname which might still be resolved in some DNS setups (i.e. always forward to google search or intranet), we now try to connect to localhost port 1 which should yield a ConnectionRefusedError. This way, the test passes for me on my setup. Change-Id: I025824796e94e718a42c4999706f647a72b37659 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Do not double-delete the TCP socket of a QWebSocket.Milian Wolff2014-02-061-2/+2
| | | | | | | | | | | | | 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>
* Do not try to invoke/emit signal on shutdown.Milian Wolff2014-02-062-6/+8
| | | | | | | | | | | | | I'm actually not sure whether this is the right way to do this, but when the object is destroyed, we cannot delay the signal emit. In that case, we just don't emit it at all. This is the old behavior minus the warning: QWARN : tst_QWebSocketServer::tst_initialisation() QMetaObject::invokeMethod: No such method QObject::closed() Change-Id: I0513dd693ef7bfc43621e24361e72e90204fbea3 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Fix assertion when encountering invalid header line.Milian Wolff2014-02-061-1/+3
| | | | | | | | | | | | | 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>
* Do not access QObject API before its private data is initialized.Milian Wolff2014-02-065-3/+18
| | | | | | | | | | | | 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>
* Fix compilation of websocketprotocol test.Milian Wolff2014-02-062-1/+2
| | | | | | | | The versionFromString method must be exported for usage in the test. Additionally, the metatype of the version enum must be declared. Change-Id: I8e0aef28f9902f274cab43f772667ad5a93c4062 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Use QObjectPrivate instead of dedicated d-ptrKurt Pattyn2014-02-059-178/+170
| | | | | Change-Id: I3f69a2b0ca81e1e003200bb8e0a337b9532e64a0 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Replace delete loop with qDeleteAllKurt Pattyn2014-02-053-12/+3
| | | | | | Change-Id: If63acc08307c0a411072a2a37ac52661e7e02594 Reviewed-by: Milian Wolff <milian.wolff@kdab.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Remove superfluous Q_REQUIRED_RESULTKurt Pattyn2014-02-044-8/+6
| | | | | | Change-Id: Ie4e01a82082c45918b55e8588c7322dd359ba8c1 Reviewed-by: Milian Wolff <milian.wolff@kdab.com> Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Comment out QML componentKurt Pattyn2014-02-045-16/+14
| | | | | | | | Commented out QWebSocket QML component because there is still discussion regarding its API. Change-Id: I9a0699e19186f7e9761517fd127ac8a5263c745f Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Add cleanup to examplesKurt Pattyn2014-02-034-0/+20
| | | | | Change-Id: I28b9007a6d35575b11a608645930fa2ed71e7c7c Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Update documentationKurt Pattyn2014-02-031-15/+15
| | | | | Change-Id: I2fb9b20fc316b8b9ed0e1c0b52c4e44882d7f9d5 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Add unit tests for QWebSocketServerKurt Pattyn2014-02-024-1/+376
| | | | | Change-Id: I9ca38aad22a757437943a72669b7ca2bb5db6b98 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Add unit tests for QWebSocketKurt Pattyn2014-02-023-0/+242
| | | | | | | Added basic unit tests for QWebSocket. Connectivity is not tested yet. Change-Id: I38d388d289733777e6ff0253e5b201aca99b0b10 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Remove parenting of QWebSockets in QWebSocketServerKurt Pattyn2014-02-021-1/+0
| | | | | | | | Because QWebSocketServer took ownership of QWebSocket objects, the objects were double deleted, leading to crashes. Change-Id: I51192daba8e8739bc68a94c7fe2a8a972ac9d38e Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Check return value of listen and set appropriate error and descriptionKurt Pattyn2014-02-021-1/+4
| | | | | Change-Id: I2309a51d873812cdc590b5d846a84024b6e28857 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Add private method to set error from QAbstractSocket::errorKurt Pattyn2014-02-022-0/+12
| | | | | Change-Id: I870006bbd5c788bea89f65d5bd25082d1543caf0 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Correct include pathKurt Pattyn2014-02-021-1/+1
| | | | | Change-Id: I7929337d16485a4ec9e95d1eb6037c84634b672f Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Remove qWarning statementsKurt Pattyn2014-02-021-4/+0
| | | | | Change-Id: I7132b8c9b15f625345ef092be3bc0ea466a12f8e Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Update documentationKurt Pattyn2014-02-021-2/+5
| | | | | Change-Id: I35829436b3be543fd133cab58118e62ddfb0e291 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Allow writes only when socket is in connected stateKurt Pattyn2014-02-011-1/+1
| | | | | Change-Id: I3e265ccba334301444611a8013568ba52cca5bcd Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Rename ProcessMessage to ProcessTextMessageKurt Pattyn2014-02-012-5/+5
| | | | | | | | | Renamed to ProcessTextMessage to be consistent with ProcessBinaryMessage and with the method names in the SslEchoServer example. Change-Id: Iaaa732221597a08fca079e8df4df941d673d16a6 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>