remotes/docker: implement seekable http requests
To support resumable download, the fetcher for a remote must implement `io.Seeker`. If implemented the `content.Copy` function will detect the seeker and begin from where the download was terminated by a previous attempt. Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
committed by
Michael Crosby
parent
a9308e174d
commit
682151b166
@@ -298,7 +298,7 @@ func (r *dockerBase) authorize(req *http.Request) {
|
||||
|
||||
func (r *dockerBase) doRequest(ctx context.Context, req *http.Request) (*http.Response, error) {
|
||||
ctx = log.WithLogger(ctx, log.G(ctx).WithField("url", req.URL.String()))
|
||||
log.G(ctx).WithField("request.headers", req.Header).WithField("request.method", req.Method).Debug("Do request")
|
||||
log.G(ctx).WithField("request.headers", req.Header).WithField("request.method", req.Method).Debug("do request")
|
||||
r.authorize(req)
|
||||
resp, err := ctxhttp.Do(ctx, r.client, req)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user