From d596966220975363905cc3dadd693562312017f4 Mon Sep 17 00:00:00 2001 From: Tomasz Kramkowski Date: Mon, 27 Mar 2023 18:55:06 +0100 Subject: make DELETE not return content simple_response automatically includes a body which is not valid for 204 responses --- paste/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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") -- cgit v1.2.3-54-g00ecf