Skip to content

Commit

Permalink
Set Content-Type to application/octet-stream (#1079)
Browse files Browse the repository at this point in the history
Some registries expect this.
  • Loading branch information
jonjohnsonjr committed Jul 13, 2021
1 parent 68edb3a commit 5ea3569
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/v1/remote/write.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ func (w *writer) streamBlob(ctx context.Context, blob io.ReadCloser, streamLocat
if err != nil {
return "", err
}
req.Header.Set("Content-Type", "application/octet-stream")

resp, err := w.client.Do(req.WithContext(ctx))
if err != nil {
Expand Down Expand Up @@ -386,6 +387,7 @@ func (w *writer) commitBlob(location, digest string) error {
if err != nil {
return err
}
req.Header.Set("Content-Type", "application/octet-stream")

resp, err := w.client.Do(req.WithContext(w.context))
if err != nil {
Expand Down

0 comments on commit 5ea3569

Please sign in to comment.