aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chrislusf@users.noreply.github.com>2022-02-18 10:10:03 -0800
committerGitHub <noreply@github.com>2022-02-18 10:10:03 -0800
commit95eb91ed1abd349d8d788effaca5ccf7f7722df9 (patch)
tree137d4f22711632f4ee2a149b6a093a46f86d33d9
parentb9cf4f12fcab2c0fdd35af256faa28f53a414dc2 (diff)
parent4c30934cd9b62c7e7abe4a7adf2a3e4434bbf739 (diff)
downloadseaweedfs-95eb91ed1abd349d8d788effaca5ccf7f7722df9.tar.xz
seaweedfs-95eb91ed1abd349d8d788effaca5ccf7f7722df9.zip
Merge pull request #2685 from banjiaojuhao/filer-get_file_entry
-rw-r--r--weed/server/filer_server_handlers_read.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/weed/server/filer_server_handlers_read.go b/weed/server/filer_server_handlers_read.go
index 8037b1d94..2c51931c1 100644
--- a/weed/server/filer_server_handlers_read.go
+++ b/weed/server/filer_server_handlers_read.go
@@ -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