Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cb7b96c

Browse files
Fix forward apigateway_listener - Heals 2258
1 parent 06a5dfc commit cb7b96c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎localstack/services/apigateway/apigateway_listener.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,9 @@ def invoke_rest_api(api_id, stage, method, invocation_path, data, headers, path=
251251
parsed_result = common.json_safe(parsed_result)
252252
parsed_result = {} if parsed_result is None else parsed_result
253253
response.status_code = int(parsed_result.get('statusCode', 200))
254-
response.headers.update((parsed_result or {}).get('headers', {}))
254+
parsed_headers = parsed_result.get('headers', {})
255+
if parsed_headers is not None:
256+
response.headers.update(parsed_headers)
255257
try:
256258
if isinstance(parsed_result['body'], dict):
257259
response._content = json.dumps(parsed_result['body'])

0 commit comments

Comments
 (0)