summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/wsgi.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/nova/api/openstack/wsgi.py b/nova/api/openstack/wsgi.py
index eda82483f..bf5627b3a 100644
--- a/nova/api/openstack/wsgi.py
+++ b/nova/api/openstack/wsgi.py
@@ -972,7 +972,6 @@ class Resource(wsgi.Application):
# Run post-processing extensions
if resp_obj:
- _set_request_id_header(request, resp_obj)
# Do a preserialize to set up the response object
serializers = getattr(meth, 'wsgi_serializers', {})
resp_obj._bind_method_serializers(serializers)
@@ -988,6 +987,9 @@ class Resource(wsgi.Application):
response = resp_obj.serialize(request, accept,
self.default_serializers)
+ if context and hasattr(response, 'headers'):
+ response.headers.add('x-compute-request-id', context.request_id)
+
return response
def get_method(self, request, action, content_type, body):