From 9c3b14c5c43f7b28e89f52b395f87e715bd93026 Mon Sep 17 00:00:00 2001 From: Deluan Date: Tue, 26 Jul 2022 13:18:08 -0400 Subject: [PATCH] Return 501 for "not implemented". Fixes #1785 --- server/subsonic/api.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/subsonic/api.go b/server/subsonic/api.go index 9f039c705e8..2c551d2086e 100644 --- a/server/subsonic/api.go +++ b/server/subsonic/api.go @@ -200,12 +200,12 @@ func h(r chi.Router, path string, f handler) { r.HandleFunc("/"+path+".view", handle) } -// Add a handler that returns 510 - Not implemented. Used to signal that an endpoint is not implemented yet +// Add a handler that returns 501 - Not implemented. Used to signal that an endpoint is not implemented yet func h501(r *chi.Mux, paths ...string) { for _, path := range paths { handle := func(w http.ResponseWriter, r *http.Request) { w.Header().Add("Cache-Control", "no-cache") - w.WriteHeader(510) + w.WriteHeader(501) _, _ = w.Write([]byte("This endpoint is not implemented, but may be in future releases")) } r.HandleFunc("/"+path, handle)