Don't use posixpath for URLs

Use URL functions instead.

Fixes bug #1208618

Change-Id: I27bb29a6422200a1a522c50335e5d93d495ec429
This commit is contained in:
Justin Santa Barbara
2013-08-05 14:42:19 -07:00
parent 43e71e3993
commit a30981e7f0

View File

@@ -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)