From d1b1f5e790b704a4863a230e0df54c0227313eda Mon Sep 17 00:00:00 2001 From: "changlin.shi" Date: Tue, 22 Nov 2022 16:25:35 +0800 Subject: [PATCH] fix http code for dir Signed-off-by: changlin.shi --- weed/s3api/s3acl/acl_helper.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/weed/s3api/s3acl/acl_helper.go b/weed/s3api/s3acl/acl_helper.go index 28796451a..6a2b826e4 100644 --- a/weed/s3api/s3acl/acl_helper.go +++ b/weed/s3api/s3acl/acl_helper.go @@ -507,8 +507,7 @@ func GrantEquals(a, b *s3.Grant) bool { func CheckObjectAccessForReadObject(r *http.Request, w http.ResponseWriter, entry *filer.Entry, bucketOwnerId string) (statusCode int, ok bool) { 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)