Skip to content

Commit aaf6ea4

Browse files
author
YangSen-qn
committed
optimize http request add content length
1 parent 0911294 commit aaf6ea4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

storagev2/internal/utils/http.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@ func HttpHeadAddContentLength(header http.Header, data innerio.ReadSeekCloser) e
2121

2222
header.Set("Content-Length", strconv.FormatInt(contentLength, 10))
2323

24-
return nil
24+
_, err = data.Seek(0, io.SeekStart)
25+
return err
2526
}

0 commit comments

Comments
 (0)