From acc9984c17661991b3d4c06688908748a0a9c902 Mon Sep 17 00:00:00 2001 From: WhoSoup Date: Tue, 4 Feb 2020 07:25:45 +0100 Subject: [PATCH 1/2] reverse pr 897 --- wsapi/debugapi.go | 2 +- wsapi/wsapi.go | 2 +- wsapi/wsapiV1.go | 2 +- wsapi/wsapiV2.go | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/wsapi/debugapi.go b/wsapi/debugapi.go index 77ddc2aa73..ec828d39e5 100644 --- a/wsapi/debugapi.go +++ b/wsapi/debugapi.go @@ -30,7 +30,7 @@ func HandleDebug(writer http.ResponseWriter, request *http.Request) { state, err := GetState(request) if err != nil { wsDebugLog.Errorf("failed to extract port from request: %s", err) - writer.WriteHeader(http.StatusOK) + writer.WriteHeader(http.StatusBadRequest) return } diff --git a/wsapi/wsapi.go b/wsapi/wsapi.go index 215c98a7c1..0856fc0a8f 100644 --- a/wsapi/wsapi.go +++ b/wsapi/wsapi.go @@ -133,7 +133,7 @@ func returnV1Msg(writer http.ResponseWriter, msg string, success bool) { } func handleV1Error(writer http.ResponseWriter, err *primitives.JSONError) { - writer.WriteHeader(http.StatusOK) + writer.WriteHeader(http.StatusBadRequest) return } diff --git a/wsapi/wsapiV1.go b/wsapi/wsapiV1.go index 357f0c98db..ed4b6e2a3c 100644 --- a/wsapi/wsapiV1.go +++ b/wsapi/wsapiV1.go @@ -64,7 +64,7 @@ func checkHttpPasswordOkV1(writer http.ResponseWriter, request *http.Request) bo } } else { wsLog.Errorf("failed to get state from request: %s", err) - writer.WriteHeader(http.StatusOK) + writer.WriteHeader(http.StatusBadRequest) return false } return true diff --git a/wsapi/wsapiV2.go b/wsapi/wsapiV2.go index 1486b8880a..0aa55edea5 100644 --- a/wsapi/wsapiV2.go +++ b/wsapi/wsapiV2.go @@ -41,7 +41,7 @@ func HandleV2(writer http.ResponseWriter, request *http.Request) { state, err := GetState(request) if err != nil { wsLog.Errorf("failed to extract port from request: %s", err) - writer.WriteHeader(http.StatusOK) + writer.WriteHeader(http.StatusBadRequest) return } @@ -520,7 +520,7 @@ func HandleV2Error(writer http.ResponseWriter, j *primitives.JSON2Request, jErr } resp.Error = jErr - writer.WriteHeader(http.StatusOK) + writer.WriteHeader(http.StatusBadRequest) _, err := writer.Write([]byte(resp.String())) if err != nil { wsLog.Errorf("failed to write error response: %v", err) From fe84cbb4c87bcd5d283e49153876617c4f97a091 Mon Sep 17 00:00:00 2001 From: Brian Deery Date: Tue, 4 Feb 2020 17:10:43 -0600 Subject: [PATCH 2/2] change version to 6.5.2 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index a194c18e86..5e3ec53ea6 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -6.5.1 +6.5.2