Use to_native when validating proxy result (#32596)
* Use bytes directly instead of converting to text
(cherry picked from commit 708829fab9
)
This commit is contained in:
parent
793c473fe2
commit
97c3037206
1 changed files with 1 additions and 1 deletions
|
@ -675,7 +675,7 @@ class SSLValidationHandler(urllib_request.BaseHandler):
|
|||
make sure we get back a valid code from the proxy
|
||||
'''
|
||||
try:
|
||||
(http_version, resp_code, msg) = re.match(r'(HTTP/\d\.\d) (\d\d\d) (.*)', response).groups()
|
||||
(http_version, resp_code, msg) = re.match(br'(HTTP/\d\.\d) (\d\d\d) (.*)', response).groups()
|
||||
if int(resp_code) not in valid_codes:
|
||||
raise Exception
|
||||
except:
|
||||
|
|
Loading…
Reference in a new issue