Skip to content

Commit 2a57170

Browse files
Update to Jetty 9.4.55.v20240627
1 parent 63c13d6 commit 2a57170

File tree

8 files changed

+28
-9
lines changed

8 files changed

+28
-9
lines changed

http-client/src/main/java/com/facebook/airlift/http/client/jetty/JettyHttpClient.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ public JettyHttpClient(
157157

158158
creationLocation.fillInStackTrace();
159159

160-
SslContextFactory sslContextFactory = new SslContextFactory();
160+
SslContextFactory.Client sslContextFactory = new SslContextFactory.Client();
161161
sslContextFactory.setEndpointIdentificationAlgorithm("HTTPS");
162162
if (config.getKeyStorePath() != null) {
163163
Optional<KeyStore> pemKeyStore = tryLoadPemKeyStore(config);

http-client/src/test/java/com/facebook/airlift/http/client/AbstractHttpClientTest.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ public void abstractSetup()
140140
if (keystore != null) {
141141
httpConfiguration.addCustomizer(new SecureRequestCustomizer());
142142

143-
SslContextFactory sslContextFactory = new SslContextFactory(keystore);
143+
SslContextFactory.Client sslContextFactory = new SslContextFactory.Client();
144+
sslContextFactory.setKeyStorePath(keystore);
144145
sslContextFactory.setKeyStorePassword("changeit");
145146
SslConnectionFactory sslConnectionFactory = new SslConnectionFactory(sslContextFactory, "http/1.1");
146147

@@ -726,7 +727,7 @@ public void testCompressionIsDisabled()
726727
assertEquals(body, "");
727728
assertFalse(servlet.getRequestHeaders().containsKey(HeaderName.of(ACCEPT_ENCODING)));
728729

729-
String json = "{\"foo\":\"bar\",\"hello\":\"world\"}";
730+
String json = "{\"fruit\":\"apple\",\"hello\":\"world\"}";
730731
assertGreaterThanOrEqual(json.length(), GzipHandler.DEFAULT_MIN_GZIP_SIZE);
731732

732733
servlet.setResponseBody(json);

http-client/src/test/java/com/facebook/airlift/http/client/TestHttpClientConfig.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ public void testValidations()
212212

213213
private List<String> getJettyDefaultExcludedCiphers()
214214
{
215-
SslContextFactory sslContextFactory = new SslContextFactory();
215+
SslContextFactory.Client sslContextFactory = new SslContextFactory.Client();
216216
return Arrays.asList(sslContextFactory.getExcludeCipherSuites());
217217
}
218218
}

http-client/src/test/java/com/facebook/airlift/http/client/jetty/TestHttpClientLogger.java

+18
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,18 @@ public Request cookie(HttpCookie cookie)
359359
throw new UnsupportedOperationException();
360360
}
361361

362+
@Override
363+
public Request tag(Object o)
364+
{
365+
return null;
366+
}
367+
368+
@Override
369+
public Object getTag()
370+
{
371+
return null;
372+
}
373+
362374
@Override
363375
public Request attribute(String name, Object value)
364376
{
@@ -539,6 +551,12 @@ public Request onResponseContentAsync(Response.AsyncContentListener listener)
539551
throw new UnsupportedOperationException();
540552
}
541553

554+
@Override
555+
public Request onResponseContentDemanded(Response.DemandedContentListener demandedContentListener)
556+
{
557+
return null;
558+
}
559+
542560
@Override
543561
public Request onResponseSuccess(Response.SuccessListener listener)
544562
{

http-server/src/main/java/com/facebook/airlift/http/server/HttpServer.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ public HttpServer(HttpServerInfo httpServerInfo,
225225
HttpConfiguration httpsConfiguration = new HttpConfiguration(baseHttpConfiguration);
226226
httpsConfiguration.addCustomizer(new SecureRequestCustomizer(config.isSniHostCheck()));
227227

228-
SslContextFactory sslContextFactory = new SslContextFactory();
228+
SslContextFactory.Server sslContextFactory = new SslContextFactory.Server();
229229
Optional<KeyStore> pemKeyStore = tryLoadPemKeyStore(config);
230230
if (pemKeyStore.isPresent()) {
231231
sslContextFactory.setKeyStore(pemKeyStore.get());
@@ -300,7 +300,7 @@ public HttpServer(HttpServerInfo httpServerInfo,
300300
if (config.isHttpsEnabled()) {
301301
adminConfiguration.addCustomizer(new SecureRequestCustomizer());
302302

303-
SslContextFactory sslContextFactory = new SslContextFactory();
303+
SslContextFactory.Server sslContextFactory = new SslContextFactory.Server();
304304
sslContextFactory.setKeyStorePath(config.getKeystorePath());
305305
sslContextFactory.setKeyStorePassword(config.getKeystorePassword());
306306
if (config.getKeyManagerPassword() != null) {

http-server/src/test/java/com/facebook/airlift/http/server/TestHttpServerCipher.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ private HttpServerConfig createHttpServerConfig()
183183
private static HttpClient createClientIncludeCiphers(String... includedCipherSuites)
184184
throws Exception
185185
{
186-
SslContextFactory sslContextFactory = new SslContextFactory();
186+
SslContextFactory.Server sslContextFactory = new SslContextFactory.Server();
187187
sslContextFactory.setIncludeCipherSuites(includedCipherSuites);
188188
// Since Jetty 9.4.12 the list of excluded cipher suites includes "^TLS_RSA_.*$" by default.
189189
// We reset that list here to enable use of those cipher suites.

http-server/src/test/java/com/facebook/airlift/http/server/TestHttpServerConfig.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ public void testExplicitPropertyMappings()
204204

205205
private List<String> getJettyDefaultExcludedCiphers()
206206
{
207-
SslContextFactory sslContextFactory = new SslContextFactory();
207+
SslContextFactory.Server sslContextFactory = new SslContextFactory.Server();
208208
return Arrays.asList(sslContextFactory.getExcludeCipherSuites());
209209
}
210210
}

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
<dep.airlift.version>0.214-SNAPSHOT</dep.airlift.version>
2929
<dep.packaging.version>${dep.airlift.version}</dep.packaging.version>
30-
<dep.jetty.version>9.4.14.v20181114</dep.jetty.version>
30+
<dep.jetty.version>9.4.55.v20240627</dep.jetty.version>
3131
<dep.jersey.version>2.26</dep.jersey.version>
3232
<dep.drift.version>1.31</dep.drift.version>
3333
</properties>

0 commit comments

Comments
 (0)