fix(platform): preserve session failures and URL syntax
This commit is contained in:
@@ -512,6 +512,10 @@ test('PlatformHandlers validates every switch URL before closing the active game
|
||||
'http://invalid.example',
|
||||
'ws://user@example.com',
|
||||
'ws://example.com/#fragment',
|
||||
'ws://example.com/#',
|
||||
'ws://example.com#',
|
||||
'ws://@example.com',
|
||||
'ws://:@example.com',
|
||||
'ws:///path',
|
||||
'ws://example.com:99999',
|
||||
'ws://example.com:abc',
|
||||
@@ -544,7 +548,10 @@ test('PlatformHandlers validates every switch URL before closing the active game
|
||||
|
||||
test('PlatformHandlers accepts case-insensitive WS/WSS schemes and preserves full payload identity', () => {
|
||||
const setup = makeHandlers();
|
||||
const roomData = { roomserver: 'WS://EXAMPLE.com:80/path?x=1', extra: { trace: 1 } };
|
||||
const roomData = {
|
||||
roomserver: 'WS://EXAMPLE.com:80/path/%23anchor?x=1',
|
||||
extra: { trace: 1 },
|
||||
};
|
||||
const agentData = {
|
||||
agentserver: 'WSS://secure.example:443/socket', opt: 'free_room', extra: { trace: 2 },
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user