Skip to content

Commit 0ca73dc

Browse files
dsbibbyalexellis
authored andcommitted
Fix for exception thrown when RAW_BODY is undefined
Signed-off-by: David Bibby <davidsbibby@gmail.com>
1 parent 7f9288a commit 0ca73dc

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

template/python3-flask-armhf/index.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def fix_transfer_encoding():
2727
@app.route("/", defaults={"path": ""}, methods=["POST", "GET"])
2828
@app.route("/<path:path>", methods=["POST", "GET"])
2929
def main_route(path):
30-
raw_body = os.getenv("RAW_BODY")
30+
raw_body = os.getenv("RAW_BODY", "false")
3131

3232
as_text = True
3333

template/python3-flask-debian/index.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def fix_transfer_encoding():
2727
@app.route("/", defaults={"path": ""}, methods=["POST", "GET"])
2828
@app.route("/<path:path>", methods=["POST", "GET"])
2929
def main_route(path):
30-
raw_body = os.getenv("RAW_BODY")
30+
raw_body = os.getenv("RAW_BODY", "false")
3131

3232
as_text = True
3333

template/python3-flask/index.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def fix_transfer_encoding():
2727
@app.route("/", defaults={"path": ""}, methods=["POST", "GET"])
2828
@app.route("/<path:path>", methods=["POST", "GET"])
2929
def main_route(path):
30-
raw_body = os.getenv("RAW_BODY")
30+
raw_body = os.getenv("RAW_BODY", "false")
3131

3232
as_text = True
3333

0 commit comments

Comments
 (0)