fix(platform): preserve session failures and URL syntax

This commit is contained in:
2026-09-05 06:38:00 +08:00
parent 7e5a950cc7
commit 224df1c21c
6 changed files with 123 additions and 8 deletions
@@ -151,6 +151,9 @@ function parseSwitchTarget(address: string, path: string): string {
if (authority === undefined || authority.length === 0) {
throw new TypeError(`${path}: expected a WebSocket address with a non-empty host`);
}
if (target.includes('#') || authority.includes('@')) {
throw new TypeError(`${path}: expected a WebSocket address without fragment or userinfo`);
}
let parsed: URL;
try {