Browse Source

make directory lister trigger if mime type is httpd/unix-directory (#4169)

pull/4173/head
a 2 years ago
committed by GitHub
parent
commit
0d085ec175
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      weed/server/filer_server_handlers_read.go

4
weed/server/filer_server_handlers_read.go

@ -15,6 +15,8 @@ import (
"strings"
"time"
"golang.org/x/exp/slices"
"github.com/seaweedfs/seaweedfs/weed/filer"
"github.com/seaweedfs/seaweedfs/weed/glog"
"github.com/seaweedfs/seaweedfs/weed/images"
@ -118,7 +120,7 @@ func (fs *FilerServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request)
writeJsonQuiet(w, r, http.StatusOK, entry)
return
}
if entry.Attr.Mime == "" {
if slices.Contains([]string{"httpd/unix-directory", ""}, entry.Attr.Mime) {
fs.listDirectoryHandler(w, r)
return
}

Loading…
Cancel
Save