From 6e65ccabc3dac26a89cf2b1782ed160327320528 Mon Sep 17 00:00:00 2001 From: Simon Dick Date: Fri, 1 May 2015 13:52:29 +0100 Subject: [PATCH] Allow the use of HTTP on custom ports in the fetch_url function --- lib/ansible/module_utils/urls.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ansible/module_utils/urls.py b/lib/ansible/module_utils/urls.py index 962b868ee0..d56cc89395 100644 --- a/lib/ansible/module_utils/urls.py +++ b/lib/ansible/module_utils/urls.py @@ -377,6 +377,7 @@ def fetch_url(module, url, data=None, headers=None, method=None, netloc = netloc.split('@', 1)[1] if ':' in netloc: hostname, port = netloc.split(':', 1) + port = int(port) else: hostname = netloc port = 443