Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Determine how to specify that Client should write URI for a Proxy #1056

Closed
seanmonstar opened this issue Feb 10, 2017 · 0 comments
Closed

Determine how to specify that Client should write URI for a Proxy #1056

seanmonstar opened this issue Feb 10, 2017 · 0 comments
Labels
A-client Area: client.
Milestone

Comments

@seanmonstar
Copy link
Member

Most requests are written like this:

GET /foo/bar HTTP/1.1
Host: example.domain

But if using a proxy, it needs to be written like this:

GET http://example.domain/foo/bar HTTP/1.1
Host: example.domain

There currently isn't really a way to figure this out, and no way to tell the Client or Request that it needs to be done. Some options include:

  • Similar to how golang does it, provide a method on Request, like request.set_proxy_url(url). The downside is that the knowledge that a proxy is being used is inside the Connect part of the Client, and so knowing to use this requires knowing that the Connect is using a proxy.
  • Somehow expose this intent on the Connect trait. Downside is that it means that Connect cannot be simply be Service<Request=Url, Response=Io>. Maybe that's not too bad.

Without this issue solved, it's impossible to talk to HTTP/1 proxies.

@seanmonstar seanmonstar added the A-client Area: client. label Feb 10, 2017
@seanmonstar seanmonstar added this to the 0.11 milestone Feb 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-client Area: client.
Projects
None yet
Development

No branches or pull requests

1 participant