mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-10-21 21:09:24 +08:00
add context to all filer APIs
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package weed_server
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"mime"
|
||||
"mime/multipart"
|
||||
@@ -21,7 +22,7 @@ func (fs *FilerServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request,
|
||||
path = path[:len(path)-1]
|
||||
}
|
||||
|
||||
entry, err := fs.filer.FindEntry(filer2.FullPath(path))
|
||||
entry, err := fs.filer.FindEntry(context.Background(), filer2.FullPath(path))
|
||||
if err != nil {
|
||||
if path == "/" {
|
||||
fs.listDirectoryHandler(w, r)
|
||||
|
Reference in New Issue
Block a user