-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
Jetty 12
Currently when upgrading to a websocket, the http version over which it will happen is determined by the capabilities of the underlying http client. This means that there must me one instance setup for each, if we want to specify the version on a per-request basis. In order to be able to use a single instance of the http client, the websocket client code should provide a way to specify in the upgrade request which http version to be used.
ClientUpgradeRequest upgradeRequest = ...
upgradeRequest.setHttpVersion(version);
webClient.connect(endpoint, upgradeRequest, null);
Example use case: a transparent jetty proxy, using one http and websocket client, which is setting the http version of the upgrade to the target to be the same as between it and the source. The proxy uses secured transports, similar to the examples in org.eclipse.jetty.proxy.ClientAuthProxyTest
(ie it has the proper ssl certificates and knows how to talk to the target on behalf of the source).