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

[FIXED] Websocket: discovered urls would not have "wss://" scheme #915

Merged
merged 1 commit into from Mar 8, 2022

Conversation

kozlovic
Copy link
Member

If the user originally connects with "wss://" but has not configured
any secure related option (Options.Secure/TLSConfig), then when
adding implicit URLs (from the server INFO) the library would add
the "ws://" prefix to the received URL.
When trying to connect to those URLs, the library would not try
to make a TLS handshake and would get an error back that would
result in a "websocket invalid connection".

Resolves #914

Signed-off-by: Ivan Kozlovic ivan@synadia.com

If the user originally connects with "wss://" but has not configured
any secure related option (Options.Secure/TLSConfig), then when
adding implicit URLs (from the server INFO) the library would add
the "ws://" prefix to the received URL.
When trying to connect to those URLs, the library would not try
to make a TLS handshake and would get an error back that would
result in a "websocket invalid connection".

Resolves #914

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
@coveralls
Copy link

Coverage Status

Coverage increased (+0.05%) to 85.29% when pulling 97d7532 on fix_ws_invalid_conn into 0096b1b on main.

@kozlovic
Copy link
Member Author

kozlovic commented Mar 8, 2022

@ColinSullivan1 @wallyqs PING?

Copy link
Member

@wallyqs wallyqs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kozlovic kozlovic merged commit 2f2f696 into main Mar 8, 2022
@kozlovic kozlovic deleted the fix_ws_invalid_conn branch March 8, 2022 17:13
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

Successfully merging this pull request may close these issues.

Websocket: "invalid websocket connection" when using wss://, host resolves to some IPs
3 participants