mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
check Accept instead of content type
fix https://github.com/chrislusf/seaweedfs/issues/429
This commit is contained in:
parent
4d1ac7332e
commit
e61c9af523
|
@ -74,8 +74,8 @@ func (fs *FilerServer) listDirectoryHandler(w http.ResponseWriter, r *http.Reque
|
|||
lastFileName,
|
||||
shouldDisplayLoadMore,
|
||||
}
|
||||
|
||||
if strings.ToLower(r.Header.Get("Content-Type")) == "application/json" {
|
||||
|
||||
if r.Header.Get("Accept") == "application/json" {
|
||||
writeJsonQuiet(w, r, http.StatusOK, args)
|
||||
} else {
|
||||
ui.StatusTpl.Execute(w, args)
|
||||
|
|
Loading…
Reference in a new issue