mirror of
https://github.com/goharbor/harbor.git
synced 2025-01-11 02:17:42 +01:00
Set content length when pushing blobs
Set content length when pushing blobs Signed-off-by: Wenkai Yin <yinw@vmware.com>
This commit is contained in:
parent
8ccac663b1
commit
b94a99dded
@ -25,11 +25,9 @@ import (
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
// "time"
|
||||
|
||||
"github.com/docker/distribution/manifest/schema1"
|
||||
"github.com/docker/distribution/manifest/schema2"
|
||||
|
||||
commonhttp "github.com/goharbor/harbor/src/common/http"
|
||||
"github.com/goharbor/harbor/src/common/utils"
|
||||
)
|
||||
@ -407,6 +405,7 @@ func (r *Repository) monolithicBlobUpload(location, digest string, size int64, d
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
req.ContentLength = size
|
||||
|
||||
resp, err := r.client.Do(req)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user