diff options
| author | Brian Waldon <brian.waldon@rackspace.com> | 2011-03-29 11:41:33 -0400 |
|---|---|---|
| committer | Brian Waldon <brian.waldon@rackspace.com> | 2011-03-29 11:41:33 -0400 |
| commit | d1ef69edb8da18c5c7e56b6006e22022d55d6664 (patch) | |
| tree | 680468e8a2426530c80763edadb7dd2261ce584d /nova/api | |
| parent | 6719b9cb8794f69b719976a8b30af189a2273d02 (diff) | |
adding code to explicitly set the content-type in versions controller; updating test
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/versions.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/nova/api/openstack/versions.py b/nova/api/openstack/versions.py index 33f1dd628..3f9d91934 100644 --- a/nova/api/openstack/versions.py +++ b/nova/api/openstack/versions.py @@ -15,8 +15,8 @@ # License for the specific language governing permissions and limitations # under the License. +import webob import webob.dec -import webob.exc from nova import wsgi import nova.api.openstack.views.versions @@ -51,4 +51,10 @@ class Versions(wsgi.Application): } content_type = req.best_match_content_type() - return wsgi.Serializer(metadata).serialize(response, content_type) + body = wsgi.Serializer(metadata).serialize(response, content_type) + + response = webob.Response() + response.content_type = content_type + response.body = body + + return response |
