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

Allow to configure HttpClient request authority #5633

Closed
sbordet opened this issue Nov 10, 2020 · 2 comments · Fixed by #5640
Closed

Allow to configure HttpClient request authority #5633

sbordet opened this issue Nov 10, 2020 · 2 comments · Fixed by #5640
Assignees
Labels
Enhancement Sponsored This issue affects a user with a commercial support agreement

Comments

@sbordet
Copy link
Contributor

sbordet commented Nov 10, 2020

Jetty version
9.4.x

Description
When HttpClient is used in a proxy, it may connect to backend servers using a destination that is different from the authority that the remote client used.

For example, the HttpClient in the proxy may choose to connect to the backend server at 1.2.3.4:5678 while the client sent the request to foo.bar.com:80.

Would be great to be able to specify the authority of the request independently from the destination, along these lines:

httpClient.newRequest("1.2.3.4", 5678)
  .authority("foo.bar.com:80")
  ...
@sbordet sbordet changed the title Allow to configure request authority Allow to configure HttpClient request authority Nov 10, 2020
@sbordet sbordet self-assigned this Nov 10, 2020
@sbordet sbordet added this to To do in Jetty 9.4.35 via automation Nov 10, 2020
@sbordet
Copy link
Contributor Author

sbordet commented Nov 10, 2020

For HTTP/2 this has a direct translation to the :authority pseudo header.

For HTTP/1.1 should the authority be used as the Host header? @gregw thoughts?

@joakime
Copy link
Contributor

joakime commented Nov 10, 2020

+1 for having the Host header in HTTP/1.1 be the authority.

@WalkerWatch WalkerWatch added the Sponsored This issue affects a user with a commercial support agreement label Nov 10, 2020
sbordet added a commit that referenced this issue Nov 12, 2020
Fixed initial session recv window update: it was wrong if the initial value was less than the default value (65535).

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
sbordet added a commit that referenced this issue Nov 12, 2020
Updated after review.
Added more tests.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
sbordet added a commit that referenced this issue Nov 16, 2020
…figure_authority

Fixes #5633 - Allow to configure HttpClient request authority.
Jetty 9.4.35 automation moved this from To do to Done Nov 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Sponsored This issue affects a user with a commercial support agreement
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

3 participants