forked from TrueCloudLab/distribution
move resumablerequestreader to pkg
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
This commit is contained in:
parent
660a0f5cd3
commit
775ca3caa3
1 changed files with 2 additions and 1 deletions
|
@ -24,6 +24,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/docker/docker/dockerversion"
|
||||
"github.com/docker/docker/pkg/httputils"
|
||||
"github.com/docker/docker/utils"
|
||||
)
|
||||
|
||||
|
@ -423,7 +424,7 @@ func (r *Registry) GetRemoteImageLayer(imgID, registry string, token []string, i
|
|||
|
||||
if res.Header.Get("Accept-Ranges") == "bytes" && imgSize > 0 {
|
||||
utils.Debugf("server supports resume")
|
||||
return utils.ResumableRequestReaderWithInitialResponse(client, req, 5, imgSize, res), nil
|
||||
return httputils.ResumableRequestReaderWithInitialResponse(client, req, 5, imgSize, res), nil
|
||||
}
|
||||
utils.Debugf("server doesn't support resume")
|
||||
return res.Body, nil
|
||||
|
|
Loading…
Reference in a new issue