Use to_native when validating proxy result (#32596)

* Use bytes directly instead of converting to text
(cherry picked from commit 708829fab9)
pull/32607/head
David Hain 8 years ago committed by Toshio Kuratomi
parent 793c473fe2
commit 97c3037206

@ -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…
Cancel
Save