Allow the use of HTTP on custom ports in the fetch_url function
This commit is contained in:
parent
54fb04afc4
commit
c0265f80fb
1 changed files with 1 additions and 0 deletions
|
@ -377,6 +377,7 @@ def fetch_url(module, url, data=None, headers=None, method=None,
|
||||||
netloc = netloc.split('@', 1)[1]
|
netloc = netloc.split('@', 1)[1]
|
||||||
if ':' in netloc:
|
if ':' in netloc:
|
||||||
hostname, port = netloc.split(':', 1)
|
hostname, port = netloc.split(':', 1)
|
||||||
|
port = int(port)
|
||||||
else:
|
else:
|
||||||
hostname = netloc
|
hostname = netloc
|
||||||
port = 443
|
port = 443
|
||||||
|
|
Loading…
Reference in a new issue