Browse Source

check Accept instead of content type

fix https://github.com/chrislusf/seaweedfs/issues/429
pull/430/head
Chris Lu 8 years ago
parent
commit
e61c9af523
  1. 2
      weed/server/filer_server_handlers_read.go

2
weed/server/filer_server_handlers_read.go

@ -75,7 +75,7 @@ func (fs *FilerServer) listDirectoryHandler(w http.ResponseWriter, r *http.Reque
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…
Cancel
Save