Browse Source

Merge pull request #2685 from banjiaojuhao/filer-get_file_entry

pull/2690/head
Chris Lu 3 years ago
committed by GitHub
parent
commit
95eb91ed1a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      weed/server/filer_server_handlers_read.go

6
weed/server/filer_server_handlers_read.go

@ -21,7 +21,6 @@ import (
"github.com/chrislusf/seaweedfs/weed/util" "github.com/chrislusf/seaweedfs/weed/util"
) )
// Validates the preconditions. Returns true if GET/HEAD operation should not proceed. // Validates the preconditions. Returns true if GET/HEAD operation should not proceed.
// Preconditions supported are: // Preconditions supported are:
// If-Modified-Since // If-Modified-Since
@ -119,6 +118,11 @@ func (fs *FilerServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request)
return return
} }
if r.URL.Query().Has("metadata") {
writeJsonQuiet(w, r, http.StatusOK, entry)
return
}
etag := filer.ETagEntry(entry) etag := filer.ETagEntry(entry)
if checkPreconditions(w, r, entry) { if checkPreconditions(w, r, entry) {
return return

Loading…
Cancel
Save