Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure WebSocket URL is properly built for multiple use-cases.
This fixes allinurl#2487 where passing --ws-url=wss://HOST.DOMAIN/ws/ would end up appending the default port to the end of path. e.g., wss://HOST.DOMAIN/ws/:7890 Now it will check if the given URL contains the port else it will append it to hostname. A few scenarios: --ws-url=wss://HOST.DOMAIN/ws/ => wss://HOST.DOMAIN:7890/ws/ --ws-url=ws://HOST.DOMAIN/ws/ => ws(s)://HOST.DOMAIN:7890/ws/ --ws-url=HOST.DOMAIN:3843/ws/ => ws(s)://HOST.DOMAIN:3843/ws/ --ws-url=HOST.DOMAIN:3843/ws/ => ws(s)://HOST.DOMAIN:3843/ws/ => ws(s)://hostname:7890 or ws(s)://localhost:7890
- Loading branch information