diff --git a/zaqar/queues/transport/wsgi/v1_1/claims.py b/zaqar/queues/transport/wsgi/v1_1/claims.py index 69e84111c..85f337e8b 100644 --- a/zaqar/queues/transport/wsgi/v1_1/claims.py +++ b/zaqar/queues/transport/wsgi/v1_1/claims.py @@ -158,7 +158,6 @@ class ItemResource(object): meta['href'] = req.path del meta['id'] - resp.content_location = req.relative_uri resp.body = utils.to_json(meta) # status defaults to 200 diff --git a/zaqar/queues/transport/wsgi/v1_1/flavors.py b/zaqar/queues/transport/wsgi/v1_1/flavors.py index 36196c2ae..42ecbadb1 100644 --- a/zaqar/queues/transport/wsgi/v1_1/flavors.py +++ b/zaqar/queues/transport/wsgi/v1_1/flavors.py @@ -65,7 +65,6 @@ class Listing(object): response.status = falcon.HTTP_204 return - response.content_location = request.relative_uri response.body = transport_utils.to_json(results) response.status = falcon.HTTP_200 @@ -112,7 +111,6 @@ class Resource(object): # remove the name entry - it isn't needed on GET del data['name'] response.body = transport_utils.to_json(data) - response.content_location = request.relative_uri def on_put(self, request, response, project_id, flavor): """Registers a new flavor. Expects the following input: diff --git a/zaqar/queues/transport/wsgi/v1_1/health.py b/zaqar/queues/transport/wsgi/v1_1/health.py index 7ee29f7ba..ebd114b2c 100644 --- a/zaqar/queues/transport/wsgi/v1_1/health.py +++ b/zaqar/queues/transport/wsgi/v1_1/health.py @@ -32,9 +32,8 @@ class Resource(object): try: resp_dict = self.driver.health() - resp.content_location = req.path resp.body = utils.to_json(resp_dict) except Exception as ex: LOG.exception(ex) description = _(u'Health status could not be read.') - raise wsgi_errors.HTTPServiceUnavailable(description) \ No newline at end of file + raise wsgi_errors.HTTPServiceUnavailable(description) diff --git a/zaqar/queues/transport/wsgi/v1_1/messages.py b/zaqar/queues/transport/wsgi/v1_1/messages.py index 5a3a878a0..3ec4a573a 100644 --- a/zaqar/queues/transport/wsgi/v1_1/messages.py +++ b/zaqar/queues/transport/wsgi/v1_1/messages.py @@ -212,8 +212,6 @@ class CollectionResource(object): u'project: %(project)s', {'queue': queue_name, 'project': project_id}) - resp.content_location = req.relative_uri - ids = req.get_param_as_list('ids') if ids is None: @@ -325,7 +323,6 @@ class ItemResource(object): # Prepare response message['href'] = req.path - resp.content_location = req.relative_uri resp.body = utils.to_json(message) # status defaults to 200 diff --git a/zaqar/queues/transport/wsgi/v1_1/pools.py b/zaqar/queues/transport/wsgi/v1_1/pools.py index c14b7d989..06cc8b6f6 100644 --- a/zaqar/queues/transport/wsgi/v1_1/pools.py +++ b/zaqar/queues/transport/wsgi/v1_1/pools.py @@ -82,7 +82,6 @@ class Listing(object): response.status = falcon.HTTP_204 return - response.content_location = request.relative_uri response.body = transport_utils.to_json(results) response.status = falcon.HTTP_200 @@ -125,7 +124,6 @@ class Resource(object): # remove the name entry - it isn't needed on GET del data['name'] response.body = transport_utils.to_json(data) - response.content_location = request.relative_uri def on_put(self, request, response, project_id, pool): """Registers a new pool. Expects the following input: diff --git a/zaqar/queues/transport/wsgi/v1_1/stats.py b/zaqar/queues/transport/wsgi/v1_1/stats.py index 7ae729e5e..d50983eee 100644 --- a/zaqar/queues/transport/wsgi/v1_1/stats.py +++ b/zaqar/queues/transport/wsgi/v1_1/stats.py @@ -50,7 +50,6 @@ class Resource(object): oldest['href'] = base_path + oldest['id'] del oldest['id'] - resp.content_location = req.path resp.body = utils.to_json(resp_dict) # status defaults to 200 @@ -62,7 +61,6 @@ class Resource(object): 'total': 0 } } - resp.content_location = req.path resp.body = utils.to_json(resp_dict) except storage_errors.DoesNotExist as ex: diff --git a/zaqar/tests/queues/transport/wsgi/v1_1/test_claims.py b/zaqar/tests/queues/transport/wsgi/v1_1/test_claims.py index d06c67988..beafd4c6f 100644 --- a/zaqar/tests/queues/transport/wsgi/v1_1/test_claims.py +++ b/zaqar/tests/queues/transport/wsgi/v1_1/test_claims.py @@ -181,8 +181,6 @@ class ClaimsBaseTest(base.V1_1Base): claim = jsonutils.loads(body[0]) self.assertEqual(self.srmock.status, falcon.HTTP_200) - self.assertEqual(self.srmock.headers_dict['Content-Location'], - claim_href) self.assertEqual(claim['ttl'], 100) # NOTE(cpp-cabrera): verify that claim age is non-negative self.assertThat(claim['age'], matchers.GreaterThan(-1)) diff --git a/zaqar/tests/queues/transport/wsgi/v1_1/test_messages.py b/zaqar/tests/queues/transport/wsgi/v1_1/test_messages.py index 1b50194ff..f1f27e1c4 100644 --- a/zaqar/tests/queues/transport/wsgi/v1_1/test_messages.py +++ b/zaqar/tests/queues/transport/wsgi/v1_1/test_messages.py @@ -111,8 +111,6 @@ class MessagesBaseTest(base.V1_1Base): # Correct project ID result = self.simulate_get(message_uri, headers=self.headers) self.assertEqual(self.srmock.status, falcon.HTTP_200) - self.assertEqual(self.srmock.headers_dict['Content-Location'], - message_uri) # Check message properties message = jsonutils.loads(result[0]) @@ -352,8 +350,6 @@ class MessagesBaseTest(base.V1_1Base): headers=self.headers) self.assertEqual(self.srmock.status, falcon.HTTP_200) - self.assertEqual(self.srmock.headers_dict['Content-Location'], - path + '?' + query_string) cnt = 0 while jsonutils.loads(body[0])['messages'] != []: @@ -379,8 +375,6 @@ class MessagesBaseTest(base.V1_1Base): self.assertEqual(self.srmock.status, falcon.HTTP_200) message_stats = jsonutils.loads(body[0])['messages'] - self.assertEqual(self.srmock.headers_dict['Content-Location'], - self.queue_path + '/stats') # NOTE(kgriffs): The other parts of the stats are tested # in tests.storage.base and so are not repeated here.