HeadBucket#
Date: 2025-09-20
ref: https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadBucket.html
Differences#
| Server | Endpoing | x-amz-bucket-region | x-amz-bucket-location-name | Custom |
|---|---|---|---|---|
| Amazon S3 | s3.region.amazonaws.com | ✅ | ❌ | `` |
| Aliyun OSS | bucket.region.aliyuncs.com | ✅ | ❌ | `` |
| Huawei OBS | bucket.obs.region.myhuaweicloud.com | ✅ | ❌ | x-default-storage-class |
| Tencent COS | bucket.cos.region.myqcloud.com | ✅ | ❌ | `` |
| Baidu BOS | bucket.s3.region.bcebos.com | ❌ | ❌ | X-Bce-Bucket-Region, X-Bce-Lcclocation, X-Bce-Bucket-Storageclass |
| MINIO | custom 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。