jneilliii / OctoPrint-RTMPStreamer

22 stars 13 forks source link

Potential OctoPrint 1.9.0/Werkzeug incompatibility #46

Open cp2004 opened 2 years ago

cp2004 commented 2 years ago

Just run a scan of every plugin on the repository to look for uses of request.json or request.get_json and this line came up:

https://github.com/jneilliii/OctoPrint-RTMPStreamer/blob/49ef1dde72755e14595b3ca0fb28ac7f690bef81/octoprint_rtmpstreamer/__init__.py#L84

In the new versions, it will throw a 400 Bad Request error if json is empty, instead of none.

Switch it to request.is_json for the test and it should be good.