From cf8615dedf37ca84cdbc1d71265bef3ff58a8013 Mon Sep 17 00:00:00 2001 From: Smasherr Date: Tue, 3 Nov 2020 12:24:02 +0100 Subject: [PATCH] Remove empty Content-Type header Fixes #3288 Signed-off-by: Smasherr (cherry picked from commit c8d90f904f1e86e7aa5fa2baa76c40c1b60c3a3c) Signed-off-by: Sebastiaan van Stijn --- registry/client/repository.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/registry/client/repository.go b/registry/client/repository.go index aa442e65..1bfbb7e2 100644 --- a/registry/client/repository.go +++ b/registry/client/repository.go @@ -736,7 +736,12 @@ func (bs *blobs) Create(ctx context.Context, options ...distribution.BlobCreateO return nil, err } - resp, err := bs.client.Post(u, "", nil) + req, err := http.NewRequest("POST", u, nil) + if err != nil { + return nil, err + } + + resp, err := bs.client.Do(req) if err != nil { return nil, err }