Skip to content

Commit

Permalink
Fix for exception thrown when RAW_BODY is undefined
Browse files Browse the repository at this point in the history
Signed-off-by: David Bibby <davidsbibby@gmail.com>
  • Loading branch information
dsbibby authored and alexellis committed Jul 7, 2020
1 parent 7f9288a commit 0ca73dc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion template/python3-flask-armhf/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def fix_transfer_encoding():
@app.route("/", defaults={"path": ""}, methods=["POST", "GET"])
@app.route("/<path:path>", methods=["POST", "GET"])
def main_route(path):
raw_body = os.getenv("RAW_BODY")
raw_body = os.getenv("RAW_BODY", "false")

as_text = True

Expand Down
2 changes: 1 addition & 1 deletion template/python3-flask-debian/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def fix_transfer_encoding():
@app.route("/", defaults={"path": ""}, methods=["POST", "GET"])
@app.route("/<path:path>", methods=["POST", "GET"])
def main_route(path):
raw_body = os.getenv("RAW_BODY")
raw_body = os.getenv("RAW_BODY", "false")

as_text = True

Expand Down
2 changes: 1 addition & 1 deletion template/python3-flask/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def fix_transfer_encoding():
@app.route("/", defaults={"path": ""}, methods=["POST", "GET"])
@app.route("/<path:path>", methods=["POST", "GET"])
def main_route(path):
raw_body = os.getenv("RAW_BODY")
raw_body = os.getenv("RAW_BODY", "false")

as_text = True

Expand Down

0 comments on commit 0ca73dc

Please sign in to comment.