Merge "Ensure HEAD is supported with simple cert"

This commit is contained in:
Jenkins 2017-06-23 05:23:44 +00:00 committed by Gerrit Code Review
commit 0a664b224a
2 changed files with 8 additions and 2 deletions

View File

@ -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):

View File

@ -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'))