From: Sebastián Ramírez Date: Mon, 15 Jan 2024 10:32:16 +0000 (+0100) Subject: ✨ Include HTTP 205 in status codes with no body (#10969) X-Git-Tag: 0.109.1~220 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dcc952d6990c507956669e6fc5cddba0530c79d1;p=thirdparty%2Ffastapi%2Ffastapi.git ✨ Include HTTP 205 in status codes with no body (#10969) --- diff --git a/fastapi/utils.py b/fastapi/utils.py index 0019c21532..53b2fa0c36 100644 --- a/fastapi/utils.py +++ b/fastapi/utils.py @@ -53,7 +53,7 @@ def is_body_allowed_for_status_code(status_code: Union[int, str, None]) -> bool: }: return True current_status_code = int(status_code) - return not (current_status_code < 200 or current_status_code in {204, 304}) + return not (current_status_code < 200 or current_status_code in {204, 205, 304}) def get_path_param_names(path: str) -> Set[str]: