diff options
author | Tomasz Kramkowski <tomasz@kramkow.ski> | 2023-03-27 18:55:06 +0100 |
---|---|---|
committer | Tomasz Kramkowski <tomasz@kramkow.ski> | 2023-03-27 19:01:34 +0100 |
commit | d596966220975363905cc3dadd693562312017f4 (patch) | |
tree | e6f91199aacde3927f1ed0821a621d018f09031e | |
parent | 2929503768af22a4f5f66d0f40b82806e86bc374 (diff) | |
download | paste-d596966220975363905cc3dadd693562312017f4.tar.gz paste-d596966220975363905cc3dadd693562312017f4.tar.xz paste-d596966220975363905cc3dadd693562312017f4.zip |
make DELETE not return content
simple_response automatically includes a body which is not valid for
204 responses
-rw-r--r-- | paste/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/paste/__init__.py b/paste/__init__.py index 76a20a3..83cd6b5 100644 --- a/paste/__init__.py +++ b/paste/__init__.py @@ -264,5 +264,6 @@ def application(environ: Env, start_response: StartResponse) -> Response: return [] elif environ["REQUEST_METHOD"] == "DELETE": store.delete(conn, name) - return simple_response(start_response, "204 No Content") + start_response("204 No Content", []) + return [] return simple_response(start_response, "500 Internal Server Error") |