From 885e83d2eb091c4f5c4072dbfd59520573007900 Mon Sep 17 00:00:00 2001 From: ading2210 Date: Fri, 10 Jan 2025 11:45:52 -0500 Subject: [PATCH] minor bug fixes --- CHANGELOG.md | 7 +++++++ client/fragments/fix_socket_limit.js | 6 ++++++ client/javascript/websocket.js | 2 ++ client/package.json | 2 +- server/wisp_server | 2 +- 5 files changed, 17 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a97d187..4779c99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Libcurl.js Changelog: +## v0.6.22 (1/10/25): +- Remove Emscripten's maximum socket limit of 64 +- Fix handling of sub-protocols in Websockets + +## v0.6.21 (12/25/24): +- Work around a [WolfSSL bug](https://github.com/wolfSSL/wolfssl/issues/8137) causing requests to open.spotify.com to fail + ## v0.6.20 (11/10/24): - Fix bug with response body getting corrupted diff --git a/client/fragments/fix_socket_limit.js b/client/fragments/fix_socket_limit.js index 85f576c..4fd796a 100644 --- a/client/fragments/fix_socket_limit.js +++ b/client/fragments/fix_socket_limit.js @@ -6,3 +6,9 @@ assert\(sock\.stream\.fd ?< ?64\); /* DELETE assert\(!exceptfds, ?['"]exceptfds not supported['"]\); */ + + +/* DELETE +assert\(nfds ?<= ?64, ?['"]nfds must be less than or equal to 64['"]\); +*/ + diff --git a/client/javascript/websocket.js b/client/javascript/websocket.js index e86229f..192bf02 100644 --- a/client/javascript/websocket.js +++ b/client/javascript/websocket.js @@ -50,6 +50,8 @@ class CurlWebSocket extends CurlSession { headers: this.options.headers || {} }; if (this.protocols) { + if (typeof this.protocols === "string") + this.protocols = [this.protocols]; request_options.headers["Sec-Websocket-Protocol"] = this.protocols.join(", "); } if (this.options.verbose) { diff --git a/client/package.json b/client/package.json index b35221a..2e2d0e1 100644 --- a/client/package.json +++ b/client/package.json @@ -1,6 +1,6 @@ { "name": "libcurl.js", - "version": "0.6.21", + "version": "0.6.22", "description": "A port of libcurl to WebAssembly, for proxying HTTPS requests from the browser with full TLS encryption", "main": "libcurl.mjs", "exports": { diff --git a/server/wisp_server b/server/wisp_server index dee3e21..7ecfcde 160000 --- a/server/wisp_server +++ b/server/wisp_server @@ -1 +1 @@ -Subproject commit dee3e21dbb0b5796b56bc0d76dc58a46db1d1dd8 +Subproject commit 7ecfcdee990b207e16c553c700e96d6261fe4563