diff --git a/keystone/tests/unit/test_contrib_simple_cert.py b/keystone/tests/unit/test_contrib_simple_cert.py index 111aa5c66b..b9e750f0c0 100644 --- a/keystone/tests/unit/test_contrib_simple_cert.py +++ b/keystone/tests/unit/test_contrib_simple_cert.py @@ -36,6 +36,12 @@ class TestSimpleCert(BaseTestCase): self.assertEqual(content_type, response.content_type.lower()) self.assertIn(b'---BEGIN', response.body) + # Test the same path with HEAD + self.request( + app=self.public_app, method='HEAD', path=path, + headers={'Accept': content_type}, expected_status=http_client.OK + ) + return response def test_ca_cert(self): diff --git a/keystone/token/_simple_cert.py b/keystone/token/_simple_cert.py index 6cc4128a62..301ea383cd 100644 --- a/keystone/token/_simple_cert.py +++ b/keystone/token/_simple_cert.py @@ -60,12 +60,12 @@ class Routers(wsgi.RoutersBase): self._add_resource( mapper, controller, path=self._construct_url('ca'), - get_action='get_ca_certificate', + get_head_action='get_ca_certificate', rel=build_resource_relation(resource_name='ca_certificate')) self._add_resource( mapper, controller, path=self._construct_url('certificates'), - get_action='list_certificates', + get_head_action='list_certificates', rel=build_resource_relation(resource_name='certificates'))