diff options
| author | Barry Warsaw | 2010-07-06 22:58:27 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2010-07-06 22:58:27 -0400 |
| commit | 5896e00cc2fe7c04254e6f3005648039d42408e8 (patch) | |
| tree | 0487d4f7c15400069a96c95d762f7aa4cf91d8e4 /src/mailman/rest/helpers.py | |
| parent | db19156330bf6bbca9a6e13c5d85676e43be3b29 (diff) | |
| parent | 8f8ce7616cc8e6149b27fbcb8e581fc35c814c87 (diff) | |
| download | mailman-5896e00cc2fe7c04254e6f3005648039d42408e8.tar.gz mailman-5896e00cc2fe7c04254e6f3005648039d42408e8.tar.zst mailman-5896e00cc2fe7c04254e6f3005648039d42408e8.zip | |
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) |
