s3: report http.StatusOK if the directory is explicitly created

fix https://github.com/seaweedfs/seaweedfs/issues/3457
This commit is contained in:
chrislu
2022-08-23 01:16:46 -07:00
parent 911475526c
commit 9fce75607d
3 changed files with 12 additions and 0 deletions

View File

@@ -111,6 +111,10 @@ func (fs *FilerServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request)
w.WriteHeader(http.StatusMethodNotAllowed)
return
}
if entry.Attr.Mime != "" {
// inform S3 API this is a user created directory key object
w.Header().Set(s3_constants.X_SeaweedFS_Header_Directory_Key, "true")
}
fs.listDirectoryHandler(w, r)
return
}