diff --git a/AUTHORS.md b/AUTHORS.md index ef24edf84..b9e3aaea1 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -173,6 +173,7 @@ date of first contribution): * [Arkadiusz Miƛkiewicz](https://github.com/arekm) * ["tempodat"](https://github.com/tempodat) * [Frederik Kemner](https://github.com/040medien) + * [Moiz Rasheed](https://github.com/msrasheed) * [Scott Martin](https://github.com/smartin015) OctoPrint started off as a fork of [Cura](https://github.com/daid/Cura) by diff --git a/src/octoprint/server/util/tornado.py b/src/octoprint/server/util/tornado.py index 1882a735b..0957fb577 100644 --- a/src/octoprint/server/util/tornado.py +++ b/src/octoprint/server/util/tornado.py @@ -795,6 +795,14 @@ class WsgiInputContainer: environ["CONTENT_TYPE"] = request.headers.pop("Content-Type") if "Content-Length" in request.headers: environ["CONTENT_LENGTH"] = request.headers.pop("Content-Length") + + # remove transfer encoding header if chunked, otherwise flask wsgi entrypoint makes input empty + if ( + "Transfer-Encoding" in request.headers + and request.headers.get("Transfer-Encoding") == "chunked" + ): + request.headers.pop("Transfer-Encoding") + for key, value in request.headers.items(): environ["HTTP_" + key.replace("-", "_").upper()] = value return environ