mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
Merge pull request #2685 from banjiaojuhao/filer-get_file_entry
This commit is contained in:
commit
95eb91ed1a
|
@ -21,7 +21,6 @@ import (
|
|||
"github.com/chrislusf/seaweedfs/weed/util"
|
||||
)
|
||||
|
||||
|
||||
// Validates the preconditions. Returns true if GET/HEAD operation should not proceed.
|
||||
// Preconditions supported are:
|
||||
// If-Modified-Since
|
||||
|
@ -119,6 +118,11 @@ func (fs *FilerServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request)
|
|||
return
|
||||
}
|
||||
|
||||
if r.URL.Query().Has("metadata") {
|
||||
writeJsonQuiet(w, r, http.StatusOK, entry)
|
||||
return
|
||||
}
|
||||
|
||||
etag := filer.ETagEntry(entry)
|
||||
if checkPreconditions(w, r, entry) {
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue