Permalink
Browse files

Bug #920497 fix X-Server-Management-Url for v1.0 noauth API

This regression was introduced in commit 2aa5bb9,
which discounted the v1.0 case

Change-Id: I44e03fbea6b79b1c2e2705b1f39e6c7aaaed9265
  • Loading branch information...
Pádraig Brady
Pádraig Brady committed Jan 23, 2012
1 parent 9faf925 commit e48106a2a5086c933d98043952d63c50c25df10b
Showing with 5 additions and 1 deletion.
  1. +1 −0 Authors
  2. +4 −1 nova/api/openstack/auth.py
View
@@ -103,6 +103,7 @@ Naveed Massjouni <naveedm9@gmail.com>
Nikolay Sokolov <nsokolov@griddynamics.com>
Nirmal Ranganathan <nirmal.ranganathan@rackspace.com>
Ollie Leahy <oliver.leahy@hp.com>
+Pádraig Brady <pbrady@redhat.com>
Paul Voccio <paul@openstack.org>
Renuka Apte <renuka.apte@citrix.com>
Ricardo Carrillo Cruz <emaildericky@gmail.com>
@@ -43,9 +43,12 @@ 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')
- os_url = os.path.join(req.url, project_id)
+ if version == '1.1':
+ os_url = os.path.join(os_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

0 comments on commit e48106a

Please sign in to comment.