From e8f61e2ddae0443b997a46118f6d18ce22da0c92 Mon Sep 17 00:00:00 2001 From: Mark Walker Date: Wed, 15 Apr 2015 17:17:19 -0700 Subject: [PATCH] Fix server error 500 when user is logged out f98ebaaf moved the passive_logon code to a new function from api/__init__.py to util/flask.py. Before that move any fallthrough would hit return NO_CONTENT, but now it returns nothing which makes flask complain. --- src/octoprint/server/util/flask.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/octoprint/server/util/flask.py b/src/octoprint/server/util/flask.py index 1d0bbe6f..45317066 100644 --- a/src/octoprint/server/util/flask.py +++ b/src/octoprint/server/util/flask.py @@ -58,6 +58,8 @@ def passive_login(): logger = logging.getLogger(__name__) logger.exception("Could not autologin user %s for networks %r" % (autologinAs, localNetworks)) + return ("", 204) + #~~ cache decorator for cacheable views @@ -303,4 +305,4 @@ def get_json_command_from_request(request, valid_commands): if not parameter in data: return None, None, make_response("Mandatory parameter %s missing for command %s" % (parameter, command), 400) - return command, data, None \ No newline at end of file + return command, data, None