socketwrench icon indicating copy to clipboard operation
socketwrench copied to clipboard

Missing support for query parameter

Open masher82 opened this issue 5 years ago • 3 comments

The RFC 6455 that describes websockets ('The WebSocket Protocol') outlines in section 3 (https://tools.ietf.org/html/rfc6455#section-3) that query params should be allowed. Adding query params to the Connection URL results in:

The connection URL specified is invalid. Please specify a valid URL.

masher82 avatar Aug 13 '19 13:08 masher82

Could not reproduce this. I tried to connect to wss://echo.websocket.org/?q=1 and it connected to the server. Please note that any URL you provide should have a ws or wss protocol.

Also, if the endpoint you are providing does not allow a websocket connection, then the same invalid connection URL message is displayed. Please recheck the URL and that there is a websocket server listening on that URL.

asleepysamurai avatar Aug 13 '19 22:08 asleepysamurai

Of course the endpoint does allow websocket connections. The one I tried looks like ws://your_desired_host/socket.io?q=1 which should be treated as ws://your_desired_host/socket.io/?q=1 which works as expected...

As far as I know the path does not explicitly has to end with a '/'?!

masher82 avatar Aug 14 '19 07:08 masher82

Ah, yes that does appear to be a bug. Let me check and get back to you. In the meanwhile, I suppose you could work around it with the explicit trailing slash.

asleepysamurai avatar Aug 16 '19 21:08 asleepysamurai