diff --git a/http-client/src/main/java/com/facebook/airlift/http/client/jetty/JettyHttpClient.java b/http-client/src/main/java/com/facebook/airlift/http/client/jetty/JettyHttpClient.java index 33ff59fdca..2cabdab0e1 100755 --- a/http-client/src/main/java/com/facebook/airlift/http/client/jetty/JettyHttpClient.java +++ b/http-client/src/main/java/com/facebook/airlift/http/client/jetty/JettyHttpClient.java @@ -157,7 +157,7 @@ public JettyHttpClient( creationLocation.fillInStackTrace(); - SslContextFactory sslContextFactory = new SslContextFactory(); + SslContextFactory.Client sslContextFactory = new SslContextFactory.Client(); sslContextFactory.setEndpointIdentificationAlgorithm("HTTPS"); if (config.getKeyStorePath() != null) { Optional pemKeyStore = tryLoadPemKeyStore(config); diff --git a/http-client/src/test/java/com/facebook/airlift/http/client/AbstractHttpClientTest.java b/http-client/src/test/java/com/facebook/airlift/http/client/AbstractHttpClientTest.java index 7be3d6b3f4..f2dce9afe8 100755 --- a/http-client/src/test/java/com/facebook/airlift/http/client/AbstractHttpClientTest.java +++ b/http-client/src/test/java/com/facebook/airlift/http/client/AbstractHttpClientTest.java @@ -140,7 +140,8 @@ public void abstractSetup() if (keystore != null) { httpConfiguration.addCustomizer(new SecureRequestCustomizer()); - SslContextFactory sslContextFactory = new SslContextFactory(keystore); + SslContextFactory.Client sslContextFactory = new SslContextFactory.Client(); + sslContextFactory.setKeyStorePath(keystore); sslContextFactory.setKeyStorePassword("changeit"); SslConnectionFactory sslConnectionFactory = new SslConnectionFactory(sslContextFactory, "http/1.1"); @@ -726,7 +727,7 @@ public void testCompressionIsDisabled() assertEquals(body, ""); assertFalse(servlet.getRequestHeaders().containsKey(HeaderName.of(ACCEPT_ENCODING))); - String json = "{\"foo\":\"bar\",\"hello\":\"world\"}"; + String json = "{\"fruit\":\"apple\",\"hello\":\"world\"}"; assertGreaterThanOrEqual(json.length(), GzipHandler.DEFAULT_MIN_GZIP_SIZE); servlet.setResponseBody(json); diff --git a/http-client/src/test/java/com/facebook/airlift/http/client/TestHttpClientConfig.java b/http-client/src/test/java/com/facebook/airlift/http/client/TestHttpClientConfig.java index 8826511c48..7217d8bfd7 100644 --- a/http-client/src/test/java/com/facebook/airlift/http/client/TestHttpClientConfig.java +++ b/http-client/src/test/java/com/facebook/airlift/http/client/TestHttpClientConfig.java @@ -212,7 +212,7 @@ public void testValidations() private List getJettyDefaultExcludedCiphers() { - SslContextFactory sslContextFactory = new SslContextFactory(); + SslContextFactory.Client sslContextFactory = new SslContextFactory.Client(); return Arrays.asList(sslContextFactory.getExcludeCipherSuites()); } } diff --git a/http-client/src/test/java/com/facebook/airlift/http/client/jetty/TestHttpClientLogger.java b/http-client/src/test/java/com/facebook/airlift/http/client/jetty/TestHttpClientLogger.java index 5b5040116f..0baf6716ed 100644 --- a/http-client/src/test/java/com/facebook/airlift/http/client/jetty/TestHttpClientLogger.java +++ b/http-client/src/test/java/com/facebook/airlift/http/client/jetty/TestHttpClientLogger.java @@ -359,6 +359,18 @@ public Request cookie(HttpCookie cookie) throw new UnsupportedOperationException(); } + @Override + public Request tag(Object o) + { + return null; + } + + @Override + public Object getTag() + { + return null; + } + @Override public Request attribute(String name, Object value) { @@ -539,6 +551,12 @@ public Request onResponseContentAsync(Response.AsyncContentListener listener) throw new UnsupportedOperationException(); } + @Override + public Request onResponseContentDemanded(Response.DemandedContentListener demandedContentListener) + { + return null; + } + @Override public Request onResponseSuccess(Response.SuccessListener listener) { diff --git a/http-server/src/main/java/com/facebook/airlift/http/server/HttpServer.java b/http-server/src/main/java/com/facebook/airlift/http/server/HttpServer.java index 9f7ad1a169..afde06d977 100644 --- a/http-server/src/main/java/com/facebook/airlift/http/server/HttpServer.java +++ b/http-server/src/main/java/com/facebook/airlift/http/server/HttpServer.java @@ -225,7 +225,7 @@ public HttpServer(HttpServerInfo httpServerInfo, HttpConfiguration httpsConfiguration = new HttpConfiguration(baseHttpConfiguration); httpsConfiguration.addCustomizer(new SecureRequestCustomizer(config.isSniHostCheck())); - SslContextFactory sslContextFactory = new SslContextFactory(); + SslContextFactory.Server sslContextFactory = new SslContextFactory.Server(); Optional pemKeyStore = tryLoadPemKeyStore(config); if (pemKeyStore.isPresent()) { sslContextFactory.setKeyStore(pemKeyStore.get()); @@ -300,7 +300,7 @@ public HttpServer(HttpServerInfo httpServerInfo, if (config.isHttpsEnabled()) { adminConfiguration.addCustomizer(new SecureRequestCustomizer()); - SslContextFactory sslContextFactory = new SslContextFactory(); + SslContextFactory.Server sslContextFactory = new SslContextFactory.Server(); sslContextFactory.setKeyStorePath(config.getKeystorePath()); sslContextFactory.setKeyStorePassword(config.getKeystorePassword()); if (config.getKeyManagerPassword() != null) { diff --git a/http-server/src/test/java/com/facebook/airlift/http/server/TestHttpServerCipher.java b/http-server/src/test/java/com/facebook/airlift/http/server/TestHttpServerCipher.java index b467046fdf..ad31648121 100644 --- a/http-server/src/test/java/com/facebook/airlift/http/server/TestHttpServerCipher.java +++ b/http-server/src/test/java/com/facebook/airlift/http/server/TestHttpServerCipher.java @@ -183,7 +183,7 @@ private HttpServerConfig createHttpServerConfig() private static HttpClient createClientIncludeCiphers(String... includedCipherSuites) throws Exception { - SslContextFactory sslContextFactory = new SslContextFactory(); + SslContextFactory.Server sslContextFactory = new SslContextFactory.Server(); sslContextFactory.setIncludeCipherSuites(includedCipherSuites); // Since Jetty 9.4.12 the list of excluded cipher suites includes "^TLS_RSA_.*$" by default. // We reset that list here to enable use of those cipher suites. diff --git a/http-server/src/test/java/com/facebook/airlift/http/server/TestHttpServerConfig.java b/http-server/src/test/java/com/facebook/airlift/http/server/TestHttpServerConfig.java index 559415dd08..066bdb71e0 100644 --- a/http-server/src/test/java/com/facebook/airlift/http/server/TestHttpServerConfig.java +++ b/http-server/src/test/java/com/facebook/airlift/http/server/TestHttpServerConfig.java @@ -204,7 +204,7 @@ public void testExplicitPropertyMappings() private List getJettyDefaultExcludedCiphers() { - SslContextFactory sslContextFactory = new SslContextFactory(); + SslContextFactory.Server sslContextFactory = new SslContextFactory.Server(); return Arrays.asList(sslContextFactory.getExcludeCipherSuites()); } } diff --git a/pom.xml b/pom.xml index 053a9f8006..94ae0aab71 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ 0.214-SNAPSHOT ${dep.airlift.version} - 9.4.14.v20181114 + 9.4.55.v20240627 2.26 1.31