move resumablerequestreader to pkg

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
This commit is contained in:
unclejack 2014-07-28 18:01:21 +03:00
parent 660a0f5cd3
commit 775ca3caa3

View file

@ -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