File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -256,16 +256,19 @@ async fn download_file_(
256
256
( Backend :: Curl , Notification :: UsingCurl )
257
257
} else {
258
258
let tls_backend = if use_rustls {
259
- TlsBackend :: Rustls
260
- } else {
261
- #[ cfg( feature = "reqwest-native-tls" ) ]
259
+ #[ cfg( feature = "reqwest-rustls-tls" ) ]
262
260
{
263
- TlsBackend :: NativeTls
261
+ TlsBackend :: Rustls
264
262
}
265
- #[ cfg( not( feature = "reqwest-native-tls" ) ) ]
263
+ // If the `reqwest-rustls-tls` feature is disabled,
264
+ // `use_rustls` will remain to be `true` by default;
265
+ // we still have to fall back on `NativeTls` in this case.
266
+ #[ cfg( not( feature = "reqwest-rustls-tls" ) ) ]
266
267
{
267
- TlsBackend :: Rustls
268
+ TlsBackend :: NativeTls
268
269
}
270
+ } else {
271
+ TlsBackend :: NativeTls
269
272
} ;
270
273
( Backend :: Reqwest ( tls_backend) , Notification :: UsingReqwest )
271
274
} ;
You can’t perform that action at this time.
0 commit comments