use pre-constructed client for well-known requests also
This commit is contained in:
parent
f8d1c1a8af
commit
1059f35fdc
4 changed files with 21 additions and 34 deletions
|
@ -237,25 +237,7 @@ where
|
|||
|
||||
let url = reqwest_request.url().clone();
|
||||
|
||||
let client = if let Some((override_name, port)) = globals
|
||||
.tls_name_override
|
||||
.read()
|
||||
.unwrap()
|
||||
.get(&actual_destination.hostname())
|
||||
{
|
||||
globals
|
||||
.reqwest_client_builder()?
|
||||
.resolve(
|
||||
&actual_destination.hostname(),
|
||||
SocketAddr::new(override_name[0], *port),
|
||||
)
|
||||
.build()?
|
||||
// port will be ignored
|
||||
} else {
|
||||
globals.reqwest_client()
|
||||
};
|
||||
|
||||
let response = client.execute(reqwest_request).await;
|
||||
let response = globals.well_known_client().execute(reqwest_request).await;
|
||||
|
||||
match response {
|
||||
Ok(mut response) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue