Browse Source

Merge branch '6_object_read' into 10_acl_merged

pull/4090/head
changlin.shi 2 years ago
parent
commit
7e4acc7fb5
  1. 3
      weed/s3api/s3acl/acl_helper.go

3
weed/s3api/s3acl/acl_helper.go

@ -521,8 +521,7 @@ func GrantWithFullControl(accountId string) *s3.Grant {
func CheckObjectAccessForReadObject(r *http.Request, w http.ResponseWriter, entry *filer.Entry, bucketOwnerId string) (statusCode int, ok bool) { func CheckObjectAccessForReadObject(r *http.Request, w http.ResponseWriter, entry *filer.Entry, bucketOwnerId string) (statusCode int, ok bool) {
if entry.IsDirectory() { if entry.IsDirectory() {
w.Header().Set(s3_constants.X_SeaweedFS_Header_Directory_Key, "true")
return http.StatusMethodNotAllowed, false
return http.StatusOK, true
} }
accountId := GetAccountId(r) accountId := GetAccountId(r)

Loading…
Cancel
Save