You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2014/08/20 20:52:24 UTC
git commit: Update cURL lines to include proxy basic auth information
(if available).
Repository: libcloud
Updated Branches:
refs/heads/trunk a03e9f31d -> 816f3705e
Update cURL lines to include proxy basic auth information (if available).
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/816f3705
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/816f3705
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/816f3705
Branch: refs/heads/trunk
Commit: 816f3705ef7b274844363e8315e56ccf1f1cb8c7
Parents: a03e9f31
Author: Tomaz Muraus <to...@apache.org>
Authored: Wed Aug 20 20:14:49 2014 +0200
Committer: Tomaz Muraus <to...@apache.org>
Committed: Wed Aug 20 20:14:49 2014 +0200
----------------------------------------------------------------------
libcloud/common/base.py | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/816f3705/libcloud/common/base.py
----------------------------------------------------------------------
diff --git a/libcloud/common/base.py b/libcloud/common/base.py
index ae0e699..07647b2 100644
--- a/libcloud/common/base.py
+++ b/libcloud/common/base.py
@@ -345,8 +345,14 @@ class LoggingConnection():
cmd = ["curl"]
if self.http_proxy_used:
- proxy_url = 'http://%s:%s' % (self.proxy_host,
- self.proxy_port)
+ if self.proxy_username and self.proxy_password:
+ proxy_url = 'http://%s:%s@%s:%s' % (self.proxy_username,
+ self.proxy_password,
+ self.proxy_host,
+ self.proxy_port)
+ else:
+ proxy_url = 'http://%s:%s' % (self.proxy_host,
+ self.proxy_port)
proxy_url = pquote(proxy_url)
cmd.extend(['--proxy', proxy_url])