Merge "Ensure HTTP 204 responses have 0 Content-Length"

This commit is contained in:
Jenkins 2016-06-14 20:28:50 +00:00 committed by Gerrit Code Review
commit 60816df192
3 changed files with 9 additions and 4 deletions

View File

@ -25,7 +25,9 @@ LOG = logging.getLogger(__name__)
class AbandonController(rest.RestController):
@pecan.expose(template='json:', content_type='application/json')
# NOTE: template=None is important here, template='json:' manifests
# in this bug: https://bugs.launchpad.net/designate/+bug/1592153
@pecan.expose(template=None, content_type='application/json')
@utils.validate_uuid('zone_id')
def post_all(self, zone_id):
"""Abandon a zone"""
@ -42,7 +44,6 @@ class AbandonController(rest.RestController):
else:
response.status_int = 500
# NOTE: This is a hack and a half.. But Pecan needs it.
return ''
@pecan.expose(template='json:', content_type='application/json')

View File

@ -118,7 +118,9 @@ class ZoneExportsController(rest.RestController):
zone_exports,
request=request)
@pecan.expose(template='json:', content_type='application/json')
# NOTE: template=None is important here, template='json:' manifests
# in this bug: https://bugs.launchpad.net/designate/+bug/1592153
@pecan.expose(template=None, content_type='application/json')
@utils.validate_uuid('zone_export_id')
def delete_one(self, zone_export_id):
"""Delete Zone Export"""

View File

@ -102,7 +102,9 @@ class ZoneImportController(rest.RestController):
# Prepare and return the response body
return zone_import
@pecan.expose(template='json:', content_type='application/json')
# NOTE: template=None is important here, template='json:' manifests
# in this bug: https://bugs.launchpad.net/designate/+bug/1592153
@pecan.expose(template=None, content_type='application/json')
@utils.validate_uuid('zone_import_id')
def delete_one(self, zone_import_id):
"""Delete Zone Import"""