From b938df97a25fefecf4144ec29a40e36433faff61 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Mon, 19 Jul 2021 02:59:12 -0700 Subject: [PATCH] remove unused parameter --- weed/server/filer_server_handlers.go | 8 ++++---- weed/server/filer_server_handlers_read.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/weed/server/filer_server_handlers.go b/weed/server/filer_server_handlers.go index 56a47c860..0389e1e18 100644 --- a/weed/server/filer_server_handlers.go +++ b/weed/server/filer_server_handlers.go @@ -35,11 +35,11 @@ func (fs *FilerServer) filerHandler(w http.ResponseWriter, r *http.Request) { switch r.Method { case "GET": stats.FilerRequestCounter.WithLabelValues("get").Inc() - fs.GetOrHeadHandler(w, r, true) + fs.GetOrHeadHandler(w, r) stats.FilerRequestHistogram.WithLabelValues("get").Observe(time.Since(start).Seconds()) case "HEAD": stats.FilerRequestCounter.WithLabelValues("head").Inc() - fs.GetOrHeadHandler(w, r, false) + fs.GetOrHeadHandler(w, r) stats.FilerRequestHistogram.WithLabelValues("head").Observe(time.Since(start).Seconds()) case "DELETE": stats.FilerRequestCounter.WithLabelValues("delete").Inc() @@ -95,11 +95,11 @@ func (fs *FilerServer) readonlyFilerHandler(w http.ResponseWriter, r *http.Reque switch r.Method { case "GET": stats.FilerRequestCounter.WithLabelValues("get").Inc() - fs.GetOrHeadHandler(w, r, true) + fs.GetOrHeadHandler(w, r) stats.FilerRequestHistogram.WithLabelValues("get").Observe(time.Since(start).Seconds()) case "HEAD": stats.FilerRequestCounter.WithLabelValues("head").Inc() - fs.GetOrHeadHandler(w, r, false) + fs.GetOrHeadHandler(w, r) stats.FilerRequestHistogram.WithLabelValues("head").Observe(time.Since(start).Seconds()) case "OPTIONS": stats.FilerRequestCounter.WithLabelValues("options").Inc() diff --git a/weed/server/filer_server_handlers_read.go b/weed/server/filer_server_handlers_read.go index 153f68f8f..957e08855 100644 --- a/weed/server/filer_server_handlers_read.go +++ b/weed/server/filer_server_handlers_read.go @@ -21,7 +21,7 @@ import ( "github.com/chrislusf/seaweedfs/weed/util" ) -func (fs *FilerServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request, isGetMethod bool) { +func (fs *FilerServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request) { path := r.URL.Path isForDirectory := strings.HasSuffix(path, "/")