From a73568df28ce101470b0651b341c33a40ccde401 Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Thu, 10 Oct 2019 10:00:17 +0200 Subject: [PATCH] Fixes #4177 - Configure HTTP proxy with SslContextFactory. Updates after review. Signed-off-by: Simone Bordet --- .../java/org/eclipse/jetty/client/HttpClient.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpClient.java b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpClient.java index d344335efb1..a295fe8735b 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpClient.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpClient.java @@ -1160,10 +1160,23 @@ public class HttpClient extends ContainerLifeCycle return HttpScheme.HTTPS.is(scheme) || HttpScheme.WSS.is(scheme); } + /** + * Creates a new {@code SslClientConnectionFactory} wrapping the given connection factory. + * + * @param connectionFactory the connection factory to wrap + * @return a new SslClientConnectionFactory + * @deprecated use {@link #newSslClientConnectionFactory(SslContextFactory, ClientConnectionFactory)} instead + */ + @Deprecated + protected ClientConnectionFactory newSslClientConnectionFactory(ClientConnectionFactory connectionFactory) + { + return new SslClientConnectionFactory(getSslContextFactory(), getByteBufferPool(), getExecutor(), connectionFactory); + } + protected ClientConnectionFactory newSslClientConnectionFactory(SslContextFactory sslContextFactory, ClientConnectionFactory connectionFactory) { if (sslContextFactory == null) - sslContextFactory = getSslContextFactory(); + return newSslClientConnectionFactory(connectionFactory); return new SslClientConnectionFactory(sslContextFactory, getByteBufferPool(), getExecutor(), connectionFactory); }