Commit 0951a74e by Brian Coca

Merge pull request #10893 from sidick/fix_fetch_url_with_custom_https_port

Allow the use of HTTP on custom ports in the fetch_url function
parents 428f6674 6e65ccab
...@@ -377,6 +377,7 @@ def fetch_url(module, url, data=None, headers=None, method=None, ...@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment