diff --git a/vendor/github.com/minio/minio-go/api-core.go b/vendor/github.com/minio/minio-go/api-core.go index f632fb29..0d4f0302 100644 --- a/vendor/github.com/minio/minio-go/api-core.go +++ b/vendor/github.com/minio/minio-go/api-core.go @@ -420,7 +420,7 @@ func (a apiCore) deleteBucket(bucket string) error { return err } if resp != nil { - if resp.StatusCode != http.StatusOK { + if resp.StatusCode != http.StatusNoContent { var errorResponse ErrorResponse switch resp.StatusCode { case http.StatusNotFound: @@ -439,6 +439,14 @@ func (a apiCore) deleteBucket(bucket string) error { RequestID: resp.Header.Get("x-amz-request-id"), HostID: resp.Header.Get("x-amz-id-2"), } + case http.StatusConflict: + errorResponse = ErrorResponse{ + Code: "Conflict", + Message: "Bucket not empty", + Resource: separator + bucket, + RequestID: resp.Header.Get("x-amz-request-id"), + HostID: resp.Header.Get("x-amz-id-2"), + } default: errorResponse = ErrorResponse{ Code: resp.Status, @@ -708,7 +716,7 @@ func (a apiCore) deleteObject(bucket, object string) error { return err } if resp != nil { - if resp.StatusCode != http.StatusOK { + if resp.StatusCode != http.StatusNoContent { var errorResponse ErrorResponse switch resp.StatusCode { case http.StatusNotFound: diff --git a/vendor/github.com/minio/minio-go/api_handlers_test.go b/vendor/github.com/minio/minio-go/api_handlers_test.go index 4a7d7814..146f4d6e 100644 --- a/vendor/github.com/minio/minio-go/api_handlers_test.go +++ b/vendor/github.com/minio/minio-go/api_handlers_test.go @@ -88,7 +88,7 @@ func (h bucketHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusNotFound) default: h.resource = "" - w.WriteHeader(http.StatusOK) + w.WriteHeader(http.StatusNoContent) } } } @@ -165,6 +165,6 @@ func (h objectHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { } h.resource = "" h.data = nil - w.WriteHeader(http.StatusOK) + w.WriteHeader(http.StatusNoContent) } } diff --git a/vendor/vendor.json b/vendor/vendor.json index 688488d3..c5a6f51a 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -29,8 +29,8 @@ }, { "path": "github.com/minio/minio-go", - "revision": "866c42f9e3ad89bf44f3527082a788166c385f5e", - "revisionTime": "2015-10-13T17:03:11-07:00" + "revision": "4f7eabdfdaa652a3f329f163361042e0def4ac89", + "revisionTime": "2015-10-17T10:23:30-07:00" }, { "path": "github.com/minio/minio-go-legacy",