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

Support proxy for plaintext HTTP/2 clients with prior-knowledge #2716

Merged
merged 1 commit into from
Oct 2, 2023

Conversation

idelpivnitskiy
Copy link
Member

Motivation:

Plaintext proxies operate as forwarding message proxies. They expect clients to send requests with absolute-form request-target to determine where to forward the message. This logic does not depend on the protocol version, it already works for HTTP/1.1 and should work for HTTP/2 the same way.

Modifications:

  • DefaultSingleAddressHttpClientBuilder: remove check that does not allow users to use HTTP/2 prior-knowledge with a proxy over plaintext connections;
  • Enhance HttpProxyTest to validate behavior consistency for both protocols;

Result:

Users can use plaintext HTTP/2 prior-knowledge clients to communicate via a forwarding message proxy.

Motivation:

Plaintext proxies operate as forwarding message proxies. They expect
clients to send requests with absolute-form request-target to determine
where to forward the message. This logic does not depend on the protocol
version, it already works for HTTP/1.1 and should work for HTTP/2 the
same way.

Modifications:

- `DefaultSingleAddressHttpClientBuilder`: remove check that does not
allow users to use HTTP/2 prior-knowledge with a proxy over plaintext
connections;
- Enhance `HttpProxyTest` to validate behavior consistency for both
protocols;

Result:

Users can use plaintext HTTP/2 prior-knowledge clients to communicate
via a forwarding message proxy.
@idelpivnitskiy idelpivnitskiy self-assigned this Sep 29, 2023
@idelpivnitskiy idelpivnitskiy merged commit 6d38417 into apple:main Oct 2, 2023
15 checks passed
@idelpivnitskiy idelpivnitskiy deleted the h2-proxy-plaintext branch October 2, 2023 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants