From 1a53a3c8f784b2b40cccc43295ff73d60d55ff7d Mon Sep 17 00:00:00 2001 From: ading2210 Date: Sun, 1 Sep 2024 21:38:03 -0400 Subject: [PATCH] fix bug with incorrect tcp hostnames --- CHANGELOG.md | 3 +++ client/fragments/force_wsproxy.js | 5 +++-- client/package.json | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c43c3ef..4414b70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Libcurl.js Changelog: +## v0.6.13 (9/1/24): +- A minor bug where the hostname for TCP connections would be wrong in certain cases has been fixed. + ## v0.6.12 (7/28/24): - The APIs from [wisp-client-js](https://github.com/MercuryWorkshop/wisp-client-js) are now exposed at `libcurl.wisp` diff --git a/client/fragments/force_wsproxy.js b/client/fragments/force_wsproxy.js index 32993a8..81554bc 100644 --- a/client/fragments/force_wsproxy.js +++ b/client/fragments/force_wsproxy.js @@ -1,5 +1,6 @@ /* INSERT var ?opts ?= ?undefined; */ -var parts=addr.split("/"); -url = url + parts[0] + ":" + port; \ No newline at end of file +var parts = addr.split("/"); +if (!url.endsWith("/")) url += "/"; +url += parts[0] + ":" + port; \ No newline at end of file diff --git a/client/package.json b/client/package.json index 46115c2..f38ab56 100644 --- a/client/package.json +++ b/client/package.json @@ -1,6 +1,6 @@ { "name": "libcurl.js", - "version": "0.6.12", + "version": "0.6.13", "description": "An experimental port of libcurl to WebAssembly for use in the browser.", "main": "libcurl.mjs", "exports": {