Skip to content

Commit 151c449

Browse files
authored
test(websocket): optimize split param (#326)
1 parent 021d586 commit 151c449

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/websocket.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ test('Proxy websocket with custom upstream url', async (t) => {
421421
wss.on('connection', (ws, request) => {
422422
ws.on('message', (message, binary) => {
423423
// Also need save request.url for check from what url the message is coming.
424-
serverMessages.push([message.toString(), binary, request.headers.host.split(':')[0], request.url])
424+
serverMessages.push([message.toString(), binary, request.headers.host.split(':', 1)[0], request.url])
425425
ws.send(message, { binary })
426426
})
427427
})

0 commit comments

Comments
 (0)