@ -2091,21 +2091,18 @@ func (api objectAPIHandlers) DeleteObjectHandler(w http.ResponseWriter, r *http.
}
}
return
return
}
}
} else {
getBucketInfo := objectAPI . GetBucketInfo
if api . CacheAPI ( ) != nil {
getBucketInfo = api . CacheAPI ( ) . GetBucketInfo
}
if _ , err := getBucketInfo ( ctx , bucket ) ; err != nil {
writeErrorResponse ( w , toAPIErrorCode ( err ) , r . URL )
return
}
}
}
// http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectDELETE.html
// http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectDELETE.html
// Ignore delete object errors while replying to client, since we are
if err := deleteObject ( ctx , objectAPI , api . CacheAPI ( ) , bucket , object , r ) ; err != nil {
// suppposed to reply only 204. Additionally log the error for
switch toAPIErrorCode ( err ) {
// investigation.
case ErrNoSuchBucket :
deleteObject ( ctx , objectAPI , api . CacheAPI ( ) , bucket , object , r )
// When bucket doesn't exist specially handle it.
writeErrorResponse ( w , ErrNoSuchBucket , r . URL )
return
}
logger . LogIf ( ctx , err )
// Ignore delete object errors while replying to client, since we are suppposed to reply only 204.
}
writeSuccessNoContent ( w )
writeSuccessNoContent ( w )
}
}