HeadBucket#


Date: 2025-09-20

ref: https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadBucket.html

Differences#


ServerEndpoingx-amz-bucket-regionx-amz-bucket-location-nameCustom
Amazon S3s3.region.amazonaws.com✅❌``
Aliyun OSSbucket.region.aliyuncs.com✅❌``
Huawei OBSbucket.obs.region.myhuaweicloud.com✅❌x-default-storage-class
Tencent COSbucket.cos.region.myqcloud.com✅❌``
Baidu BOSbucket.s3.region.bcebos.com❌❌X-Bce-Bucket-Region, X-Bce-Lcclocation, X-Bce-Bucket-Storageclass
MINIOcustom host/url❌❌``

Amazon S3 official documentation mentions that the response contains an x-amz-bucket-location-name header, but actual testing shows that no such information is included.

Aliyun OSS#

Aliyun OSS requires that the region used in HeadBucket must be the region where the bucket actually resides; otherwise, a 404 error will be returned.

Huawei OBS#

Huawei OBS requires that the region used in HeadBucket must be the region where the bucket actually resides; otherwise, a 404 error will be returned.

Tencent COS#

Tencent COS requires that the region used in HeadBucket must be the region where the bucket actually resides; otherwise, a 404 error will be returned.

Baidu BOS#

Baidu BOS does not require that the region used in HeadBucket must be the actual region where the bucket is located.

MINIO#


The MINIO used for this test is built locally and no corresponding region is configured.

Actual measurement#


404 实测#


注意,为了复现服务器返回 404 的问题,我这里使用的 region 都不是 bucket 真正所在的 region。