diff options
| author | William Wolf <throughnothing@gmail.com> | 2011-07-27 14:24:35 -0400 |
|---|---|---|
| committer | William Wolf <throughnothing@gmail.com> | 2011-07-27 14:24:35 -0400 |
| commit | 22beaf8802fdc44242f4a96e291c4fbb60af0e3a (patch) | |
| tree | 0a63717a274a1247edaeb0d17e34423e88e40b8e | |
| parent | 9a84b87ae04dc5220f95992d9a6c4e210fbc374f (diff) | |
make atom+xml accept header be ignored on 300 responses in the VersionsRequestDeserializer
| -rw-r--r-- | nova/api/openstack/versions.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/nova/api/openstack/versions.py b/nova/api/openstack/versions.py index c39e9dae7..e063ff272 100644 --- a/nova/api/openstack/versions.py +++ b/nova/api/openstack/versions.py @@ -206,6 +206,14 @@ class VersionV11(object): class VersionsRequestDeserializer(wsgi.RequestDeserializer): + def get_expected_content_type(self, request): + supported_content_types = list(self.supported_content_types) + if request.path != '/': + # Remove atom+xml accept type for 300 responses + del supported_content_types[2] + + return request.best_match_content_type(supported_content_types) + def get_action_args(self, request_environment): """Parse dictionary created by routes library.""" args = {} |
