aboutsummaryrefslogtreecommitdiff
path: root/weed/server/filer_server_handlers_read.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/server/filer_server_handlers_read.go')
-rw-r--r--weed/server/filer_server_handlers_read.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/weed/server/filer_server_handlers_read.go b/weed/server/filer_server_handlers_read.go
index 94e8e4fed..a02e6c2c1 100644
--- a/weed/server/filer_server_handlers_read.go
+++ b/weed/server/filer_server_handlers_read.go
@@ -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
}