ensure the emscripten websocket url is set properly

This commit is contained in:
ading2210 2024-07-11 02:28:25 -07:00
parent 2be1e0cd4b
commit 9f033fc848
4 changed files with 8 additions and 4 deletions

View file

@ -1,5 +1,8 @@
# Libcurl.js Changelog:
## v0.6.10 (7/11/24):
- Fix a problem where the websocket URL wouldn't be set properly in some cases
## v0.6.9 (7/10/24):
- Fix a possible double free when requests get aborted
- Handle `ReadableStream` objects as the request payload

View file

@ -52,6 +52,7 @@ if [[ "$*" == *"release"* ]]; then
else
COMPILER_OPTIONS="$COMPILER_OPTIONS --profiling -g "
EMSCRIPTEN_OPTIONS="$EMSCRIPTEN_OPTIONS -sSTACK_OVERFLOW_CHECK=2"
echo "note: this is a debug build"
fi
if [[ "$*" == *"asan"* ]]; then

View file

@ -43,9 +43,9 @@ function check_loaded(check_websocket) {
}
function set_websocket_url(url) {
websocket_url = url;
if (Module.websocket) {
Module.websocket.url = url;
}
if (typeof Module.websocket === "undefined")
Module.websocket = {};
Module.websocket.url = url;
if (!main_session && wasm_ready) {
setup_main_session();
}

View file

@ -1,6 +1,6 @@
{
"name": "libcurl.js",
"version": "0.6.9",
"version": "0.6.10",
"description": "An experimental port of libcurl to WebAssembly for use in the browser.",
"main": "libcurl.mjs",
"exports": {