From 2a3b201457f9688ecac298b9cc9ed1a0614fb306 Mon Sep 17 00:00:00 2001 From: Krishna Srinivas Date: Mon, 19 Oct 2015 15:08:50 -0700 Subject: [PATCH] vendor update minio-go-legacy --- vendor/github.com/minio/minio-go-legacy/api-core.go | 12 ++++++++++-- .../minio/minio-go-legacy/api_handlers_test.go | 4 ++-- vendor/vendor.json | 4 ++-- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/vendor/github.com/minio/minio-go-legacy/api-core.go b/vendor/github.com/minio/minio-go-legacy/api-core.go index 64ab8374..73b5562f 100644 --- a/vendor/github.com/minio/minio-go-legacy/api-core.go +++ b/vendor/github.com/minio/minio-go-legacy/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: @@ -705,7 +705,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: @@ -724,6 +724,14 @@ func (a apiCore) deleteObject(bucket, object 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, diff --git a/vendor/github.com/minio/minio-go-legacy/api_handlers_test.go b/vendor/github.com/minio/minio-go-legacy/api_handlers_test.go index e528eaa7..a604338d 100644 --- a/vendor/github.com/minio/minio-go-legacy/api_handlers_test.go +++ b/vendor/github.com/minio/minio-go-legacy/api_handlers_test.go @@ -77,7 +77,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) } } } @@ -154,6 +154,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 c5a6f51a..e0d1318a 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -34,8 +34,8 @@ }, { "path": "github.com/minio/minio-go-legacy", - "revision": "0e894de484c4e4ff39f36320b7153b7f57d395b9", - "revisionTime": "2015-10-13T17:08:05-07:00" + "revision": "58eb2eb70a67819d2ea5a9e2a8f6c10bee164efc", + "revisionTime": "2015-10-17T10:22:58-07:00" }, { "path": "github.com/minio/minio-xl/pkg/probe",