From 6a27997abb1944f19feedf52b9f1415c15157861 Mon Sep 17 00:00:00 2001 From: liyi Date: Thu, 1 Feb 2018 14:56:03 +0800 Subject: Fix log_http_request function in http module Change-Id: I043f90541c8d2d604f3edb4e7ea082ec8adb4b25 Closes-Bug: #1746669 --- heatclient/common/http.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'heatclient') diff --git a/heatclient/common/http.py b/heatclient/common/http.py index 4b765df..bb2f0c1 100644 --- a/heatclient/common/http.py +++ b/heatclient/common/http.py @@ -137,7 +137,10 @@ class HTTPClient(object): if 'data' in kwargs: curl.append('-d \'%s\'' % kwargs['data']) - curl.append('%s%s' % (self.endpoint, url)) + if not parse.urlparse(url).netloc: + url = self.endpoint + url + + curl.append(url) LOG.debug(' '.join(curl)) @staticmethod -- cgit v1.2.1