mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Use to_native when validating proxy result (#32596)
* Use bytes directly instead of converting to text
This commit is contained in:
parent
930fde5f70
commit
708829fab9
1 changed files with 1 additions and 1 deletions
|
@ -677,7 +677,7 @@ class SSLValidationHandler(urllib_request.BaseHandler):
|
|||
valid_codes = [200] if valid_codes is None else valid_codes
|
||||
|
||||
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