mirror of https://github.com/minio/minio.git
Return version-id header in DeleteObject response (#11090)
even when the object version is non-existent To make this consistent with aws behavior. Co-authored-by: Poorna Krishnamoorthy <poorna@minio.io>
This commit is contained in:
parent
8f65aba04b
commit
9adc33efbb
|
@ -943,6 +943,7 @@ func (er erasureObjects) DeleteObjects(ctx context.Context, bucket string, objec
|
||||||
// response to the client request.
|
// response to the client request.
|
||||||
func (er erasureObjects) DeleteObject(ctx context.Context, bucket, object string, opts ObjectOptions) (objInfo ObjectInfo, err error) {
|
func (er erasureObjects) DeleteObject(ctx context.Context, bucket, object string, opts ObjectOptions) (objInfo ObjectInfo, err error) {
|
||||||
versionFound := true
|
versionFound := true
|
||||||
|
objInfo = ObjectInfo{VersionID: opts.VersionID} // version id needed in Delete API response.
|
||||||
goi, gerr := er.GetObjectInfo(ctx, bucket, object, opts)
|
goi, gerr := er.GetObjectInfo(ctx, bucket, object, opts)
|
||||||
if gerr != nil && goi.Name == "" {
|
if gerr != nil && goi.Name == "" {
|
||||||
switch gerr.(type) {
|
switch gerr.(type) {
|
||||||
|
|
Loading…
Reference in New Issue