Browse Source

Removed the redundant check in GetOrHeadHandler

pull/7523/head
chrislu 2 weeks ago
parent
commit
616fdfd8da
  1. 7
      weed/server/filer_server_handlers_read.go

7
weed/server/filer_server_handlers_read.go

@ -2,7 +2,6 @@ package weed_server
import (
"context"
"errors"
"fmt"
"io"
"math"
@ -118,11 +117,7 @@ func (fs *FilerServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request)
writeJsonQuiet(w, r, http.StatusOK, entry)
return
}
// Regular directory - show listing if enabled
if !fs.option.ExposeDirectoryData {
writeJsonError(w, r, http.StatusForbidden, errors.New("directory listing is disabled"))
return
}
// listDirectoryHandler checks ExposeDirectoryData internally
fs.listDirectoryHandler(w, r)
return
}

Loading…
Cancel
Save