[GH-ISSUE #289] Allow reserved characters on websocket URI #107

Closed
opened 2026-03-16 13:26:52 +03:00 by kerem · 4 comments
Owner

Originally created by @Lz-Gustavo on GitHub (Nov 8, 2019).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/289

Originally assigned to: @liyasthomas on GitHub.

I've tried to utilize the Websocket client to request some data to Binance Exchange API, using the URI shown below:

wss://stream.binance.com:9443/ws/ethusdt@kline_15m

The problem is that the presence of '@' disables the connect button, interpreting as a non-valid character for WSS URIs. As mentioned in RFC 6455 and 3986, the '@' symbol is do part of the reserved character's group, but this doesn't turns into an invalid URI.

I do agree that Binance API syntax may not fully implement the RFC, where it should be accepting the percent-encoded alias of '@', which is %40. But I also think that the client should not be filtering reserved characters, denying me to a send a request to a malformed API.

On a daily basis, I establish a bunch of wss connections to similar endpoints on a micro service implementation using gorilla/websocket, I can guarantee these are accepted URIs.

I have to say this is mine interpretation of the RFC, and as an inexperienced developer I could be equivocated. I'ld be glad to receive your feedback if that's the case.

To Reproduce
Steps to reproduce the behavior:

  1. Launch Postwoman
  2. Click on 'WebSocket'
  3. Try to establish a connection to the example URI

Desktop

  • OS: Ubuntu 18.04 LTS
  • Browser: Firefox
  • npm version output
{ postwoman: '1.0.0',
  npm: '3.5.2',
  ares: '1.14.0',
  cldr: '32.0.1',
  http_parser: '2.7.1',
  icu: '60.2',
  modules: '57',
  nghttp2: '1.30.0',
  node: '8.10.0',
  openssl: '1.0.2n',
  tz: '2017c',
  unicode: '10.0',
  uv: '1.18.0',
  v8: '6.2.414.50',
  zlib: '1.2.11' }
Originally created by @Lz-Gustavo on GitHub (Nov 8, 2019). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/289 Originally assigned to: @liyasthomas on GitHub. I've tried to utilize the Websocket client to request some data to [Binance Exchange API](https://github.com/binance-exchange/binance-official-api-docs), using the URI shown below: ``` wss://stream.binance.com:9443/ws/ethusdt@kline_15m ``` The problem is that the presence of '@' disables the connect button, interpreting as a non-valid character for WSS URIs. As mentioned in [RFC 6455](https://tools.ietf.org/html/rfc6455#page-14) and [3986](https://tools.ietf.org/html/rfc3986), the '@' symbol is do part of the reserved character's group, but this doesn't turns into an invalid URI. I do agree that Binance API syntax may not fully implement the RFC, where it should be accepting the percent-encoded alias of '@', which is %40. But I also think that the client should not be filtering reserved characters, denying me to a send a request to a malformed API. On a daily basis, I establish a bunch of wss connections to similar endpoints on a micro service implementation using [gorilla/websocket](https://github.com/gorilla/websocket), I can guarantee these are accepted URIs. I have to say this is mine interpretation of the RFC, and as an inexperienced developer I could be equivocated. I'ld be glad to receive your feedback if that's the case. **To Reproduce** Steps to reproduce the behavior: 1. Launch Postwoman 2. Click on 'WebSocket' 3. Try to establish a connection to the example URI **Desktop** - OS: Ubuntu 18.04 LTS - Browser: Firefox - npm version output ``` { postwoman: '1.0.0', npm: '3.5.2', ares: '1.14.0', cldr: '32.0.1', http_parser: '2.7.1', icu: '60.2', modules: '57', nghttp2: '1.30.0', node: '8.10.0', openssl: '1.0.2n', tz: '2017c', unicode: '10.0', uv: '1.18.0', v8: '6.2.414.50', zlib: '1.2.11' } ```
kerem 2026-03-16 13:26:52 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@liyasthomas commented on GitHub (Nov 8, 2019):

Will fix it ASAP

<!-- gh-comment-id:551920488 --> @liyasthomas commented on GitHub (Nov 8, 2019): Will fix it ASAP
Author
Owner

@liyasthomas commented on GitHub (Nov 8, 2019):

Just pushed a quick fix for this issue. Please verify and let me know whether there's any issues persist.

postwoman io_websocket

<!-- gh-comment-id:551933730 --> @liyasthomas commented on GitHub (Nov 8, 2019): Just pushed a quick fix for this issue. Please verify and let me know whether there's any issues persist. ![postwoman io_websocket](https://user-images.githubusercontent.com/10395817/68500474-cfe2b780-0281-11ea-8ace-32d052261446.png)
Author
Owner

@Lz-Gustavo commented on GitHub (Nov 8, 2019):

Thanks very much! Just updated, tested, and it's all good. Glad to see you're implementing a regex parser yourself, and not importing it from an "obscure" dependency.

<!-- gh-comment-id:551938281 --> @Lz-Gustavo commented on GitHub (Nov 8, 2019): Thanks very much! Just updated, tested, and it's all good. Glad to see you're implementing a regex parser yourself, and not importing it from an "obscure" dependency.
Author
Owner

@liyasthomas commented on GitHub (Nov 8, 2019):

Glad it worked out!
btw, there was a text overflowing issue with large single ling responses such as the one you mentioned. You bug report helped me find and fix that too. It's now fixed. Enjoy PW. Star the project, share among your friends/teams!

<!-- gh-comment-id:551939646 --> @liyasthomas commented on GitHub (Nov 8, 2019): Glad it worked out! btw, there was a text overflowing issue with large single ling responses such as the one you mentioned. You bug report helped me find and fix that too. It's now fixed. Enjoy PW. Star the project, share among your friends/teams!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#107
No description provided.