Skip to content

Commit 0e3a17c

Browse files
feat(event_handler): improved support for headers and cookies in v2 (aws-powertools#1455)
Co-authored-by: Heitor Lessa <[email protected]>
1 parent 2affda8 commit 0e3a17c

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"] = "gzip"
209+
self.response.headers["Content-Encoding"].append("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)