mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-06 13:11:15 -07:00
Bump websocket-client from 1.7.0 to 1.8.0 (#2313)
* Bump websocket-client from 1.7.0 to 1.8.0 Bumps [websocket-client](https://github.com/websocket-client/websocket-client) from 1.7.0 to 1.8.0. - [Release notes](https://github.com/websocket-client/websocket-client/releases) - [Changelog](https://github.com/websocket-client/websocket-client/blob/master/ChangeLog) - [Commits](https://github.com/websocket-client/websocket-client/compare/v1.7.0...v1.8.0) --- updated-dependencies: - dependency-name: websocket-client dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Update websocket-client==1.8.0 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> [skip ci]
This commit is contained in:
parent
5d0ba8b222
commit
dab46249f2
22 changed files with 225 additions and 184 deletions
|
@ -2,7 +2,7 @@
|
|||
_http.py
|
||||
websocket - WebSocket client library for Python
|
||||
|
||||
Copyright 2023 engn33r
|
||||
Copyright 2024 engn33r
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
@ -21,11 +21,15 @@ import os
|
|||
import socket
|
||||
from base64 import encodebytes as base64encode
|
||||
|
||||
from ._exceptions import *
|
||||
from ._logging import *
|
||||
from ._socket import *
|
||||
from ._ssl_compat import *
|
||||
from ._url import *
|
||||
from ._exceptions import (
|
||||
WebSocketAddressException,
|
||||
WebSocketException,
|
||||
WebSocketProxyException,
|
||||
)
|
||||
from ._logging import debug, dump, trace
|
||||
from ._socket import DEFAULT_SOCKET_OPTION, recv_line, send
|
||||
from ._ssl_compat import HAVE_SSL, ssl
|
||||
from ._url import get_proxy_info, parse_url
|
||||
|
||||
__all__ = ["proxy_info", "connect", "read_headers"]
|
||||
|
||||
|
@ -283,22 +287,22 @@ def _wrap_sni_socket(sock: socket.socket, sslopt: dict, hostname, check_hostname
|
|||
|
||||
|
||||
def _ssl_socket(sock: socket.socket, user_sslopt: dict, hostname):
|
||||
sslopt: dict = dict(cert_reqs=ssl.CERT_REQUIRED)
|
||||
sslopt: dict = {"cert_reqs": ssl.CERT_REQUIRED}
|
||||
sslopt.update(user_sslopt)
|
||||
|
||||
certPath = os.environ.get("WEBSOCKET_CLIENT_CA_BUNDLE")
|
||||
cert_path = os.environ.get("WEBSOCKET_CLIENT_CA_BUNDLE")
|
||||
if (
|
||||
certPath
|
||||
and os.path.isfile(certPath)
|
||||
cert_path
|
||||
and os.path.isfile(cert_path)
|
||||
and user_sslopt.get("ca_certs", None) is None
|
||||
):
|
||||
sslopt["ca_certs"] = certPath
|
||||
sslopt["ca_certs"] = cert_path
|
||||
elif (
|
||||
certPath
|
||||
and os.path.isdir(certPath)
|
||||
cert_path
|
||||
and os.path.isdir(cert_path)
|
||||
and user_sslopt.get("ca_cert_path", None) is None
|
||||
):
|
||||
sslopt["ca_cert_path"] = certPath
|
||||
sslopt["ca_cert_path"] = cert_path
|
||||
|
||||
if sslopt.get("server_hostname", None):
|
||||
hostname = sslopt["server_hostname"]
|
||||
|
@ -327,7 +331,7 @@ def _tunnel(sock: socket.socket, host, port: int, auth) -> socket.socket:
|
|||
send(sock, connect_header)
|
||||
|
||||
try:
|
||||
status, resp_headers, status_message = read_headers(sock)
|
||||
status, _, _ = read_headers(sock)
|
||||
except Exception as e:
|
||||
raise WebSocketProxyException(str(e))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue