Repository: libcloud Updated Branches: refs/heads/trunk 10f987905 -> c8ba7fe0b
fix issue where port is not propagated down to connection URL Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/6261cc5f Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/6261cc5f Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/6261cc5f Branch: refs/heads/trunk Commit: 6261cc5fbb436283df4bb4265f01d4eeabb6c80e Parents: 10f9879 Author: Anthony Shaw <anthonys...@apache.org> Authored: Mon Jan 9 17:19:34 2017 +1100 Committer: Anthony Shaw <anthonys...@apache.org> Committed: Mon Jan 9 17:19:34 2017 +1100 ---------------------------------------------------------------------- libcloud/httplib_ssl.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/libcloud/blob/6261cc5f/libcloud/httplib_ssl.py ---------------------------------------------------------------------- diff --git a/libcloud/httplib_ssl.py b/libcloud/httplib_ssl.py index f47e491..6aff1b3 100644 --- a/libcloud/httplib_ssl.py +++ b/libcloud/httplib_ssl.py @@ -163,9 +163,10 @@ class LibcloudConnection(LibcloudBaseConnection): response = None def __init__(self, host, port, **kwargs): - self.host = '{0}://{1}'.format( + self.host = '{0}://{1}{2}'.format( 'https' if port == 443 else 'http', - host + host, + ":{0}".format(port) if port not in (80, 443) else "" ) # Support for HTTP proxy proxy_url_env = os.environ.get(HTTP_PROXY_ENV_VARIABLE_NAME, None)