|
|
@ -101,11 +101,13 @@ def url_do_get(module, url, dest):
|
|
|
|
info = dict(url=url, dest=dest)
|
|
|
|
info = dict(url=url, dest=dest)
|
|
|
|
r = None
|
|
|
|
r = None
|
|
|
|
parsed = urlparse.urlparse(url)
|
|
|
|
parsed = urlparse.urlparse(url)
|
|
|
|
if '@' in parsed.netloc:
|
|
|
|
if '@' in parsed[1]:
|
|
|
|
credentials = parsed.netloc.split('@')[0]
|
|
|
|
credentials, netloc = parsed[1].split('@', 1)
|
|
|
|
if ':' in credentials:
|
|
|
|
if ':' in credentials:
|
|
|
|
username, password = credentials.split(':')
|
|
|
|
username, password = credentials.split(':', 1)
|
|
|
|
netloc = parsed.netloc.split('@')[1]
|
|
|
|
else:
|
|
|
|
|
|
|
|
username = credentials
|
|
|
|
|
|
|
|
password = ''
|
|
|
|
parsed = list(parsed)
|
|
|
|
parsed = list(parsed)
|
|
|
|
parsed[1] = netloc
|
|
|
|
parsed[1] = netloc
|
|
|
|
|
|
|
|
|
|
|
|