summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Santa Barbara <justin@fathomdb.com>2013-08-05 14:42:19 -0700
committerJustin Santa Barbara <justin@fathomdb.com>2013-08-05 14:42:19 -0700
commita30981e7f03317b1be06c05ff68833ffe3719fe0 (patch)
treebfccbf12c538b83b773dece160c61c5b846cf768
parent43e71e399372102f8ef4a3b7ad836fe16ace63a3 (diff)
downloadpython-glanceclient-a30981e7f03317b1be06c05ff68833ffe3719fe0.tar.gz
Don't use posixpath for URLs
Use URL functions instead. Fixes bug #1208618 Change-Id: I27bb29a6422200a1a522c50335e5d93d495ec429
-rw-r--r--glanceclient/common/http.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/glanceclient/common/http.py b/glanceclient/common/http.py
index 5a888dd..f6963b2 100644
--- a/glanceclient/common/http.py
+++ b/glanceclient/common/http.py
@@ -16,7 +16,6 @@
import copy
import httplib
import logging
-import posixpath
import socket
import StringIO
import struct
@@ -189,8 +188,8 @@ class HTTPClient(object):
try:
if self.endpoint_path:
- url = '%s/%s' % (self.endpoint_path, url)
- conn_url = posixpath.normpath(url)
+ url = urlparse.urljoin(self.endpoint_path, url)
+ conn_url = urlparse.urlsplit(url).geturl()
# Note(flaper87): Ditto, headers / url
# encoding to make httplib happy.
conn_url = strutils.safe_encode(conn_url)