Browse Source

Merge pull request #2454 from kmlebedev/HeadBucketHandlerForbidden

Avoid forbiddening for HeadBucketHandler if owners are specified
pull/2464/head
Chris Lu 3 years ago
committed by GitHub
parent
commit
9eebe9b95e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      weed/s3api/s3api_bucket_handlers.go

4
weed/s3api/s3api_bucket_handlers.go

@ -177,8 +177,8 @@ func (s3a *S3ApiServer) HeadBucketHandler(w http.ResponseWriter, r *http.Request
bucket, _ := getBucketAndObject(r)
glog.V(3).Infof("HeadBucketHandler %s", bucket)
if err := s3a.checkBucket(r, bucket); err != s3err.ErrNone {
s3err.WriteErrorResponse(w, r, err)
if entry, err := s3a.getEntry(s3a.option.BucketsPath, bucket); entry == nil || err == filer_pb.ErrNotFound {
s3err.WriteErrorResponse(w, r, s3err.ErrNoSuchBucket)
return
}

Loading…
Cancel
Save