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 @@ -255,16 +255,19 @@ async fn download_file_(
255
255
( Backend :: Curl , Notification :: UsingCurl )
256
256
} else {
257
257
let tls_backend = if use_rustls {
258
- TlsBackend :: Rustls
259
- } else {
260
- #[ cfg( feature = "reqwest-native-tls" ) ]
258
+ #[ cfg( feature = "reqwest-rustls-tls" ) ]
261
259
{
262
- TlsBackend :: NativeTls
260
+ TlsBackend :: Rustls
263
261
}
264
- #[ cfg( not( feature = "reqwest-native-tls" ) ) ]
262
+ // If the `reqwest-rustls-tls` feature is disabled,
263
+ // `use_rustls` will remain to be `true` by default;
264
+ // we still have to fall back on `NativeTls` in this case.
265
+ #[ cfg( not( feature = "reqwest-rustls-tls" ) ) ]
265
266
{
266
- TlsBackend :: Rustls
267
+ TlsBackend :: NativeTls
267
268
}
269
+ } else {
270
+ TlsBackend :: NativeTls
268
271
} ;
269
272
( Backend :: Reqwest ( tls_backend) , Notification :: UsingReqwest )
270
273
} ;
You can’t perform that action at this time.
0 commit comments