Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow http/https urls for connect function #452

Closed
alex-kattathra-johnson opened this issue Nov 11, 2024 · 2 comments
Closed

Allow http/https urls for connect function #452

alex-kattathra-johnson opened this issue Nov 11, 2024 · 2 comments

Comments

@alex-kattathra-johnson
Copy link

We currently throw an error here for everything that isn't wss or ws. Would be nice if we could allow http and https which could be upgraded into websocket at handshake.

@agalakhov
Copy link
Member

This would be contrary to the RFC definition.

[3](https://www.rfc-editor.org/rfc/rfc6455.html#section-3).  WebSocket URIs

   This specification defines two URI schemes, using the ABNF syntax
   defined in [RFC 5234](https://www.rfc-editor.org/rfc/rfc5234) [[RFC5234](https://www.rfc-editor.org/rfc/rfc5234)], and terminology and ABNF productions
   defined by the URI specification [RFC 3986](https://www.rfc-editor.org/rfc/rfc3986) [[RFC3986](https://www.rfc-editor.org/rfc/rfc3986)].

          ws-URI = "ws:" "//" host [ ":" port ] path [ "?" query ]
          wss-URI = "wss:" "//" host [ ":" port ] path [ "?" query ]

          host = <host, defined in [[RFC3986], Section 3.2.2](https://www.rfc-editor.org/rfc/rfc3986#section-3.2.2)>
          port = <port, defined in [[RFC3986], Section 3.2.3](https://www.rfc-editor.org/rfc/rfc3986#section-3.2.3)>
          path = <path-abempty, defined in [[RFC3986], Section 3.3](https://www.rfc-editor.org/rfc/rfc3986#section-3.3)>
          query = <query, defined in [[RFC3986], Section 3.4](https://www.rfc-editor.org/rfc/rfc3986#section-3.4)>

   The port component is OPTIONAL; the default for "ws" is port 80,
   while the default for "wss" is port 443.

@alex-kattathra-johnson
Copy link
Author

Please check discussion in #451

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants