Skip to content

Commit

Permalink
Bug #920497 fix X-Server-Management-Url for v1.0 noauth API
Browse files Browse the repository at this point in the history
This regression was introduced in commit 2aa5bb9,
which discounted the v1.0 case

Change-Id: I44e03fbea6b79b1c2e2705b1f39e6c7aaaed9265
  • Loading branch information
Pádraig Brady committed Jan 23, 2012
1 parent 9faf925 commit e48106a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions Authors
Expand Up @@ -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>
Expand Down
5 changes: 4 additions & 1 deletion nova/api/openstack/auth.py
Expand Up @@ -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
Expand Down

0 comments on commit e48106a

Please sign in to comment.