From e72e2d74506b5fd18d89a1730fdc22b483d78ef2 Mon Sep 17 00:00:00 2001 From: Andriy Redko Date: Wed, 6 May 2026 21:49:01 -0400 Subject: [PATCH] Update Jetty to 12.1.9 --- distribution/src/main/release/samples/pom.xml | 2 +- parent/pom.xml | 2 +- .../http2_jetty/AbstractJettyClientServerHttp2Test.java | 7 ++++--- .../apache/cxf/systest/http2_jetty/Http2TestClient.java | 6 ++++-- .../systest/http2_jetty/JettyClientServerHttp2Test.java | 5 +++++ .../systest/http2_jetty/JettyClientServerHttp2cTest.java | 5 +++++ 6 files changed, 20 insertions(+), 7 deletions(-) diff --git a/distribution/src/main/release/samples/pom.xml b/distribution/src/main/release/samples/pom.xml index f102e07dc80..07a1250696f 100644 --- a/distribution/src/main/release/samples/pom.xml +++ b/distribution/src/main/release/samples/pom.xml @@ -33,7 +33,7 @@ UTF-8 4.0.6 5.0.1 - 12.1.8 + 12.1.9 4.2.13.Final 4.5.14 5.32.5 diff --git a/parent/pom.xml b/parent/pom.xml index 185c90f5e12..c09b2c01b53 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -163,7 +163,7 @@ 1.1.1 1.0 1.5.5 - 12.1.8 + 12.1.9 ${cxf.jetty12.version} 3.6.2 2.10.10 diff --git a/systests/transports/src/test/java/org/apache/cxf/systest/http2_jetty/AbstractJettyClientServerHttp2Test.java b/systests/transports/src/test/java/org/apache/cxf/systest/http2_jetty/AbstractJettyClientServerHttp2Test.java index 98fa6c4f25a..a08edbbd45d 100644 --- a/systests/transports/src/test/java/org/apache/cxf/systest/http2_jetty/AbstractJettyClientServerHttp2Test.java +++ b/systests/transports/src/test/java/org/apache/cxf/systest/http2_jetty/AbstractJettyClientServerHttp2Test.java @@ -38,7 +38,7 @@ abstract class AbstractJettyClientServerHttp2Test extends AbstractBusClientServerTestBase { @Test public void testBookNotFoundWithHttp2() throws Exception { - final Http2TestClient client = new Http2TestClient(isSecure()); + final Http2TestClient client = new Http2TestClient(isSecure(), getPort()); final ClientResponse response = client .request(getAddress()) @@ -53,7 +53,7 @@ public void testBookNotFoundWithHttp2() throws Exception { @Test public void testBookWithHttp2() throws Exception { - final Http2TestClient client = new Http2TestClient(isSecure()); + final Http2TestClient client = new Http2TestClient(isSecure(), getPort()); final ClientResponse response = client .request(getAddress()) @@ -69,7 +69,7 @@ public void testBookWithHttp2() throws Exception { @Test public void testGetBookStreamHttp2() throws Exception { - final Http2TestClient client = new Http2TestClient(isSecure()); + final Http2TestClient client = new Http2TestClient(isSecure(), getPort()); final ClientResponse response = client .request(getAddress()) @@ -142,6 +142,7 @@ public void testBookWithHttp2Redirect() throws Exception { protected abstract String getAddress(); protected abstract String getContext(); + protected abstract int getPort(); protected boolean isSecure() { return getAddress().startsWith("https"); diff --git a/systests/transports/src/test/java/org/apache/cxf/systest/http2_jetty/Http2TestClient.java b/systests/transports/src/test/java/org/apache/cxf/systest/http2_jetty/Http2TestClient.java index d657b6b5442..40bb2261658 100644 --- a/systests/transports/src/test/java/org/apache/cxf/systest/http2_jetty/Http2TestClient.java +++ b/systests/transports/src/test/java/org/apache/cxf/systest/http2_jetty/Http2TestClient.java @@ -50,8 +50,9 @@ public class Http2TestClient implements AutoCloseable { private final HTTP2Client client; private final SslContextFactory.Client sslContextFactory; + private final int port; - public Http2TestClient(boolean secure) throws Exception { + public Http2TestClient(boolean secure, int port) throws Exception { client = new HTTP2Client(); if (secure) { sslContextFactory = new SslContextFactory.Client(true); @@ -60,6 +61,7 @@ public Http2TestClient(boolean secure) throws Exception { sslContextFactory = null; } client.start(); + this.port = port; } public static class ClientResponse { @@ -140,7 +142,7 @@ public ClientResponse request(final String address, final String path, final HttpFields.Mutable requestFields = HttpFields.build(); requestFields.add(HttpHeader.ACCEPT, accept); - requestFields.add(HttpHeader.HOST, "localhost"); + requestFields.add(HttpHeader.HOST, "localhost:" + port); final MetaData.Request request = new MetaData.Request(method, HttpURI.build(address + path), version, requestFields); diff --git a/systests/transports/src/test/java/org/apache/cxf/systest/http2_jetty/JettyClientServerHttp2Test.java b/systests/transports/src/test/java/org/apache/cxf/systest/http2_jetty/JettyClientServerHttp2Test.java index a7070247ce2..5790fa08699 100644 --- a/systests/transports/src/test/java/org/apache/cxf/systest/http2_jetty/JettyClientServerHttp2Test.java +++ b/systests/transports/src/test/java/org/apache/cxf/systest/http2_jetty/JettyClientServerHttp2Test.java @@ -45,4 +45,9 @@ protected String getAddress() { protected String getContext() { return "/http2"; } + + @Override + protected int getPort() { + return Integer.valueOf(PORT); + } } diff --git a/systests/transports/src/test/java/org/apache/cxf/systest/http2_jetty/JettyClientServerHttp2cTest.java b/systests/transports/src/test/java/org/apache/cxf/systest/http2_jetty/JettyClientServerHttp2cTest.java index 805367c2099..5ecf8302ade 100644 --- a/systests/transports/src/test/java/org/apache/cxf/systest/http2_jetty/JettyClientServerHttp2cTest.java +++ b/systests/transports/src/test/java/org/apache/cxf/systest/http2_jetty/JettyClientServerHttp2cTest.java @@ -44,4 +44,9 @@ protected String getAddress() { protected String getContext() { return "/http2"; } + + @Override + protected int getPort() { + return Integer.valueOf(PORT); + } }