Skip to content

Commit

Permalink
Fix empty byte body as false
Browse files Browse the repository at this point in the history
  • Loading branch information
pyk committed Apr 29, 2020
1 parent aa3e0ac commit 0e5b84f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion samcli/local/apigw/local_apigw_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ def _construct_event_http(flask_request, port, binary_types, stage_name=None, st
LOG.debug("Incoming Request seems to be binary. Base64 encoding the request data before sending to Lambda.")
request_data = base64.b64encode(request_data)

if request_data:
if request_data is not None:
# Flask does not parse/decode the request data. We should do it ourselves
request_data = request_data.decode("utf-8")

Expand Down

0 comments on commit 0e5b84f

Please sign in to comment.