summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix DoS vulnerabilityv5.5.15.5.1Kurt Pattyn2015-09-063-9/+57
| | | | | | | | | Add checks on maximum header line length and on the maximum number of header lines. Task-number: QTBUG-48123 Change-Id: I65dbeb53af7aa0dfa137ce31fc2549940559314e Reviewed-by: Richard J. Moore <rich@kde.org>
* Set parent of internal socket objectsPeter Kümmel2015-09-043-19/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-08-191-1/+5
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I3f9a7c0afccb925e1b821ca7191dab4e1855cc21
| * Doc: Updated the list of examples that need generic thumbnail image5.4Venugopal Shivashankar2015-05-291-1/+5
| | | | | | | | | | | | | | | | | | | | One of the example documentation has an image so the list must be more specific. Task-number: QTBUG-41996 Change-Id: I785dad33f227a7e51daf61540f402e67b6609cc7 Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
* | WebSocketServer: use int type for portLiang Qi2015-07-222-8/+14
| | | | | | | | | | | | | | | | | | | | | | QML engine doesn't support quint16 as a QML type. Task-number: QTBUG-46790 Change-Id: I5b01dc06a3256dd41affc035fc507082e1935cc8 Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Luca Niccoli <lultimouomo@gmail.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Doc: Added an overview page and updated the qdocconfVenugopal Shivashankar2015-06-244-6/+118
| | | | | | | | | | | | Task-number: QTBUG-41044 Change-Id: I074573e814de63e009744a11054365fb2f25bdb9 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* | Doc: Add documentation on how to test with Autobahn|TestsuiteLiang Qi2015-06-032-2/+21
| | | | | | | | | | | | Change-Id: Ia18acdc3c54e2bb48209406d2a6f9e156b67324c Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
* | QWebSocketServer: handle new connection after invalid oneLiang Qi2015-05-291-7/+9
| | | | | | | | | | | | | | | | | | | | Manually tested with sslechoserver and sslechoclient in examples, invalid connection from "telnet localhost 1234". Task-number: QTBUG-44866 Change-Id: I19c29c7c5f57eef4f9ae069e105fd1db346fb5c5 Reviewed-by: Luca Niccoli <lultimouomo@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Update plugins.qmltypes for QtWebSockets and Qt.WebSocketsLiang Qi2015-05-263-3/+101
| | | | | | | | | | | | Change-Id: I7cacbce1625015636e92b2fd5f2ade694a97a5c9 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Correct the default port of secure hand shake requestLiang Qi2015-05-221-1/+5
| | | | | | | | | | | | | | | | Task-number: QTBUG-46055 Change-Id: Iefdec32f778d39520802eabb25f4db37f80fdf76 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Luca Niccoli <lultimouomo@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Doc: Document the changes to the QML import statementSze Howe Koh2015-05-221-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | The changes happened in 759b6b12489b68fcbd755398ff9337acefb035a0 [ChangeLog][QML] The import statement has changed from "import Qt.WebSockets 1.0" to "import QtWebSockets 1.0". The old statement is still supported, but it cannot be mixed with the new statement within the same project. Change-Id: I95d75e4a87133c452d2ea43c42593415de882c9b Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Fix qmldir for qmlwebsockets_compatLiang Qi2015-05-221-1/+1
| | | | | | | | | | | | | | | | | | It is not supported to have both "import Qt.WebSockets 1.0" and "import QtWebSockets 1.0" in the same project. Task-number: QTBUG-46205 Change-Id: I71b824b091f4491b8ab5e1eae8290a51159b03e2 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into 5.5v5.5.0-beta1Liang Qi2015-04-152-0/+13
|\ \ | |/ | | | | Change-Id: I29f5a2acb7ba0313d9e2ac2c005a988d208b617e
| * Fixed a crash when destroying the QWebSocketServerv5.4.25.4.2Kimmo Karvinen2015-04-082-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | Lifetime of incoming QTcpSocket/QSslSocket are managed by the QTcpServer/QSslServer and thus the QWebSocketPrivate should clear the pointer to the socket when the socket is destroyed. Added auto test for the crash. Task-number: QTBUG-45331 Change-Id: I6e30e7cdcca22aa810ccc1a1d4d7d77c7cb2c349 Reviewed-by: Steven Ceuppens <steven.ceuppens@icloud.com> Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* | Fix copy constructorLuca Niccoli2015-04-091-1/+1
| | | | | | | | | | | | Change-Id: I2c27bda6523ff84d9ea9178f1e6728bf4defc511 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* | Do not decode the HTTP resource nameLuca Niccoli2015-04-091-2/+3
| | | | | | | | | | | | | | | | The resource needs to be sent encoded in the HTTP request. Task-number: QTBUG-44889 Change-Id: I3c6c56f5fea1553f3b5751de7da0cfc76150f4b9 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* | Always initialize m_handshakeStateLuca Niccoli2015-04-081-1/+2
| | | | | | | | | | | | | | | | | | | | The client-side constructor was leaving it uninitialized, which would sometimes lead to spurious error signals being emitted. Task-number: QTBUG-44893 Change-Id: I7a17f1a16d9a5fe4218beb6d92993c1889ad836b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* | Fix two gcc warningsv5.5.0-alpha1Allan Sandfeld Jensen2015-02-261-2/+2
| | | | | | | | | | | | Change-Id: I549eb67109eba2cfb766eec78377d63ecc34d3c8 Reviewed-by: Nikita Baryshnikov <nib952051@gmail.com> Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* | Doc: Added introductory text about WebSocketVenugopal Shivashankar2015-02-252-6/+12
| | | | | | | | | | | | | | | | | | Also removed an unnecessary \annotatedlist entry in the QML module page. Change-Id: I1af566d3cc784766b4df474e2471e0885ab5e471 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-02-252-3/+8
|\ \ | |/ | | | | Change-Id: I218b5069480f60b88390c8540f01c3dbbee485d0
| * client ping should be maskedLiang Qi2015-02-241-1/+6
| | | | | | | | | | | | | | | | Task-number: QTBUG-42298 Change-Id: I4c01052823ce48b737d30ac2e0ef11836124bc4f Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com> Reviewed-by: Neil Williams Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
| * Fix the build for WinRT/ARMLiang Qi2015-02-231-2/+2
| | | | | | | | | | | | Task-number: QTBUG-44491 Change-Id: Iec007ff83414d333d10609882b11ab4fd485345a Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* | Merge "Merge remote-tracking branch 'origin/5.4' into 5.5" into refs/staging/5.5Frederik Gladhorn2015-02-242-4/+20
|\ \
| * \ Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-02-202-4/+20
| |\ \ | | |/ | | | | | | Change-Id: I96657102802860c8490c162462324e661592d879
| | * fix the port in Host field in handshake requestLiang Qi2015-02-201-2/+14
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-39355 Change-Id: I06993193fe9618ace93552aed573a3eee5de18fa Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
| | * Fix keyword for OriginLiang Qi2015-02-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | In RFC 6455(v13), the correct keyword is Origin. Task-number: QTBUG-44310 Change-Id: I009f079e01e213eb232b0dfc1a441305f3d9e588 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| | * Doc: added qmake to dependenciesNico Vertriest2015-02-161-1/+1
| | | | | | | | | | | | | | | | | | | | | Change-Id: Ib38445f8bf67e3bfe81f5d2d1a30f7b429f30ac5 Task-number: QTBUG-43810 Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
| | * Doc: add description and image for echoclient htmlLiang Qi2015-02-131-0/+4
| | | | | | | | | | | | | | | Change-Id: I7e2adaf19d15842f914be6f946f30d09b7b5532f Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | | Update copyright headersJani Heikkinen2015-02-1638-225/+225
|/ / | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-02-132-13/+16
|\ \ | |/ | | | | Change-Id: Ie23422945b48b33a0608053c5f18700fd8133df5
| * Fix the translation in QWebSocketFrameLiang Qi2015-02-102-13/+16
| | | | | | | | | | | | Task-number: QTBUG-38740 Change-Id: If8df86990686af6811ad3bb21f93448ced946b6c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-01-191-0/+2
|\ \ | |/ | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I6ceee770359e72a026575ea9fee51c3f97561163
| * QWebSocket should remember close code and reasonv5.4.15.4.1Frederik Gladhorn2014-12-291-0/+2
| | | | | | | | | | | | Task-number: QTBUG-42982 Change-Id: I50dbff96d7d64a5213e6ea6ba7bb9429b21b1fb2 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-12-171-0/+2
|\ \ | |/ | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ifee77abab352e92b52a2ddba16447107005e3253
| * Hardcode QtQml version import in .pro fileKai Koehne2014-12-051-0/+2
| | | | | | | | | | | | | | | | | | This allows the plugins.qmltypes file to be updated by just running make qmltypes Change-Id: I0872082645e9d4d8879e3a3479aea80494248894 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* | Rename QML import from "Qt.WebSockets" to "QtWebSockets"Sze Howe Koh2014-12-0110-11/+24
| | | | | | | | | | | | | | | | | | | | | | This is in line with all other modules (e.g. "QtWebEngine 1.x", "QtQuick 2.x", "QtWebKit 3.x", "QtSensors 5.x") The old name is retained for compatibility with code from Qt 5.3. This is achieved by having a dummy qmldir file in the old location. Change-Id: I66576abe5edb44c3338c47b2980f34574129af01 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-11-214-16/+25
|\ \ | |/ | | | | Change-Id: Ifc23e46ef1623cfba93571ff03c6c62a3b2fd117
| * Set parent of internal server objectsPeter Kümmel2014-11-182-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | After moving the websocket server into another thread current code doesn't work because then the QTcpServer/QSslServer objects reside in a different thread: "QWarning: QObject: Cannot create children for a parent that is in a different thread." QObject::moveToThread(QThread*) also moves QObjects's children, therefore the internal server objects need to be children of QWebSocketServer. Change-Id: Ic7e8a564cd87400a4ab7258e3799157ed359c098 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| * Merge remote-tracking branch 'origin/5.3' into 5.4Oswald Buddenhagen2014-11-032-12/+21
| |\ | | | | | | | | | Change-Id: I0e89ede5ea173f2e831c42d250ddb2b21b42b89b
| | * Fix invalid Date header field in handshake response5.3Joni Poikelin2014-11-031-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix invalid Date header in handshake response on systems with non- english system locale. Task-number: QTBUG-40866 Change-Id: If6d5cc55e879eff259698e87c9cda753990245e7 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
| | * Make QWebSocketPrivate::makeConnections() take care of all connections.Christian Kandeler2014-11-031-9/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise all code that calls it has to handle the other connections separately, which is error-prone and has actually been forgotten for the case where the QWebSocket is created via upgradeFrom(). Task-number: QTBUG-39551 Change-Id: I4d1e4faa1594b53e7a8dccc9ce13ef2c323b1c61 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* | | Make the websocket handshake statefullAllan Sandfeld Jensen2014-11-192-39/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The websocket handshake could not handle being split over multiple TCP packets since it was entirely handled in on function. This patch splits it into a socket state making it possible to process over multiple incoming packaets. Change-Id: I3c45892ee6f1bb67062d561e9fbd2d7296f1208e Task-number: QTBUG-40878 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* | | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-10-202-0/+51
|\ \ \ | |/ / | | | | | | Change-Id: I587edb09f88db76917755593bfe0cbb5c460ce96
| * | Also forward the bytesWritten(qint64) signalPeter Kümmel2014-10-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | The signal bytesWritten(qint64) is part of the public API and should be emitted. Seems it was just forgotten. Change-Id: I85a56c22581c6bd3ecc504add34aeeabc76f4d2a Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
| * | Update the plugins.qmltypes meta data.Milian Wolff2014-10-141-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | I forgot to do this when I introduced the QQmlWebSocketServer. Change-Id: I7fd7354cf42f633973e0da71d854594627e2fb97 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
* | | Merge "Merge remote-tracking branch 'origin/5.4' into dev" into refs/staging/devFrederik Gladhorn2014-10-138-3/+11
|\ \ \ | |/ /
| * | Improve the integration of QtWebsockets into general Qt docsv5.4.0-beta1Alex Blasche2014-09-288-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Fix QWebSocket's handling of query parameters with encoded charactersJuha Turunen2014-10-111-1/+1
|/ / | | | | | | | | | | | | | | | | QWebSocket used decoded version of the query part of the URL to construct the first line of the HTTP request. Task-number: QTBUG-41285 Change-Id: If16210f1b92e389dae8b1057a2d911122c31e2db Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Fix QWebSocketServer for clients preferring lowercase http headers.Jorma Tähtinen2014-09-091-9/+9
| | | | | | | | | | | | | | | | | | QWebSocketServer should not use case-sensitive compare to validate http headers for incoming connections. Change-Id: Ie7b8a9f6ca1a0b547eb7a924f6392395f812b0e3 Task-number: QTBUG-40615 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* | Update license headers and add new license filesv5.4.0-alpha1Antti Kokko2014-08-2435-630/+350
| | | | | | | | | | | | | | - Added LICENSE.LGPLv3, LICENSE.GPLv2 & LICENSE.LGPLv21 Change-Id: I0586e35a7aa99be1b5b3bda580b05897f451acbf Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>