mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-23 22:35:35 +08:00
make directory lister trigger if mime type is httpd/unix-directory (#4169)
This commit is contained in:
@@ -15,6 +15,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"golang.org/x/exp/slices"
|
||||||
|
|
||||||
"github.com/seaweedfs/seaweedfs/weed/filer"
|
"github.com/seaweedfs/seaweedfs/weed/filer"
|
||||||
"github.com/seaweedfs/seaweedfs/weed/glog"
|
"github.com/seaweedfs/seaweedfs/weed/glog"
|
||||||
"github.com/seaweedfs/seaweedfs/weed/images"
|
"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)
|
writeJsonQuiet(w, r, http.StatusOK, entry)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if entry.Attr.Mime == "" {
|
if slices.Contains([]string{"httpd/unix-directory", ""}, entry.Attr.Mime) {
|
||||||
fs.listDirectoryHandler(w, r)
|
fs.listDirectoryHandler(w, r)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user