aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authora <edward9.lee@gmail.com>2023-01-31 08:54:40 -0600
committerGitHub <noreply@github.com>2023-01-31 06:54:40 -0800
commit0d085ec1759d57ae98ab0e28096d02b0a8b3023c (patch)
tree7f3dd5c49f39aba79d043b51413aa1de0a04bbac
parent14d95276c29fab58cafede91c526af68d77494a8 (diff)
downloadseaweedfs-0d085ec1759d57ae98ab0e28096d02b0a8b3023c.tar.xz
seaweedfs-0d085ec1759d57ae98ab0e28096d02b0a8b3023c.zip
make directory lister trigger if mime type is httpd/unix-directory (#4169)
-rw-r--r--weed/server/filer_server_handlers_read.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/weed/server/filer_server_handlers_read.go b/weed/server/filer_server_handlers_read.go
index 06e4b72c8..58d1928c6 100644
--- a/weed/server/filer_server_handlers_read.go
+++ b/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
}