[#1253] deleteSvc: Use copy of common parameters

getSvc may change the values of some fields, so Head will affect Delete
or Put. In this case, the change is necessary so that the session token
is stored in the tombstone object (EC assemble calls `ForgetTokens`).

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2024-07-15 23:04:41 +03:00
parent fc383ea6ae
commit e83d39e33f

View file

@ -30,7 +30,12 @@ func (w *headSvcWrapper) headAddress(ctx context.Context, exec *execCtx, addr oi
wr := getsvc.NewSimpleObjectWriter()
p := getsvc.HeadPrm{}
p.SetCommonParameters(exec.commonParameters())
if cp := exec.commonParameters(); cp != nil {
commonParameters := *cp
p.SetCommonParameters(&commonParameters)
}
p.SetHeaderWriter(wr)
p.WithRawFlag(true)
p.WithAddress(addr)