[#253] object/eacl: Process only CID/OID object headers in RANGEHASH/DELETE

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-12-18 15:51:29 +03:00 committed by Leonard Lyubich
parent 9e27263df3
commit bbe8f34ffd

View file

@ -95,16 +95,13 @@ func (h *headerSource) objectHeaders() ([]eacl.Header, bool) {
switch req := m.req.(type) {
case *objectV2.GetRequest:
return h.localObjectHeaders(h.addr)
case *objectV2.DeleteRequest:
hs, _ := h.localObjectHeaders(h.addr)
return hs, true
case *objectV2.HeadRequest:
return h.localObjectHeaders(h.addr)
case *objectV2.GetRangeRequest:
case
*objectV2.GetRangeRequest,
*objectV2.GetRangeHashRequest,
*objectV2.DeleteRequest:
return addressHeaders(objectSDK.NewAddressFromV2(h.addr)), true
case *objectV2.GetRangeHashRequest:
hs, _ := h.localObjectHeaders(h.addr)
return hs, true
case *objectV2.PutRequest:
if v, ok := req.GetBody().GetObjectPart().(*objectV2.PutObjectPartInit); ok {
oV2 := new(objectV2.Object)