query part is chopped from the URL
gazsiazasz opened this issue · comments
Gajdos Gábor commented
Describe the bug
An URL which contains "query" part, it is silently omitted by the websocket-kit. So it is possible to not be able to connect to a WebSocket because it can contain essential information to connect.
To Reproduce
let wss = "wss://wssserver.com/endpoint/?essentialinfo=here"
WebSocket.connect(to: wss, headers: headers, on: app.eventLoopGroup, onUpgrade: {...})
Steps to reproduce the behavior:
- Add package with default configuration
- Send request with options above
- See error
Expected behavior
It should use the query part of the URL (why don't u use simply URL and URLComponents from the Foundation lib instead of the hackery done in this lib? :))
Environment
Xcode: Version 13.0 beta (13A5154h)
- Vapor Framework version: 4.47.0
- Vapor Toolbox version: -
- OS version: 12.0 (21A5248p)