Commit 65400cb
authored
Use correct port for wss URLs when ssl_context is None (#197)
Prior to
49b93c1,
`_url_to_host()` modified `ssl_context` according to whether the URL
contained `ws` or `wss`. That commit introduced `return_ssl_context`
because the return value has a different type set (`ssl.SSLContext |
bool`) than the passed in argument (`ssl.SSLContext | None`). But the
determination of which port number to use was still based on
`ssl_context`, which would result in port 80 being used in the case
where the user passed in a `wss://` URL without an SSLContext. Checking
`return_ssl_context` instead results in the correct behavior.1 parent ccd2c88 commit 65400cb
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
518 | 518 | | |
519 | 519 | | |
520 | 520 | | |
521 | | - | |
| 521 | + | |
522 | 522 | | |
523 | 523 | | |
524 | 524 | | |
| |||
0 commit comments