Merge pull request #2901 from kislyuk/patch-1
awslambda: Do not assume X-Amz-Invocation-Type is set
This commit is contained in:
commit
4f59a3584b
@ -184,9 +184,9 @@ class LambdaResponse(BaseResponse):
|
||||
function_name, qualifier, self.body, self.headers, response_headers
|
||||
)
|
||||
if payload:
|
||||
if request.headers["X-Amz-Invocation-Type"] == "Event":
|
||||
if request.headers.get("X-Amz-Invocation-Type") == "Event":
|
||||
status_code = 202
|
||||
elif request.headers["X-Amz-Invocation-Type"] == "DryRun":
|
||||
elif request.headers.get("X-Amz-Invocation-Type") == "DryRun":
|
||||
status_code = 204
|
||||
else:
|
||||
status_code = 200
|
||||
|
Loading…
Reference in New Issue
Block a user