refactor all methods strings to const (#5726)

This commit is contained in:
Konstantin Lebedev
2024-07-01 13:00:39 +05:00
committed by GitHub
parent 0fdf7eca48
commit 5ffacbb6ea
18 changed files with 84 additions and 84 deletions

View File

@@ -39,7 +39,7 @@ func (fs *FilerServer) autoChunk(ctx context.Context, w http.ResponseWriter, r *
var reply *FilerPostResult
var err error
var md5bytes []byte
if r.Method == "POST" {
if r.Method == http.MethodPost {
if r.Header.Get("Content-Type") == "" && strings.HasSuffix(r.URL.Path, "/") {
reply, err = fs.mkdir(ctx, w, r, so)
} else {