Describe the bug
The final WebTransport URL doesn't include the query parameters from the original URL.
To Reproduce
engine.io-client 6.6.4
Client
// Connects to: https://localhost:1234/engine.io/?x=y&EIO=4&transport=polling&t=zsyh7czl
eio("https://localhost:1234/?x=y", {transports: ["polling"]});
// Connects to: wss://localhost:1234/engine.io/?x=y&EIO=4&transport=websocket
eio("https://localhost:1234/?x=y", {transports: ["websocket"]});
// Connects to: https://localhost:1234/engine.io/
eio("https://localhost:1234/?x=y", {transports: ["webtransport"]});
Expected behavior
The WebTransport transport should preserve the query parameters in the same way other transports do.
Additional context
WebTransport currently uses createUri to construct the URL:
|
this._transport = new WebTransport( |
|
this.createUri("https"), |
|
this.opts.transportOptions[this.name], |
|
); |
It doesn't include the original query parameters:
|
protected createUri(schema: string, query: Record<string, unknown> = {}) { |
|
return ( |
|
schema + |
|
"://" + |
|
this._hostname() + |
|
this._port() + |
|
this.opts.path + |
|
this._query(query) |
|
); |
|
} |
Describe the bug
The final WebTransport URL doesn't include the query parameters from the original URL.
To Reproduce
engine.io-client 6.6.4
Client
Expected behavior
The WebTransport transport should preserve the query parameters in the same way other transports do.
Additional context
WebTransport currently uses
createUrito construct the URL:socket.io/packages/engine.io-client/lib/transports/webtransport.ts
Lines 31 to 34 in 439a8f6
It doesn't include the original query parameters:
socket.io/packages/engine.io-client/lib/transport.ts
Lines 176 to 185 in 439a8f6