From 85c80f0fc5f02ed406d662ddb390d71bd32ee34e Mon Sep 17 00:00:00 2001 From: Mehdi Abaakouk Date: Fri, 31 Jan 2014 17:16:30 +0100 Subject: Ensure url sent to proxy don't have redundant / When a proxy is set, the url requested to the proxy have a double // after the domain, but for ceilometer this kind of url is not valid. So, this patch ensures the url have only one / Closes-bug: #1274981 Change-Id: Id6fc5cf7ab7a3866bc23af7102785a9cede593fe --- ceilometerclient/common/http.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ceilometerclient/common') diff --git a/ceilometerclient/common/http.py b/ceilometerclient/common/http.py index d57bf0e..bb650b4 100644 --- a/ceilometerclient/common/http.py +++ b/ceilometerclient/common/http.py @@ -143,7 +143,8 @@ class HTTPClient(object): try: if self.proxy_url: - conn_url = self.endpoint + self._make_connection_url(url) + conn_url = (self.endpoint.rstrip('/') + + self._make_connection_url(url)) else: conn_url = self._make_connection_url(url) conn.request(method, conn_url, **kwargs) -- cgit v1.2.1