summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorAlex Meade <alex.meade@rackspace.com>2011-10-28 12:32:47 -0400
committerAlex Meade <alex.meade@rackspace.com>2011-10-28 12:33:12 -0400
commit566f564a60fc5309441d6624fc70389ffc28773f (patch)
tree4cb670e3e3c736462be5a330b7e31d4c899a33e8 /nova/api
parenta448fa066ceb21ee1ef9aa542198145e1ff0dff2 (diff)
Updated NoAuth to account for requests ending in /
Fixes bug 882742 Change-Id: I19d527c5d16f73de2841e9d69872da6979f71886
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/auth.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/nova/api/openstack/auth.py b/nova/api/openstack/auth.py
index 6754fea27..d435f8318 100644
--- a/nova/api/openstack/auth.py
+++ b/nova/api/openstack/auth.py
@@ -16,6 +16,7 @@
# under the License.
import hashlib
+import os
import time
import webob.exc
@@ -42,12 +43,9 @@ class NoAuthMiddleware(wsgi.Middleware):
@webob.dec.wsgify(RequestClass=wsgi.Request)
def __call__(self, req):
if 'X-Auth-Token' not in req.headers:
- os_url = req.url
- version = common.get_version_from_href(os_url)
user_id = req.headers.get('X-Auth-User', 'admin')
project_id = req.headers.get('X-Auth-Project-Id', 'admin')
- if version == '1.1':
- os_url += '/' + project_id
+ os_url = os.path.join(req.url, project_id)
res = webob.Response()
# NOTE(vish): This is expecting and returning Auth(1.1), whereas
# keystone uses 2.0 auth. We should probably allow