Merge "Fix endpoint error when running keystone on apache"

This commit is contained in:
Jenkins 2014-05-01 09:44:32 +00:00 committed by Gerrit Code Review
commit 82cc22b912

View File

@ -113,9 +113,8 @@ def _get_endpoint_url(request, endpoint_type, catalog=None):
# TODO(gabriel): When the Service Catalog no longer contains API versions
# in the endpoints this can be removed.
bits = urlparse.urlparse(url)
root = "://".join((bits.scheme, bits.netloc))
url = "%s/v%s" % (root, VERSIONS.active)
url = url.rstrip('/')
url = urlparse.urljoin(url, 'v%s' % VERSIONS.active)
return url