From f3f44786c0bdf139c4b151c7e7b66b46399d7b9c Mon Sep 17 00:00:00 2001 From: Luc <8822552+luc-github@users.noreply.github.com> Date: Wed, 7 Oct 2020 10:56:06 +0200 Subject: [PATCH] Fix wrong authentication failed management for files served on flash --- esp3d/src/include/version.h | 2 +- esp3d/src/modules/http/handles/handle-filenotfound.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/esp3d/src/include/version.h b/esp3d/src/include/version.h index 8e29c1bd..3810be9a 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.a60" +#define FW_VERSION "3.0.0.a61" #define REPOSITORY "https://github.com/luc-github/ESP3D/tree/3.0" #endif //_VERSION_ESP3D_H diff --git a/esp3d/src/modules/http/handles/handle-filenotfound.cpp b/esp3d/src/modules/http/handles/handle-filenotfound.cpp index 5c252fac..9d208229 100644 --- a/esp3d/src/modules/http/handles/handle-filenotfound.cpp +++ b/esp3d/src/modules/http/handles/handle-filenotfound.cpp @@ -36,7 +36,7 @@ void HTTP_Server:: handle_not_found() { if (AuthenticationService::authenticated_level() == LEVEL_GUEST) { - _webserver->sendContent("HTTP/1.1 301 OK\r\nLocation: /\r\nCache-Control: no-cache\r\n\r\n"); + _webserver->send (401, "text/plain", "Wrong authentication!"); return; } String path = _webserver->urlDecode(_webserver->uri());