File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -611,4 +611,3 @@ class CurlIpResolve(IntEnum):
611
611
WHATEVER = 0 # default, uses addresses to all IP versions that your system allows
612
612
V4 = 1 # uses only IPv4 addresses/connections
613
613
V6 = 2 # uses only IPv6 addresses/connections
614
-
Original file line number Diff line number Diff line change @@ -536,11 +536,12 @@ def set_curl_options(
536
536
proxies = base_proxies
537
537
538
538
if proxies :
539
+
539
540
# Turn on proxy_credential_no_reuse, which has the following benefits:
540
541
# 1. New connection will be made when proxy username changed
541
542
# 2. New TLS session will be created based on proxy address, i.e. when accessing
542
543
# the same site with different proxies, the TLS session won't leak previous IP.
543
- c .setopt (CurlOpt .PROXY_CREDETIAL_NO_REUSE , 1 )
544
+ c .setopt (CurlOpt .PROXY_CREDENTIAL_NO_REUSE , 1 )
544
545
545
546
parts = urlparse (url )
546
547
proxy = cast (Optional [str ], proxies .get (parts .scheme , proxies .get ("all" )))
@@ -575,7 +576,6 @@ def set_curl_options(
575
576
c .setopt (CurlOpt .PROXYUSERNAME , username .encode ())
576
577
c .setopt (CurlOpt .PROXYPASSWORD , password .encode ())
577
578
578
-
579
579
# verify
580
580
base_verify , verify = verify_list
581
581
if verify is False or not base_verify and verify is None :
Original file line number Diff line number Diff line change @@ -152,7 +152,9 @@ def _unpack_close_frame(frame: bytes) -> tuple[int, str]:
152
152
) from e
153
153
else :
154
154
# TODO use constants instead of magic numbers
155
- if code < 3000 and (code not in WsCloseCode ._value2member_map_ or code == 1005 ):
155
+ if code < 3000 and (
156
+ code not in WsCloseCode ._value2member_map_ or code == 1005
157
+ ):
156
158
raise WebSocketError (
157
159
"Invalid close code" , WsCloseCode .PROTOCOL_ERROR
158
160
)
You can’t perform that action at this time.
0 commit comments