Skip to content

Commit 123517a

Browse files
rubenfonsecaTankanow
authored andcommitted
fix(event_handler): fix bug with previous array implementation
1 parent 3424f61 commit 123517a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

aws_lambda_powertools/event_handler/api_gateway.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ def _add_cache_control(self, cache_control: str):
206206

207207
def _compress(self):
208208
"""Compress the response body, but only if `Accept-Encoding` headers includes gzip."""
209-
self.response.headers["Content-Encoding"].append("gzip")
209+
self.response.headers["Content-Encoding"] = "gzip"
210210
if isinstance(self.response.body, str):
211211
logger.debug("Converting string response to bytes before compressing it")
212212
self.response.body = bytes(self.response.body, "utf-8")

0 commit comments

Comments
 (0)