forked from TrueCloudLab/frostfs-http-gw
[#128] downloader: Avoid var naming collision
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
271451dc32
commit
f6ab94027c
1 changed files with 3 additions and 3 deletions
|
@ -158,15 +158,15 @@ func (r request) receiveFile(clnt pool.Object, objectAddress *address.Address) {
|
|||
}
|
||||
|
||||
// reset payload reader since part of the data has been read
|
||||
var r io.Reader = bytes.NewReader(payloadHead)
|
||||
var headReader io.Reader = bytes.NewReader(payloadHead)
|
||||
|
||||
if err != io.EOF { // otherwise, we've already read full payload
|
||||
r = io.MultiReader(r, rObj.Payload)
|
||||
headReader = io.MultiReader(headReader, rObj.Payload)
|
||||
}
|
||||
|
||||
// note: we could do with io.Reader, but SetBodyStream below closes body stream
|
||||
// if it implements io.Closer and that's useful for us.
|
||||
rObj.Payload = readCloser{r, rObj.Payload}
|
||||
rObj.Payload = readCloser{headReader, rObj.Payload}
|
||||
}
|
||||
r.SetContentType(contentType)
|
||||
|
||||
|
|
Loading…
Reference in a new issue