summaryrefslogtreecommitdiffstats
path: root/keystone/common/wsgi.py
diff options
context:
space:
mode:
authorlong-wang <long.wang@bj.cs2c.com.cn>2012-10-15 15:25:33 +0800
committerlong-wang <long.wang@bj.cs2c.com.cn>2012-10-15 15:25:33 +0800
commiteb6681fca927b3296bbc43ee0fec6d034e83cbea (patch)
tree995dd6159eb7e8755675c670de7f8d6f29f319c5 /keystone/common/wsgi.py
parentd05d1128490377e4c50311c40d0901aa5b63c4bc (diff)
downloadkeystone-eb6681fca927b3296bbc43ee0fec6d034e83cbea.tar.gz
keystone-eb6681fca927b3296bbc43ee0fec6d034e83cbea.tar.xz
keystone-eb6681fca927b3296bbc43ee0fec6d034e83cbea.zip
Fix Not Found error, when router not match.
Fixes bug 1065234 when the router not match, keystone should return 404 error with json format or xml format. Not the webob.exc.HTTPNotFound() in html format. Change-Id: I88e873b65db5df8393c0bb22db0e98712d77e350
Diffstat (limited to 'keystone/common/wsgi.py')
-rw-r--r--keystone/common/wsgi.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/keystone/common/wsgi.py b/keystone/common/wsgi.py
index 91f38d09..53279c1a 100644
--- a/keystone/common/wsgi.py
+++ b/keystone/common/wsgi.py
@@ -415,7 +415,8 @@ class Router(object):
"""
match = req.environ['wsgiorg.routing_args'][1]
if not match:
- return webob.exc.HTTPNotFound()
+ return render_exception(
+ exception.NotFound(message='The resource could not be found.'))
app = match['controller']
return app