refactor all methods strings to const (#5726)
This commit is contained in:
committed by
GitHub
parent
0fdf7eca48
commit
5ffacbb6ea
@@ -226,7 +226,7 @@ func (fs *FilerServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request)
|
||||
AdjustPassthroughHeaders(w, r, filename)
|
||||
totalSize := int64(entry.Size())
|
||||
|
||||
if r.Method == "HEAD" {
|
||||
if r.Method == http.MethodHead {
|
||||
w.Header().Set("Content-Length", strconv.FormatInt(totalSize, 10))
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user