From 84494edab43b415fedff4780088887aee913e7b1 Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Sun, 16 Sep 2018 09:32:24 +0200 Subject: [PATCH] cmd/syncthing: Return "Forbidden" for REST API debug endpoints when debugging disabled The previous "Bad Request" was really confusing as it implies it's somethign wrong with the request, which there isn't - the problem is that server configuration forbids the request. --- cmd/syncthing/gui.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/syncthing/gui.go b/cmd/syncthing/gui.go index 0aa39809..fdc2e912 100644 --- a/cmd/syncthing/gui.go +++ b/cmd/syncthing/gui.go @@ -592,7 +592,7 @@ func (s *apiService) whenDebugging(h http.Handler) http.Handler { return } - http.Error(w, "Debugging disabled", http.StatusBadRequest) + http.Error(w, "Debugging disabled", http.StatusForbidden) }) }