Skip to content

Commit

Permalink
Fix minor warning
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Jun 2, 2021
1 parent 9211a9e commit 62c7b07
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/eosclient/eosgrpc/eos_http/eoshttp.go
Original file line number Diff line number Diff line change
Expand Up @@ -408,15 +408,15 @@ func (c *Client) PUTFile(ctx context.Context, remoteuser, uid, gid, urlpath stri
Transport: httpTransport}

req, err = http.NewRequestWithContext(ctx, "PUT", loc.String(), stream)
if err != nil {
log.Error().Str("func", "PUTFile").Str("url", loc.String()).Str("err", err.Error()).Msg("can't create redirected request")
return err
}
if length >= 0 {
log.Debug().Str("func", "PUTFile").Int64("Content-Length", length).Msg("setting header")
req.Header.Set("Content-Length", strconv.FormatInt(length, 10))

}
if err != nil {
log.Error().Str("func", "PUTFile").Str("url", loc.String()).Str("err", err.Error()).Msg("can't create redirected request")
return err
}

log.Debug().Str("func", "PUTFile").Str("location", loc.String()).Msg("redirection")
nredirs++
Expand Down

0 comments on commit 62c7b07

Please sign in to comment.