fix http upgrades (#1980)

* fix http upgrades

* use addr as authority directly

* move code to fn in net_utils

Co-authored-by: Stephen Chavez <stephen.chavez12@gmail.com>
This commit is contained in:
Aiden McClelland
2022-11-26 22:48:12 -07:00
parent b77c409257
commit 43606d26e4
4 changed files with 53 additions and 77 deletions

View File

@@ -2,7 +2,7 @@ use std::collections::BTreeMap;
use std::sync::Arc;
use futures::future::BoxFuture;
use hyper::{Body, Client, Error as HyperError, Request, Response};
use hyper::{Body, Error as HyperError, Request, Response};
use indexmap::IndexSet;
use rpc_toolkit::command;
@@ -51,5 +51,3 @@ pub struct GeneratedCertificateMountPoint(());
pub type HttpHandler = Arc<
dyn Fn(Request<Body>) -> BoxFuture<'static, Result<Response<Body>, HyperError>> + Send + Sync,
>;
pub type HttpClient = Client<hyper::client::HttpConnector>;