33fd101 | Luigi Pinca | 14 January 2022, 14:28:24 UTC | [dist] 8.4.2 | 14 January 2022, 14:28:24 UTC |
0c0754b | Robert Nagy | 14 January 2022, 14:26:07 UTC | [fix] Use the byte length of the data (#2004) Ensure that the correct length is used when framing the data. | 14 January 2022, 14:26:07 UTC |
6ebfeb8 | Luigi Pinca | 13 January 2022, 19:40:28 UTC | [dist] 8.4.1 | 13 January 2022, 19:40:28 UTC |
5b7fbb0 | Luigi Pinca | 13 January 2022, 19:26:14 UTC | [perf] Reduce buffer allocations (#2000) Do not convert strings to `Buffer`s if data does not need to be masked. Refs: https://github.com/websockets/ws/pull/1998 | 13 January 2022, 19:26:14 UTC |
8de448f | Luigi Pinca | 09 January 2022, 15:10:24 UTC | [test] Fix failing tests Refs: https://github.com/websockets/ws/commit/e173423c | 09 January 2022, 15:10:24 UTC |
91f3c07 | Luigi Pinca | 09 January 2022, 14:32:28 UTC | [minor] Replace echo.websocket.org with websocket-echo.com The echo.websocket.org service is no longer available. | 09 January 2022, 14:57:01 UTC |
ad3fe6d | Luigi Pinca | 06 January 2022, 17:25:52 UTC | [test] Improve test title | 06 January 2022, 17:25:52 UTC |
4081a36 | Luigi Pinca | 06 January 2022, 14:36:53 UTC | [test] Do not call the `done` callback prematurely | 06 January 2022, 14:51:18 UTC |
d2c935a | Tobias Nießen | 04 January 2022, 06:48:06 UTC | [doc] Fix typo in `WebSocketServer` description (#1996) | 04 January 2022, 06:48:06 UTC |
5edf1f4 | jugglinmike | 30 December 2021, 19:14:29 UTC | [doc] Clarify interpretation of `verifyClient` (#1994) Prior to this commit, the documentation for the `verifyClient` option was somewhat confusing due to its use of the passive voice and an uncommon interpretation of the term "arguments". Explain the way `ws` interprets the value of `verifyClient` using an active voice and more traditional meanings of "parameters" and "arguments". | 30 December 2021, 19:16:37 UTC |
00c34d7 | Luigi Pinca | 20 December 2021, 20:07:56 UTC | [dist] 8.4.0 | 20 December 2021, 20:07:56 UTC |
35d45c2 | Luigi Pinca | 19 December 2021, 19:49:13 UTC | [perf] Skip masking and unmasking if the masking key is zero | 20 December 2021, 20:02:56 UTC |
eb2e3a8 | Luigi Pinca | 19 December 2021, 19:41:24 UTC | [feature] Introduce the `generateMask` option The `generateMask` option specifies a function that can be used to generate custom masking keys. Refs: https://github.com/websockets/ws/pull/1986 Refs: https://github.com/websockets/ws/pull/1988 Refs: https://github.com/websockets/ws/pull/1989 | 20 December 2021, 20:02:56 UTC |
c82b087 | Luigi Pinca | 23 November 2021, 14:21:00 UTC | [dist] 8.3.0 | 23 November 2021, 14:32:40 UTC |
0a8c7a9 | Luigi Pinca | 23 November 2021, 13:50:20 UTC | [api] Add `WebSocket#pause()` and `WebSocket#resume()` Add ability to pause and resume a `WebSocket`. | 23 November 2021, 14:32:22 UTC |
ed2b803 | Luigi Pinca | 22 November 2021, 20:32:18 UTC | [fix] Resume the socket in the `CLOSING` state When the value of the `readyState` attribute is `CLOSING`, the internal socket might still be open. Resume it to read any remaining data and to allow the connection to be closed cleanly. | 23 November 2021, 09:14:20 UTC |
b8186dd | Luigi Pinca | 22 November 2021, 14:27:29 UTC | [fix] Do not throw if the redirect URL is invalid (#1980) If the redirect URL is invalid, then emit the error instead of throwing it, otherwise there is no way to handle it. Closes #1975 | 22 November 2021, 14:27:29 UTC |
5a905e4 | Luigi Pinca | 20 November 2021, 07:07:59 UTC | [minor] Add missing label to the issue form Fixes #1974 | 20 November 2021, 19:53:54 UTC |
89d81e8 | Luigi Pinca | 16 November 2021, 19:08:00 UTC | [minor] Fix nit | 16 November 2021, 19:08:00 UTC |
4916d03 | Austin Cheney | 16 November 2021, 19:00:16 UTC | [minor] Allow to write frames with up to 2^48 - 1 bytes of data (#1973) | 16 November 2021, 19:00:16 UTC |
5991c35 | Luigi Pinca | 01 November 2021, 20:06:17 UTC | [doc] Fix nits | 01 November 2021, 20:06:17 UTC |
65717f6 | Luigi Pinca | 20 October 2021, 17:23:28 UTC | [ci] Test on node 17 | 20 October 2021, 17:23:28 UTC |
a3a22e4 | Luigi Pinca | 11 October 2021, 06:32:09 UTC | [pkg] Update eslint to version 8.0.0 | 11 October 2021, 06:32:09 UTC |
cfd99b6 | Luigi Pinca | 02 October 2021, 18:31:21 UTC | [dist] 8.2.3 | 02 October 2021, 18:31:21 UTC |
fef7942 | Luigi Pinca | 30 September 2021, 10:54:28 UTC | [ci] Fix typo | 30 September 2021, 10:54:28 UTC |
41ae563 | Luigi Pinca | 29 September 2021, 14:41:32 UTC | [fix] Ignore the `threshold` option if context takeover is enabled When context takeover is enabled, compress messages even if their size is below the value of `threshold` option. Refs: https://github.com/websockets/ws/issues/1950 | 29 September 2021, 14:42:31 UTC |
474aa36 | Luigi Pinca | 28 September 2021, 14:30:19 UTC | [doc] Improve `WebSocket#{p{i,o}ng,send}()` documentation Specify that an error is thrown if the ready state is `CONNECTING` and that if an error occurs, the callback is called with the error as its first argument. Fixes #1953 | 28 September 2021, 14:30:19 UTC |
055949f | Luigi Pinca | 13 September 2021, 18:29:42 UTC | [doc] Remove no longer needed noop function from code snippet | 13 September 2021, 18:39:43 UTC |
5b85322 | Luigi Pinca | 11 September 2021, 19:42:52 UTC | [ci] Update coverallsapp/github-action action to version 1.1.3 | 11 September 2021, 19:42:52 UTC |
f871195 | Luigi Pinca | 09 September 2021, 19:44:52 UTC | [doc] Update issue template | 09 September 2021, 19:44:52 UTC |
72296e5 | Luigi Pinca | 08 September 2021, 19:42:28 UTC | [dist] 8.2.2 | 08 September 2021, 19:42:28 UTC |
3039b6b | Luigi Pinca | 04 September 2021, 18:44:38 UTC | [doc] Change label text to CI | 04 September 2021, 18:44:38 UTC |
04c032c | Luigi Pinca | 31 August 2021, 07:55:03 UTC | [ci] Use Github Actions for Windows x86 testing | 31 August 2021, 07:55:03 UTC |
48c2cb3 | Luigi Pinca | 31 August 2021, 06:49:52 UTC | [pkg] Update eslint-plugin-prettier to version 4.0.0 | 31 August 2021, 06:49:52 UTC |
ec9377c | Luigi Pinca | 30 August 2021, 18:20:45 UTC | [minor] Skip unnecessary operations if the socket is already closed There is no need to remove the already removed `socketOnData` listener, resume the socket, and call `websocket.close()` if the socket is already closed. | 30 August 2021, 18:20:45 UTC |
cc7a779 | Luigi Pinca | 28 August 2021, 15:07:15 UTC | [dist] 8.2.1 | 28 August 2021, 15:07:15 UTC |
869c989 | Luigi Pinca | 28 August 2021, 14:42:49 UTC | [fix] Resume the socket in the next tick Ensure that `socket.resume()` is called after `socket.pause()`. Fixes #1940 | 28 August 2021, 14:42:49 UTC |
ea6c054 | Luigi Pinca | 21 August 2021, 13:50:20 UTC | [test] Reorganize some tests | 21 August 2021, 13:55:22 UTC |
7647a89 | Luigi Pinca | 18 August 2021, 05:20:48 UTC | [dist] 8.2.0 | 18 August 2021, 05:20:48 UTC |
d5e3549 | Luigi Pinca | 17 August 2021, 09:55:51 UTC | [minor] Add `WebSocket.WebSocket{,Server}` aliases (#1935) Add `WebSocket.WebSocket` as an alias for `WebSocket` and `WebSocket.WebSocketServer` as an alias for `WebSocket.Server` to fix name consistency and improve interoperability with the ES module wrapper. Refs: https://github.com/websockets/ws/issues/1877 Refs: https://github.com/websockets/ws/issues/1932 | 17 August 2021, 09:55:51 UTC |
c677aab | Luigi Pinca | 15 August 2021, 18:17:18 UTC | [doc] Fix `createWebSocketStream()` documentation The ES module wrapper exports `createWebSocketStream()` as a named export and not as a static method of the `WebSocket` class. | 15 August 2021, 18:57:07 UTC |
f38247e | Luigi Pinca | 12 August 2021, 09:14:30 UTC | [doc] Sort options alphabetically | 12 August 2021, 09:14:30 UTC |
142f091 | Luigi Pinca | 11 August 2021, 17:28:53 UTC | [dist] 8.1.0 | 11 August 2021, 19:54:06 UTC |
d21c810 | Luigi Pinca | 11 August 2021, 13:48:52 UTC | [feature] Add ability to skip UTF-8 validation (#1928) Add the `skipUTF8Validation` option to skip UTF-8 validation for text and close messages. Refs: https://github.com/websockets/ws/issues/1878 Closes #1924 | 11 August 2021, 19:53:51 UTC |
9bd3bd1 | Ikko Ashimine | 11 August 2021, 13:35:27 UTC | [minor] Fix typo (#1929) | 11 August 2021, 13:35:27 UTC |
1e938f1 | Luigi Pinca | 11 August 2021, 06:23:37 UTC | [major] Use an options object instead of positional arguments Make the `Receiver` constructor take a single options object argument instead of multiple positional arguments. | 11 August 2021, 06:23:37 UTC |
7f0b5c4 | Luigi Pinca | 09 August 2021, 06:56:18 UTC | [example] Update uuid to version 8.3.2 | 09 August 2021, 06:56:18 UTC |
fd47c96 | Luigi Pinca | 07 August 2021, 06:13:03 UTC | [test] Move code block closer to where it is used | 07 August 2021, 06:13:03 UTC |
c95e695 | Luigi Pinca | 06 August 2021, 19:15:41 UTC | [fix] Fix misleading error message Use the correct error message if the server sends an empty subprotocol name. | 06 August 2021, 19:43:59 UTC |
6a72da3 | Luigi Pinca | 06 August 2021, 16:49:48 UTC | [fix] Do not rely on undocumented behavior Use the chunk returned by `socket.read()` to handle the buffered data instead of relying on a `'data'` event emitted after the `'close'` event. Refs: https://github.com/nodejs/node/pull/39639 | 06 August 2021, 16:49:48 UTC |
04e74a1 | Luigi Pinca | 03 August 2021, 06:40:48 UTC | [license] Fix license text | 03 August 2021, 06:43:04 UTC |
fc40248 | Luigi Pinca | 28 July 2021, 18:10:09 UTC | [dist] 8.0.0 | 29 July 2021, 05:11:28 UTC |
21e6500 | Luigi Pinca | 20 July 2021, 10:39:46 UTC | [major] Overhaul event classes - Remove non-standard `OpenEvent` class. - Make properties read-only. - Update constructor signatures to match the ones defined by the HTML standard. | 29 July 2021, 05:11:28 UTC |
bd7febb | Luigi Pinca | 19 July 2021, 07:48:40 UTC | [minor] Fix nits | 29 July 2021, 05:11:28 UTC |
6756cf5 | Luigi Pinca | 16 July 2021, 17:18:07 UTC | [fix] Return `null` if the event handler is not set Make the `onclose`, `onerror`, `onmessage`, and `onopen` getters return `null` instead of `undefined` if the event handler is not set. | 29 July 2021, 05:11:28 UTC |
8c61563 | Luigi Pinca | 16 July 2021, 16:44:34 UTC | [fix] Make listeners added via event handler properties independent Prevent the `onclose`, `onerror`, `onmessage`, and `onopen` getters and setters from returning or removing event listeners added with `WebSocket.prototype.addEventListener()`. Also prevent `WebSocket.prototype.removeEventListener()` from removing event listeners added with the `onclose`, `onerror`, `onmessage`, and `onopen` setters. Refs: https://github.com/websockets/ws/issues/1818 | 29 July 2021, 05:11:28 UTC |
ea95d9c | Luigi Pinca | 16 July 2021, 15:20:52 UTC | [major] Ignore listeners not added with `WebSocket#addEventListener()` Make `WebSocket.prototype.removeEventListener()` only remove listeners added with `WebSocket.prototype.addEventListener()` and only one at time. | 29 July 2021, 05:10:51 UTC |
9558ed1 | Luigi Pinca | 16 July 2021, 15:05:50 UTC | [major] Make `WebSocket#addEventListener()` ignore non standard events Make `WebSocket.prototype.addEventListener()` a noop if the `type` argument is not one of `'close'`, `'error'`, `'message'`, or `'open'`. | 29 July 2021, 05:10:31 UTC |
77a675c | Luigi Pinca | 15 July 2021, 09:25:55 UTC | [minor] Remove unneeded setters Refs: https://github.com/websockets/ws/commit/ecb9d9ea | 15 July 2021, 09:25:55 UTC |
64b3c71 | Luigi Pinca | 15 July 2021, 09:17:02 UTC | [pkg] Update mocha to version 8.4.0 | 15 July 2021, 09:17:02 UTC |
abde9cf | Luigi Pinca | 12 July 2021, 14:46:06 UTC | [major] Call the callback with an error if the server is closed Match the behavior of Node.js core `net.Server` and call the callback of `WebSocketServer.prototype.close()` with an error if the server is already closed. | 14 July 2021, 19:26:04 UTC |
df7de57 | Luigi Pinca | 12 July 2021, 13:52:59 UTC | [major] Do not close existing connections When `WebSocketServer.prototype.close()` is called, stop accepting new connections but do not close the existing ones. If the HTTP/S server was created internally, then close it and emit the `'close'` event when it closes. Otherwise, if client tracking is enabled, then emit the `'close'` event when the number of connections goes down to zero. Otherwise, emit it in the next tick. Refs: https://github.com/websockets/ws/pull/1902 | 14 July 2021, 19:26:04 UTC |
78adf5f | Luigi Pinca | 06 July 2021, 07:01:15 UTC | [major] Add an ES module wrapper Fixes #1886 | 14 July 2021, 19:26:04 UTC |
e173423 | Luigi Pinca | 02 July 2021, 15:43:32 UTC | [major] Do not decode `Buffer`s to strings Avoid decoding text messages and close reasons to strings. Pass them as `Buffer`s to the listeners of their respective events. Also, make listeners of the `'message'` event take a boolean argument to speficy whether or not the message is binary. Refs: https://github.com/websockets/ws/issues/1878 Refs: https://github.com/websockets/ws/issues/1804 | 14 July 2021, 19:26:04 UTC |
ebea038 | Luigi Pinca | 23 June 2021, 09:40:58 UTC | [major] Throw an error if the connection URL is invalid Make the `WebSocket` constructor throw a `SyntaxError` if the URL contains a fragment identifier or if the URL's protocol is not one of `'ws:'`, `'wss:'`, or `'ws+unix:'`. | 14 July 2021, 19:26:04 UTC |
552b506 | Luigi Pinca | 22 June 2021, 13:40:24 UTC | [major] Drop support for Node.js < 10 | 14 July 2021, 19:26:04 UTC |
e814110 | Luigi Pinca | 22 June 2021, 10:29:55 UTC | [major] Make the Sec-WebSocket-Extensions header parser stricter Make the parser throw an error if the header field value is empty or if it begins or ends with a white space. | 14 July 2021, 19:26:04 UTC |
1877dde | Luigi Pinca | 20 June 2021, 09:50:02 UTC | [major] Validate the Sec-WebSocket-Protocol header Abort the handshake if the `Sec-WebSocket-Protocol` header is invalid. | 14 July 2021, 19:26:04 UTC |
0aecf0c | Luigi Pinca | 18 June 2021, 19:21:01 UTC | [major] Validate subprotocol names Make the `WebSocket` constructor throw a `SyntaxError` if any of the subprotocol names are invalid or duplicated. | 14 July 2021, 19:26:04 UTC |
4c1849a | Luigi Pinca | 10 July 2021, 05:26:57 UTC | [dist] 7.5.3 | 10 July 2021, 05:26:57 UTC |
772236a | Luigi Pinca | 09 July 2021, 10:34:22 UTC | [fix] Abort the handshake if the server is closing or closed Prevent WebSocket connections from being established after `WebSocketServer.prototype.close()` is called. | 09 July 2021, 10:47:58 UTC |
5a58730 | Luigi Pinca | 09 July 2021, 09:06:26 UTC | [fix] Emit the `'close'` event after the server is closed Ensure that `WebSocketServer.prototype.close()` does not emit a `'close'` event prematurely if called while the internal HTTP/S server is closing. | 09 July 2021, 09:06:26 UTC |
ea63b29 | Luigi Pinca | 08 July 2021, 17:21:44 UTC | [minor] Fix typo | 08 July 2021, 17:21:44 UTC |
66e58d2 | Luigi Pinca | 08 July 2021, 11:55:29 UTC | [fix] Make the `{noS,s}erver`, and `port` options mutually exclusive Remove ambiguity and prevent `WebSocketServer.prototype.address()` from throwing an error if the `noServer` option is used along with the `port` and/or `server` options. | 08 July 2021, 11:55:29 UTC |
ecb9d9e | Luigi Pinca | 07 July 2021, 11:07:17 UTC | [minor] Improve JSDoc-inferred types (#1912) Refs: https://github.com/websockets/ws/pull/1910 | 07 July 2021, 11:07:17 UTC |
0ad1f9d | Luigi Pinca | 04 July 2021, 05:22:35 UTC | [dist] 7.5.2 | 04 July 2021, 05:22:35 UTC |
aca94c8 | Luigi Pinca | 03 July 2021, 07:21:39 UTC | [fix] Abort the handshake if an unexpected extension is received Abort the handshake if the client receives a `Sec-WebSocket-Extensions` header but no extension was requested. Also abort the handshake if the server indicates an extension not requested by the client. | 03 July 2021, 08:15:19 UTC |
38c6c73 | Luigi Pinca | 29 June 2021, 04:53:49 UTC | [dist] 7.5.1 | 29 June 2021, 04:53:49 UTC |
2916006 | Tim Perry | 22 June 2021, 12:43:34 UTC | [test] Add more tests for `WebSocket.prototype.close()` | 28 June 2021, 19:08:28 UTC |
b434b9f | Luigi Pinca | 25 June 2021, 20:08:01 UTC | [fix] Fix close edge cases Ensure that `socket.end()` is called if an error occurs simultaneously on both peers. Refs: https://github.com/websockets/ws/pull/1902 | 28 June 2021, 19:08:28 UTC |
c3fdc99 | Luigi Pinca | 28 June 2021, 09:16:11 UTC | [minor] Fix misleading comment | 28 June 2021, 09:16:11 UTC |
145480a | Luigi Pinca | 20 June 2021, 17:48:58 UTC | [test] Fix repeated typo | 20 June 2021, 17:51:56 UTC |
e3f0c17 | Luigi Pinca | 16 June 2021, 13:13:32 UTC | [dist] 7.5.0 | 16 June 2021, 13:13:32 UTC |
1d3f4cb | Luigi Pinca | 15 June 2021, 14:20:37 UTC | [doc] Fix anchor tags for error codes | 15 June 2021, 14:20:37 UTC |
6eea0d4 | Luigi Pinca | 15 June 2021, 13:50:18 UTC | [doc] Fix typo | 15 June 2021, 13:50:18 UTC |
bb5d44b | Luigi Pinca | 15 June 2021, 13:48:30 UTC | [doc] Sort error codes alphabetically | 15 June 2021, 13:48:30 UTC |
c6e3080 | Tim Perry | 15 June 2021, 13:22:01 UTC | [minor] Attach error codes to all receiver errors (#1901) Fixes #1892 | 15 June 2021, 13:22:01 UTC |
074e6a8 | Luigi Pinca | 09 June 2021, 07:14:33 UTC | [fix] Don't call `ws.terminate()` unconditionally in `duplex._destroy()` Call `ws.terminate()` only if `duplex.destroy()` is called directly by the user and not indirectly by the listener of the `'error'` event of the `WebSocket` object. Calling `ws.terminate()` right after the `'error'` event is emitted on the `WebSocket` object, might prevent the close frame from being sent to the other peer. | 09 June 2021, 19:31:36 UTC |
8806aa9 | Luigi Pinca | 08 June 2021, 09:29:50 UTC | [fix] Close the connection cleanly when an error occurs Instead of destroying the socket, try to close the connection cleanly if an error (such as a data framing error) occurs after the opening handshake has completed. Also, to comply with the specification, use the 1006 status code if no close frame is received, even if the connection is closed due to an error. Fixes #1898 | 09 June 2021, 19:31:36 UTC |
05b8ccd | Mestery | 05 June 2021, 19:02:44 UTC | [doc] Fix broken link (#1897) | 05 June 2021, 19:02:44 UTC |
03a7078 | Luigi Pinca | 31 May 2021, 16:59:21 UTC | [doc] Remove unsafe regex from code snippet | 31 May 2021, 17:08:20 UTC |
7ee3115 | Luigi Pinca | 29 May 2021, 19:21:01 UTC | [doc] Add logo to coverage badge | 29 May 2021, 19:21:01 UTC |
edff6bb | Luigi Pinca | 28 May 2021, 09:38:47 UTC | [test] Fix nit | 28 May 2021, 09:43:17 UTC |
262e45a | Luigi Pinca | 27 May 2021, 06:55:10 UTC | [test] Rename certificates and private keys files Rename `ca1-cert.pem` to `ca-certificate.pem`, `ca1-key.pem` to `ca-key.pem`, `agent1-cert.pem` to `client-certificate.pem`, and `agent1-key.pem` to `client-key.pem`. | 27 May 2021, 07:02:55 UTC |
d18c677 | Luigi Pinca | 26 May 2021, 19:27:29 UTC | [security] Update link to point to published security advisories | 26 May 2021, 19:27:29 UTC |
2f2b3e8 | Luigi Pinca | 26 May 2021, 19:20:45 UTC | [test] Update certificates and private keys Fixes #1890 | 26 May 2021, 19:21:11 UTC |
c05d51f | Luigi Pinca | 25 May 2021, 16:33:07 UTC | [security] Add ReDoS vulnerability to SECURITY.md | 25 May 2021, 16:33:07 UTC |
f5297f7 | Luigi Pinca | 25 May 2021, 16:11:07 UTC | [dist] 7.4.6 | 25 May 2021, 16:11:07 UTC |
00c425e | Luigi Pinca | 25 May 2021, 09:00:58 UTC | [security] Fix ReDoS vulnerability A specially crafted value of the `Sec-Websocket-Protocol` header could be used to significantly slow down a ws server. PoC and fix were sent privately by Robert McLaughlin from University of California, Santa Barbara. | 25 May 2021, 16:09:51 UTC |
990306d | Luigi Pinca | 25 May 2021, 14:48:37 UTC | [lint] Fix prettier error | 25 May 2021, 14:48:37 UTC |