SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
s3: return 404 if bucket does not exist
Chris Lue87e6ef33cea
diff --git a/weed/s3api/s3api_objects_list_handlers.go b/weed/s3api/s3api_objects_list_handlers.goindex 739cdd8f95..66c66d2809 100644--- a/weed/s3api/s3api_objects_list_handlers.go+++ b/weed/s3api/s3api_objects_list_handlers.go@@ -63,6 +63,14 @@ func (s3a *S3ApiServer) ListObjectsV2Handler(w http.ResponseWriter, r *http.RequwriteErrorResponse(w, s3err.ErrInternalError, r.URL)return}++ if len(response.Contents) == 0 {+ if exists, existErr := s3a.exists(s3a.option.BucketsPath, bucket, true); existErr == nil && !exists {+ writeErrorResponse(w, s3err.ErrNoSuchBucket, r.URL)+ return+ }+ }+responseV2 := &ListBucketResultV2{XMLName: response.XMLName,Name: response.Name,@@ -106,6 +114,13 @@ func (s3a *S3ApiServer) ListObjectsV1Handler(w http.ResponseWriter, r *http.Requreturn}+ if len(response.Contents) == 0 {+ if exists, existErr := s3a.exists(s3a.option.BucketsPath, bucket, true); existErr == nil && !exists {+ writeErrorResponse(w, s3err.ErrNoSuchBucket, r.URL)+ return+ }+ }+writeSuccessResponseXML(w, encodeResponse(response))}