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

This commit is contained in:
a
2023-01-31 08:54:40 -06:00
committed by GitHub
parent 14d95276c2
commit 0d085ec175

View File

@@ -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
}