Skip to content
This repository was archived by the owner on Dec 20, 2024. It is now read-only.

Commit bacc34b

Browse files
committed
bugfix: initialize dfget downloader in dfdaemon
Signed-off-by: lowzj <zj3142063@gmail.com>
1 parent 8cac49e commit bacc34b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

dfdaemon/proxy/proxy.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ func (proxy *Proxy) mirrorRegistry(w http.ResponseWriter, r *http.Request) {
207207
reverseProxy := httputil.NewSingleHostReverseProxy(proxy.registry.Remote.URL)
208208
t, err := transport.New(
209209
transport.WithDownloader(proxy.downloadFactory()),
210+
transport.WithStreamDownloader(proxy.streamDownloadFactory()),
210211
transport.WithTLS(proxy.registry.TLSConfig()),
211212
transport.WithCondition(proxy.shouldUseDfgetForMirror),
212213
)
@@ -268,6 +269,7 @@ func (proxy *Proxy) handleHTTP(w http.ResponseWriter, req *http.Request) {
268269

269270
func (proxy *Proxy) roundTripper(tlsConfig *tls.Config) http.RoundTripper {
270271
rt, _ := transport.New(
272+
transport.WithDownloader(proxy.downloadFactory()),
271273
transport.WithStreamDownloader(proxy.streamDownloadFactory()),
272274
transport.WithTLS(tlsConfig),
273275
transport.WithCondition(proxy.shouldUseDfget),

0 commit comments

Comments
 (0)