Compare commits
1 commit
33dba5d68c
...
d14cb1f695
Author | SHA1 | Date | |
---|---|---|---|
d14cb1f695 |
1 changed files with 2 additions and 9 deletions
|
@ -3,7 +3,6 @@ package handler
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
@ -77,14 +76,8 @@ func (h *Handler) getPayload(p getPayloadParams) (io.ReadCloser, uint64, error)
|
||||||
if !ok {
|
if !ok {
|
||||||
return p.obj.Payload, p.obj.Header.PayloadSize(), nil
|
return p.obj.Payload, p.obj.Header.PayloadSize(), nil
|
||||||
}
|
}
|
||||||
cid, ok := p.obj.Header.ContainerID()
|
cid, _ := p.obj.Header.ContainerID()
|
||||||
if !ok {
|
oid, _ := p.obj.Header.ID()
|
||||||
return nil, 0, errors.New("no container id set")
|
|
||||||
}
|
|
||||||
oid, ok := p.obj.Header.ID()
|
|
||||||
if !ok {
|
|
||||||
return nil, 0, errors.New("no object id set")
|
|
||||||
}
|
|
||||||
size, err := strconv.ParseUint(sizeValue, 10, 64)
|
size, err := strconv.ParseUint(sizeValue, 10, 64)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, 0, err
|
return nil, 0, err
|
||||||
|
|
Loading…
Add table
Reference in a new issue