mirror of
https://github.com/minio/minio.git
synced 2025-01-24 21:23:15 -05:00
event args list for fanOut notification must be sized same (#17450)
without this fan-out API can crash if client cancels the on-going request.
This commit is contained in:
parent
64de61d15d
commit
6806537eb3
@ -1315,6 +1315,16 @@ func (api objectAPIHandlers) PostPolicyBucketHandler(w http.ResponseWriter, r *h
|
|||||||
Key: objInfo.Name,
|
Key: objInfo.Name,
|
||||||
Error: errs[i].Error(),
|
Error: errs[i].Error(),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
eventArgsList = append(eventArgsList, eventArgs{
|
||||||
|
EventName: event.ObjectCreatedPost,
|
||||||
|
BucketName: objInfo.Bucket,
|
||||||
|
Object: ObjectInfo{Name: objInfo.Name},
|
||||||
|
ReqParams: extractReqParams(r),
|
||||||
|
RespElements: extractRespElements(w),
|
||||||
|
UserAgent: fmt.Sprintf("%s MinIO-Fan-Out (failed: %v)", r.UserAgent(), errs[i]),
|
||||||
|
Host: handlers.GetSourceIP(r),
|
||||||
|
})
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user