summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/minio/minio-go/v7/api-stat.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/minio/minio-go/v7/api-stat.go')
-rw-r--r--vendor/github.com/minio/minio-go/v7/api-stat.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/vendor/github.com/minio/minio-go/v7/api-stat.go b/vendor/github.com/minio/minio-go/v7/api-stat.go
index aa81cc43..12a1bf93 100644
--- a/vendor/github.com/minio/minio-go/v7/api-stat.go
+++ b/vendor/github.com/minio/minio-go/v7/api-stat.go
@@ -99,11 +99,11 @@ func (c Client) statObject(ctx context.Context, bucketName, objectName string, o
if err != nil {
return ObjectInfo{}, err
}
- deleteMarker := resp.Header.Get(amzDeleteMarker) == "true"
if resp != nil {
+ deleteMarker := resp.Header.Get(amzDeleteMarker) == "true"
if resp.StatusCode != http.StatusOK && resp.StatusCode != http.StatusPartialContent {
- if resp.StatusCode == http.StatusBadRequest && opts.VersionID != "" && deleteMarker {
+ if resp.StatusCode == http.StatusMethodNotAllowed && opts.VersionID != "" && deleteMarker {
errResp := ErrorResponse{
StatusCode: resp.StatusCode,
Code: "MethodNotAllowed",