From c048c440ff3c16ae923e3068142ac60cb01a7f2b Mon Sep 17 00:00:00 2001 From: Luc <8822552+luc-github@users.noreply.github.com> Date: Fri, 2 Apr 2021 09:24:57 +0200 Subject: [PATCH] Send immediately 401 when disconnect --- esp3d/src/include/version.h | 2 +- esp3d/src/modules/http/handles/handle-login.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/esp3d/src/include/version.h b/esp3d/src/include/version.h index 62cf4dac..9279052b 100644 --- a/esp3d/src/include/version.h +++ b/esp3d/src/include/version.h @@ -22,7 +22,7 @@ #define _VERSION_ESP3D_H //version and sources location -#define FW_VERSION "3.0.0.a93" +#define FW_VERSION "3.0.0.a94" #define REPOSITORY "https://github.com/luc-github/ESP3D/tree/3.0" #endif //_VERSION_ESP3D_H diff --git a/esp3d/src/modules/http/handles/handle-login.cpp b/esp3d/src/modules/http/handles/handle-login.cpp index 12609bcb..1e1e9b34 100644 --- a/esp3d/src/modules/http/handles/handle-login.cpp +++ b/esp3d/src/modules/http/handles/handle-login.cpp @@ -41,7 +41,7 @@ void HTTP_Server::handle_login() AuthenticationService::ClearCurrentSession(); _webserver->sendHeader("Set-Cookie","ESPSESSIONID=0"); _webserver->sendHeader("Cache-Control","no-cache"); - _webserver->send(200, "application/json", "{\"status\":\"ok\",\"authentication_lvl\":\"guest\"}"); + _webserver->send(401, "application/json", "{\"status\":\"disconnected\",\"authentication_lvl\":\"guest\"}"); return; } level_authenticate_type auth_level = AuthenticationService::authenticated_level();