zemul
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
7 additions and
2 deletions
-
weed/server/filer_server_handlers_read.go
|
|
@ -107,9 +107,15 @@ func (fs *FilerServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
query := r.URL.Query() |
|
|
|
|
|
|
|
if entry.IsDirectory() { |
|
|
|
if fs.option.DisableDirListing { |
|
|
|
w.WriteHeader(http.StatusMethodNotAllowed) |
|
|
|
w.WriteHeader(http.StatusForbidden) |
|
|
|
return |
|
|
|
} |
|
|
|
if query.Get("metadata") == "true" { |
|
|
|
writeJsonQuiet(w, r, http.StatusOK, entry) |
|
|
|
return |
|
|
|
} |
|
|
|
if entry.Attr.Mime == "" { |
|
|
@ -125,7 +131,6 @@ func (fs *FilerServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
query := r.URL.Query() |
|
|
|
if query.Get("metadata") == "true" { |
|
|
|
if query.Get("resolveManifest") == "true" { |
|
|
|
if entry.Chunks, _, err = filer.ResolveChunkManifest( |
|
|
|