Skip to content

Commit

Permalink
Change formatting strings in HTTP headers
Browse files Browse the repository at this point in the history
Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
  • Loading branch information
milosgajdos committed Nov 14, 2023
1 parent 77624e7 commit 9b3043c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions registry/storage/driver/gcs/gcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -830,9 +830,9 @@ func (w *writer) putChunk(ctx context.Context, sessionURI string, chunk []byte,
}
req.Header.Set("Content-Type", blobContentType)
if from == to+1 {
req.Header.Set("Content-Range", fmt.Sprintf("bytes */%v", size))
req.Header.Set("Content-Range", fmt.Sprintf("bytes */%s", size))
} else {
req.Header.Set("Content-Range", fmt.Sprintf("bytes %v-%v/%v", from, to, size))
req.Header.Set("Content-Range", fmt.Sprintf("bytes %d-%d/%s", from, to, size))
}
req.Header.Set("Content-Length", strconv.FormatInt(length, 10))

Expand Down

0 comments on commit 9b3043c

Please sign in to comment.