Skip to content

Commit

Permalink
fix: wrong upload value
Browse files Browse the repository at this point in the history
  • Loading branch information
r3inbowari committed Dec 9, 2022
1 parent cd3438d commit a77ce7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion speedtest/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ func downloadRequest(ctx context.Context, doer *http.Client, dlURL string, w int
func uploadRequest(ctx context.Context, doer *http.Client, ulURL string, w int) error {
size := ulSizes[w]

reader := NewRepeatReader(size*100*10 - 51)
reader := NewRepeatReader((size*100 - 51) * 10)
req, err := http.NewRequestWithContext(ctx, http.MethodPost, ulURL, reader)
req.ContentLength = reader.ContentLength
if err != nil {
Expand Down

0 comments on commit a77ce7a

Please sign in to comment.