diff --git a/utils/resumablerequestreader.go b/utils/resumablerequestreader.go index e01f4e6d71..bed202ec0c 100644 --- a/utils/resumablerequestreader.go +++ b/utils/resumablerequestreader.go @@ -24,6 +24,10 @@ func ResumableRequestReader(c *http.Client, r *http.Request, maxfail uint32, tot return &resumableRequestReader{client: c, request: r, maxFailures: maxfail, totalSize: totalsize} } +func ResumableRequestReaderWithInitialResponse(c *http.Client, r *http.Request, maxfail uint32, totalsize int64, initialResponse *http.Response) io.ReadCloser { + return &resumableRequestReader{client: c, request: r, maxFailures: maxfail, totalSize: totalsize, currentResponse: initialResponse} +} + func (r *resumableRequestReader) Read(p []byte) (n int, err error) { if r.client == nil || r.request == nil { return 0, fmt.Errorf("client and request can't be nil\n")