Skip to content

Commit

Permalink
fix: wrong content length in proxy
Browse files Browse the repository at this point in the history
Signed-off-by: Jim Ma <majinjing3@gmail.com>
  • Loading branch information
jim3ma committed Aug 16, 2021
1 parent ec0632d commit cc3c61f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/daemon/peer/peertask_stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ func (s *streamPeerTask) Start(ctx context.Context) (io.Reader, map[string]strin
var reader io.Reader = pr
var writer io.Writer = pw
if s.contentLength.Load() != -1 {
attr[headers.ContentLength] = fmt.Sprintf("%d", s.contentLength)
attr[headers.ContentLength] = fmt.Sprintf("%d", s.contentLength.Load())
} else {
attr[headers.TransferEncoding] = "chunked"
}
Expand Down

0 comments on commit cc3c61f

Please sign in to comment.