Open
Description
CONNECT requests, be them h1 or h2, are not really doable through the Hyper client, with the current connector design.
hyper::client::Client::request
takes a request, extracts the (scheme, host, port) triple from its URI, and then passes that to its inner connector.
That means that for a CONNECT example.org:80
request, the connector will try to connect to example.org:80
to then send the CONNECT
request to it. That's obviously not what you want when doing CONNECT
requests.
I ended up making a new ProxyConnector<C>
connector that completely ignores the uri
argument of <Service<Uri>>::call
, but that sounds like a workaround and there is probably a better way to handle that in Hyper itself.