diff options
Diffstat (limited to 'src/mailman/rest/helpers.py')
| -rw-r--r-- | src/mailman/rest/helpers.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mailman/rest/helpers.py b/src/mailman/rest/helpers.py index 8a82ebb60..be5d2b565 100644 --- a/src/mailman/rest/helpers.py +++ b/src/mailman/rest/helpers.py @@ -23,6 +23,7 @@ __metaclass__ = type __all__ = [ 'ContainerMixin', 'etag', + 'no_content', 'path_to', 'restish_matcher', ] @@ -32,8 +33,11 @@ import json import hashlib from lazr.config import as_boolean +from restish.http import Response + from mailman.config import config + COMMASPACE = ', ' @@ -173,3 +177,9 @@ def restish_matcher(function): """Decorator for restish matchers.""" function.score = () return function + + +# restish doesn't support HTTP response code 204. +def no_content(): + """204 No Content.""" + return Response('204 No Content', [], None) |
