X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/66088cabf30c5291ad8894e7009d9c9af466c158..bdb24aacd6be5584fefc202452402ff4162c69ef:/services/keep-web/handler.go diff --git a/services/keep-web/handler.go b/services/keep-web/handler.go index 123c4fe34d..12c2839f8c 100644 --- a/services/keep-web/handler.go +++ b/services/keep-web/handler.go @@ -27,15 +27,13 @@ import ( "git.arvados.org/arvados.git/sdk/go/auth" "git.arvados.org/arvados.git/sdk/go/ctxlog" "git.arvados.org/arvados.git/sdk/go/httpserver" - "git.arvados.org/arvados.git/sdk/go/keepclient" "github.com/sirupsen/logrus" "golang.org/x/net/webdav" ) type handler struct { - Cache cache - Cluster *arvados.Cluster - setupOnce sync.Once + Cache cache + Cluster *arvados.Cluster lockMtx sync.Mutex lock map[string]*sync.RWMutex @@ -60,10 +58,6 @@ func parseCollectionIDFromURL(s string) string { return "" } -func (h *handler) setup() { - keepclient.DefaultBlockCache.MaxBlocks = h.Cluster.Collections.WebDAVCache.MaxBlockEntries -} - func (h *handler) serveStatus(w http.ResponseWriter, r *http.Request) { json.NewEncoder(w).Encode(struct{ Version string }{cmd.Version.String()}) } @@ -179,8 +173,6 @@ func (h *handler) Done() <-chan struct{} { // ServeHTTP implements http.Handler. func (h *handler) ServeHTTP(wOrig http.ResponseWriter, r *http.Request) { - h.setupOnce.Do(h.setup) - if xfp := r.Header.Get("X-Forwarded-Proto"); xfp != "" && xfp != "http" { r.URL.Scheme = xfp }