Skip to content

Commit

Permalink
test(websocket): optimize split param (#326)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs authored Oct 21, 2023
1 parent 021d586 commit 151c449
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/websocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ test('Proxy websocket with custom upstream url', async (t) => {
wss.on('connection', (ws, request) => {
ws.on('message', (message, binary) => {
// Also need save request.url for check from what url the message is coming.
serverMessages.push([message.toString(), binary, request.headers.host.split(':')[0], request.url])
serverMessages.push([message.toString(), binary, request.headers.host.split(':', 1)[0], request.url])
ws.send(message, { binary })
})
})
Expand Down

0 comments on commit 151c449

Please sign in to comment.