Open ho-229 opened 2 years ago
It could be an option on HttpConnector
.
hey @seanmonstar, I would like to take this up. Please assign this to me 😄
@seanmonstar If no one is currently working on this and if this is still needed, I would like to take it up. Also, I think the relevant code is no longer part of the hyper
crate and has instead moved into hyper-util
.
I noticed your comment on the linked PR of adding the configuration without introducing a new type. However, based on the below snippet, the Connection
trait is implemented for tokio::TcpStream
which has no access to Config
where the new flag will be stored. Do you have any pointers on getting access to this flag without an outer wrapper object?
I think the calls to peer_addr()
and local_addr()
should be lazy-loaded, then the connection object would cache the results.
Is your feature request related to a problem? Please describe. By default hyper will try to get the
HttpInfo
for each Response even if they are not needed in most cases. The bottom line is thatgetpeername
andgetsockname
are actually very slow and they can become a performance bottleneck when making a lot of requestsDescribe the solution you'd like Just provide an API like client::Builder::set_host