From 875e921bdafb84aa4043bb55ac2a1bf49ac5a1a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=2E=20K=C3=A4rkk=C3=A4inen?= Date: Wed, 20 Sep 2023 19:59:35 +0100 Subject: [PATCH] Do not strip entity-headers. --- sanic/response/types.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/sanic/response/types.py b/sanic/response/types.py index 0a8af725..b6992934 100644 --- a/sanic/response/types.py +++ b/sanic/response/types.py @@ -106,9 +106,6 @@ class BaseHTTPResponse: Returns: Iterator[Tuple[bytes, bytes]]: A list of header tuples encoded in bytes for sending """ # noqa: E501 - # TODO: Make a blacklist set of header names and then filter with that - if self.status in (304, 412): # Not Modified, Precondition Failed - self.headers = remove_entity_headers(self.headers) if has_message_body(self.status): self.headers.setdefault("content-type", self.content_type) # Encode headers into bytes