[#1471] eacl: Don't process object headers twice in response processing

It is redundant to process object headers in responses w/o object field
since result will be the same.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2022-06-02 17:21:56 +03:00 committed by LeL
parent 8b94cb22d3
commit f9504c1cba

View file

@ -143,9 +143,6 @@ func (h *cfg) objectHeaders() ([]eaclSDK.Header, error) {
} }
case responseXHeaderSource: case responseXHeaderSource:
switch resp := m.resp.(type) { switch resp := m.resp.(type) {
default:
hs, _ := h.localObjectHeaders(h.cnr, h.obj)
return hs, nil
case *objectV2.GetResponse: case *objectV2.GetResponse:
if v, ok := resp.GetBody().GetObjectPart().(*objectV2.GetObjectPartInit); ok { if v, ok := resp.GetBody().GetObjectPart().(*objectV2.GetObjectPartInit); ok {
oV2 := new(objectV2.Object) oV2 := new(objectV2.Object)