Skip to content

CONNECT requests not really doable in the current client setup #2560

Open
@nox

Description

@nox

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-clientArea: client.B-rfcBlocked: More comments would be useful in determine next steps.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions