diff options
| author | Barry Warsaw | 2010-08-10 12:59:16 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2010-08-10 12:59:16 -0400 |
| commit | e610dac8966ea1a0f09735a5bd249efd7b8060cb (patch) | |
| tree | 6e44379b09121fcdeeb4f80a763c2c7c15ebe09e /src/mailman/rest/helpers.py | |
| parent | 8d0f9f641e2069c96e90bc66d3fc856f32e984ec (diff) | |
| parent | 5896e00cc2fe7c04254e6f3005648039d42408e8 (diff) | |
| download | mailman-e610dac8966ea1a0f09735a5bd249efd7b8060cb.tar.gz mailman-e610dac8966ea1a0f09735a5bd249efd7b8060cb.tar.zst mailman-e610dac8966ea1a0f09735a5bd249efd7b8060cb.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) |
