summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-09-031-0/+5977
|\ | | | | | | Change-Id: I9c23395dfda8bfaf308dacbf17c471b62803371c
| * Binary compatibility file against Qt5.13.0 for QtWebSocketsMilla Pohjanheimo2019-08-261-0/+5977
| | | | | | | | | | | | | | BC file added. Change-Id: Ibc33a9a55c8dc378938046cb3c45c1464864e348 Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
* | Add missing \since 5.14 to new APIMårten Nordheim2019-08-301-0/+2
| | | | | | | | | | | | | | | | | | | | From API review. Amends 2e54dbe86eac61e87782a138dbcc158cb6b10cd9 Change-Id: Ie55a3ef076e042e4461397996e19bf7d397c3fb5 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Jesus Fernandez <jsfdez@gmail.com>
* | Take 2: Properly handle multiple websocket frames in one TCP frameMårten Nordheim2019-08-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Gerrit ate my change and somehow created an impossible state where a patch was able to merge due to its fix but couldn't actually pass its tests. Amends 6e1fa958c289de639753a60a9384bd94db0e91a8 Task-number: QTBUG-77830 Change-Id: Iedc23616816bb2c1758969a1d76b9536b509c38a Reviewed-by: Ryan Chu <ryan.chu@qt.io> Reviewed-by: Jesus Fernandez <jsfdez@gmail.com>
* | QWebsocket doesn't receive message with size larger than 1MRyan Chu2019-08-284-11/+15
| | | | | | | | | | | | | | | | | | | | | | | | If the processing of QWebSocketFrame is not done and waiting for more data, QWebSocketPrivate::processData should return the control and wait for next readyRead signal. Continue the change of b2fc794ffaf48c9d9c401b54cf39ea0220617a27 Change-Id: Idf5af0710267e59e63b8e234d6dab5843d821696 Reviewed-by: Jesus Fernandez <jsfdez@gmail.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Merge dev into 5.14Kari Oikarinen2019-08-278-204/+297
|\ \ | | | | | | | | | Change-Id: I2eaffbe6e9519a78d0f8663c0870f24cb006d222
| * | Add the missing tests in tst_DataProcessor::frameTooSmallRyan Chu2019-08-231-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are missing tests of 'text frame with final bit not set'. After dataProcessor.process, the spied signals should be compared and cleared before processing next frame. Change-Id: I5737da9d57e0043cfedb400f4e0934c5ce7c4250 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | Remove waitForReadyRead from QWebSocketFrame::readFrameRyan Chu2019-08-237-41/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Asynchronously process socket frame in QWebSocketDataProcessor::process. If the processing of QWebSocketFrame is not done and waiting for more data, QWebSocketDataProcessor::process will return the control and wait for next readyRead signal to continue processing the unfinished socket frame. QWebSocketDataProcessor::process gets timeout after 5 seconds, and then an errorEncountered signal will be emitted. Fixes: QTBUG-74464 Change-Id: I03b7f874c1c266617e7eadf59c59ae43fa8540ce Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| * | Make QWebSocketFrame::readFrame as a non-static public functionRyan Chu2019-08-235-25/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The static function QWebSocketFrame::readFrame used to return a parsed QWebSocketFrame read from QIODevice. This change make QWebSocketFrame reusable. It will base on its internal state and keep processing the incoming data from QIODevice. Change-Id: Ic6dea59529fa935cdb8034519e633ea67e869674 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | Add an internal state to keep the processing state of frame readingRyan Chu2019-08-232-52/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The macro 'WAIT_FOR_MORE_DATA' is revised because the processing state is kept by m_processingState. Remove the unused dataWaitSize and returnState local variables from QWebSocketFrame::readFrame. Change-Id: I8e270c5c7117b170159d4fb3b2bf1531a9cd5334 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | Divide QWebSocketFrame::readFrame into subroutinesRyan Chu2019-08-232-142/+167
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To reduce the dependency of each state and remove local variables (bytesRead, hasMask, and payloadLength) from QWebSocketFrame::readFrame, this change breaks down the states of QWebSocketFrame::readFrame into subroutines. In this change, it uses a readFramePayloadLength function to handle PS_READ_PAYLOAD_LENGTH and PS_READ_BIG_PAYLOAD_LENGTH cases. In addition, a missing error-handling is added in the read-header case if the bytesAvailable is less than 2 bytes. The variable hasMask is replaced by transiently using m_mask to indicate whether to read a mask. After reading mask in readFrameMask, the transient value will be over-written and used in readFramePayload. To replace local variable payloadLength with QWebSocketFrame::m_length, m_length is expanded to hold the payload length. Change-Id: I1c2d197112cef5cea75215923fa28e6f2e6cbef8 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Properly handle multiple websocket frames in one TCP frameMårten Nordheim2019-08-261-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we can have multiple websocket frames in one TCP frame we need to handle them all. Partial revert of b14f5f59a3ae96949e6a33302385a751d6448182 Fixes: QTBUG-77830 Change-Id: If435f6e67f04e4817a3202eb8fe779243591bff3 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Use QElapsedTimer instead of QTime for the ping timerFriedemann Kleint2019-08-232-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | The use of QTime for determining intervals is deprecated: qwebsocket_p.cpp:1214:61: warning: ‘int QTime::elapsed() const’ is deprecated: Use QElapsedTimer instead [-Wdeprecated-declarations] Change-Id: I26e1dabcba5ba54a4fead02b43c3fe7ace740be0 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Prospective fix for compilation with WebAssembly/MinGW73Friedemann Kleint2019-08-221-3/+6
|/ / | | | | | | | | | | | | | | | | | | Pass a template argument to std::less/greater. Amends 54ffd0d0a3bf2c77d53e1cdfe04b362f59682cb4. Fixes: QTBUG-77500 Change-Id: I0b78906090d8b0e3c910104975c08ff79ba9fc12 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.13' into dev"Qt Forward Merge Bot2019-07-162-0/+21
|\ \
| * \ Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-162-0/+21
| |\ \ |/ / / | | _ | | Change-Id: Ifa55b6563a15a91d7906d9e84936c4484323f809
| * Merge "Merge remote-tracking branch 'origin/5.12' into 5.13"Qt Forward Merge Bot2019-07-111-0/+20
| |\
| | * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-07-111-0/+20
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I3970191eef4be34b82487a6761999d79cccd0c20
| | | * Bump versionFrederik Gladhorn2019-07-011-1/+1
| | | | | | | | | | | | | | | | Change-Id: I9b5b43a7646d121ceacbd7006841f8bc4cb9f5ca
| | | * Merge "Merge remote-tracking branch 'origin/5.12.4' into 5.12"Qt Forward Merge Bot2019-06-172-1/+21
| | | |\
| | | | * Merge remote-tracking branch 'origin/5.12.4' into 5.12Qt Forward Merge Bot2019-06-172-1/+21
| | | | |\ | | | |/ / | | | | | | | | | | Change-Id: Ib3b749527e242cbfc2611467c6ecd39cef865662
| | | | * Add changes file for Qt 5.12.4v5.12.45.12.4Antti Kokko2019-05-231-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I1deff924d0a900e1897b1d3ebce0268934d06648 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
| | | | * Bump versionFrederik Gladhorn2019-05-231-1/+1
| | | |/ | | | | | | | | | | | | Change-Id: I313933cbbcad77f26a0246942f161e9fe209c9cc
| * | | Doc: Replace example file lists with links to code.qt.ioTopi Reinio2019-07-091-0/+1
| |/ / | | | | | | | | | | | | | | | Task-number: QTBUG-74391 Change-Id: I4f5a70c7439b27db2b02907e460b5804d5c6e104 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/5.13' into dev"Qt Forward Merge Bot2019-07-110-0/+0
|\ \ \
| * \ \ Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-110-0/+0
| |\ \ \ |/ / / / | | _ / | | / | | | | | | | | | Conflicts: .qmake.conf Change-Id: I1c65346e0625bb1653fa02ed87fd7999608f5482
| * | Bump versionFrederik Gladhorn2019-07-011-1/+1
| | | | | | | | | | | | Change-Id: I8d070d15c9c87e68354fa2bd848b465dc86ad8cc
* | | Merge "Merge remote-tracking branch 'origin/5.13' into dev"Qt Forward Merge Bot2019-06-292-3/+23
|\ \ \
| * \ \ Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-06-292-3/+23
| |\ \ \ |/ / / / | | _ / | | / Change-Id: I2a1987a687fafb73b3b8368db93bcca7a91bb5d0
| * | Merge "Merge remote-tracking branch 'origin/5.13.0' into 5.13"Qt Forward Merge Bot2019-06-201-0/+18
| |\ \
| | * \ Merge remote-tracking branch 'origin/5.13.0' into 5.13Qt Forward Merge Bot2019-06-201-0/+18
| | |\ \ | |/ / / | | | | | | | | Change-Id: Ia2981c012a8c44e0c0fbf68fadbba0f8ae3cc141
| | * | Add changes file for Qt 5.13.0v5.13.0-rc3v5.13.0-rc2v5.13.0-rc1v5.13.05.13.0Antti Kokko2019-05-031-0/+18
| | | | | | | | | | | | | | | | | | | | Change-Id: Ibb29ce573f4757b7a44e15467345cbefc6ef3f90 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
| * | | Doc: Complete parameter description several methodsNico Vertriest2019-06-181-3/+5
| |/ / | | | | | | | | | | | | Change-Id: Ib9f98683faf2b3a4041371c80a31de1f0902261d Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | Investigate tst_handshakeTimeout test flakinessMårten Nordheim2019-06-271-11/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove "localhost" in favor of "127.0.0.1" to avoid any name resolution. And wait 5 seconds for all websockets to timeout together, while printing how many have not timed-out in case of failure. Credits to Mårten Nordheim for coding this. With this patch, I can not reproduce the flakiness any longer. Lets see if this is also the case in our CI. Fixes: QTBUG-76572 Change-Id: Ibdbafbd7786c87138bdc84ebc690177211f23f5b Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Remove usages of deprecated QLatin1LiteralSona Kurazyan2019-06-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-76491 Change-Id: I201455eb4a7868728334403b61d5e41529478677 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Fix deprecation warnings in QWebSocketHandshakeResponse::getHandshakeResponse()Friedemann Kleint2019-05-271-6/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix warnings: websockethandshakeresponse.cpp:151:46: warning: ‘QSet<T> QList<T>::toSet() const [with T = QString]’ is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] qwebsockethandshakeresponse.cpp:151:84: warning: ‘QSet<T> QList<T>::toSet() const [with T = QString]’ is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] qwebsockethandshakeresponse.cpp:151:94: warning: ‘QList<T> QSet<T>::toList() const [with T = QString]’ is deprecated: Use values() instead. [-Wdeprecated-declarations] qwebsockethandshakeresponse.cpp:155:47: warning: ‘QSet<T> QList<T>::toSet() const [with T = QString]’ is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] qwebsockethandshakeresponse.cpp:155:86: warning: ‘QSet<T> QList<T>::toSet() const [with T = QString]’ is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] qwebsockethandshakeresponse.cpp:155:96: warning: ‘QList<T> QSet<T>::toList() const [with T = QString]’ is deprecated: Use values() instead. [-Wdeprecated-declarations] qwebsockethandshakeresponse.cpp:157:46: warning: ‘QSet<T> QList<T>::toSet() const [with T = QWebSocketProtocol::Version]’ is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] qwebsockethandshakeresponse.cpp:157:82: warning: ‘QSet<T> QList<T>::toSet() const [with T = QWebSocketProtocol::Version]’ is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] qwebsockethandshakeresponse.cpp:157:92: warning: ‘QList<T> QSet<T>::toList() const [with T = QWebSocketProtocol::Version]’ is deprecated: Use values() instead. [-Wdeprecated-declarations] by replacing them with a helper function to created a list intersection. Change-Id: Iee37632517760133ceebae4eda394170293f25c3 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Fix compilation error when configured without SSLDimitrios Apostolou2019-06-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QTcpSocket definition is apparently indirectly included when compiling with SSL support enabled, but without it the compiler outputs error. Change-Id: I5f4d8978ef04442443e934ee28e949a49a9f5b18 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | tst_QWebSocketServer: Fix deprecation warnings about ↵Friedemann Kleint2019-05-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | QSslSocket::supportedCiphers() Replace by QSslConfiguration::supportedCiphers(). Change-Id: Ia5ce3e399272127304ea7e93ba32627df5864381 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | websocket server: add timeout to abort incomplete handshakesHeiko Voigt2019-04-297-19/+253
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A websocket connection can involve two types of handshakes. First an optional SSL handshake and second the websocket handshake itself. Either one can get stalled/stuck if the other side does not answer. To be robust by default and for easy mitigation by users of websockets let's introduce a handshake timeout. We introduce a default timeout of 10 seconds which can be customized by the newly introduced setHandshakeTimeout() method. One major location where connections got stuck was when the connection queue was filled with connections waiting for the SSL handshake. Only connections that have finished this handshake can be processed anyway so we now add them to the queue once they are fully ready to start the websocket handshake. Task-number: QTBUG-63312 Task-number: QTBUG-57026 Change-Id: Ia286221f1d8da1000e98973496280fde16ed811d Reviewed-by: Alf Crüger <a.crueger@baxi-innotech.de> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-04-231-0/+20
|\ \ \ | |/ / | | | | | | Change-Id: I5e10d7cc767a3b534f09d5340efe033f5dc700a6
| * | Merge remote-tracking branch 'origin/5.12' into 5.13v5.13.0-beta4Qt Forward Merge Bot2019-04-201-0/+20
| |\ \ | | |/ | | | | | | Change-Id: I119bd29e542d2536a0dfab51b8f04a175266d644
| | * Merge remote-tracking branch 'origin/5.12.3' into 5.12Qt Forward Merge Bot2019-04-171-0/+20
| | |\ | | | | | | | | | | | | Change-Id: I3094f6feb8e1e87a4c5d18fa57d2b2e92c788389
| | | * Add changes file for Qt 5.12.3v5.12.35.12.3Antti Kokko2019-04-021-0/+20
| | |/ | | | | | | | | | | | | | | | | | | + dd00a38e0d65a73d7fa4df4c2fd196252d40d5ff Bump version Change-Id: I823312826c31c43f33a6b1e4e5de110275ba7337 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-04-135-9/+12
|\ \ \ | |/ / | | | | | | Change-Id: I43320389826b0f0deac412bf37df9232f2e68a33
| * | Automatically register the latest import versionv5.13.0-beta3Kai Koehne2019-04-125-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This follows what was done in d28c9f6a for Qt Quick Controls 2. The latest import version (e.g. 1.14 in Qt 5.14) will automatically be registered whenever the Qt version is bumped. This avoids needing to wait until a new type is added (or a new revision is added to an existing type) before being able to use the newest Qt Quick version. Change-Id: I3a2232d5f7418ec99441a71fb70d88835dc61a61 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-04-020-0/+0
|\ \ \ | |/ / | | | | | | Change-Id: I83162a176f4ffbaee8107f7d4506ac9aa50342d6
| * | Merge remote-tracking branch 'origin/5.12' into 5.13v5.13.0-beta2Qt Forward Merge Bot2019-03-270-0/+0
| |\ \ | | |/ | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I1e21542211694b1f707e7a20a5a9595369aef6e5
| | * Bump versionKari Oikarinen2019-03-211-1/+1
| | | | | | | | | | | | Change-Id: I8ff0f5b9ac8250885cd1bb61a293922ddb362f41
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-03-261-1/+1
|\ \ \ | |/ / | | | | | | Change-Id: Ib031ab06b01cf84c77fc3200f74cb4fd5ee57178
| * | Doc: Remove \l from reference to example source fileNico Vertriest2019-03-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Replace with \c since it is no longer possible to put hard links to example source files Change-Id: Iaf35f88a37b3c74455550316b83c26bc28769d3c Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>