Browse Source

Upgrade to Jetty 12.0.17 and Jetty Reactive HttpClient 4.0.9

Includes Apache HttpClient 5.4.1, Netty 4.1.119, Jackson 2.18.3, Gson 2.12.1, FreeMarker 2.3.34, Protobuf 4.30, Groovy 4.0.26, Jython 2.7.4, JRuby 9.4.12, Caffeine 3.2, QDox 2.2, Awaitility 4.3, EasyMock 5.5, HtmlUnit 4.10

Closes gh-34561
pull/34656/head
Juergen Hoeller 11 months ago
parent
commit
90ddb40d7a
  1. 50
      framework-platform/framework-platform.gradle
  2. 3
      spring-web/src/main/java/org/springframework/http/server/reactive/JettyCoreHttpHandlerAdapter.java
  3. 3
      spring-web/src/main/java/org/springframework/http/server/reactive/JettyCoreServerHttpRequest.java
  4. 23
      spring-web/src/main/java/org/springframework/http/server/reactive/JettyCoreServerHttpResponse.java

50
framework-platform/framework-platform.gradle

@ -7,31 +7,31 @@ javaPlatform { @@ -7,31 +7,31 @@ javaPlatform {
}
dependencies {
api(platform("com.fasterxml.jackson:jackson-bom:2.18.2"))
api(platform("com.fasterxml.jackson:jackson-bom:2.18.3"))
api(platform("io.micrometer:micrometer-bom:1.14.4"))
api(platform("io.netty:netty-bom:4.1.118.Final"))
api(platform("io.netty:netty-bom:4.1.119.Final"))
api(platform("io.netty:netty5-bom:5.0.0.Alpha5"))
api(platform("io.projectreactor:reactor-bom:2024.0.3"))
api(platform("io.rsocket:rsocket-bom:1.1.5"))
api(platform("org.apache.groovy:groovy-bom:4.0.24"))
api(platform("org.apache.groovy:groovy-bom:4.0.26"))
api(platform("org.apache.logging.log4j:log4j-bom:2.21.1"))
api(platform("org.assertj:assertj-bom:3.27.3"))
api(platform("org.eclipse.jetty:jetty-bom:12.0.16"))
api(platform("org.eclipse.jetty.ee10:jetty-ee10-bom:12.0.16"))
api(platform("org.eclipse.jetty:jetty-bom:12.0.17"))
api(platform("org.eclipse.jetty.ee10:jetty-ee10-bom:12.0.17"))
api(platform("org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.8.1"))
api(platform("org.jetbrains.kotlinx:kotlinx-serialization-bom:1.6.3"))
api(platform("org.junit:junit-bom:5.11.4"))
api(platform("org.mockito:mockito-bom:5.15.2"))
api(platform("org.mockito:mockito-bom:5.16.0"))
constraints {
api("com.fasterxml:aalto-xml:1.3.2")
api("com.fasterxml.woodstox:woodstox-core:6.7.0")
api("com.github.ben-manes.caffeine:caffeine:3.1.8")
api("com.github.ben-manes.caffeine:caffeine:3.2.0")
api("com.github.librepdf:openpdf:1.3.43")
api("com.google.code.findbugs:findbugs:3.0.1")
api("com.google.code.findbugs:jsr305:3.0.2")
api("com.google.code.gson:gson:2.11.0")
api("com.google.protobuf:protobuf-java-util:4.29.3")
api("com.google.code.gson:gson:2.12.1")
api("com.google.protobuf:protobuf-java-util:4.30.0")
api("com.h2database:h2:2.3.232")
api("com.jayway.jsonpath:json-path:2.9.0")
api("com.oracle.database.jdbc:ojdbc11:21.9.0.0")
@ -43,7 +43,7 @@ dependencies { @@ -43,7 +43,7 @@ dependencies {
api("com.sun.xml.bind:jaxb-core:3.0.2")
api("com.sun.xml.bind:jaxb-impl:3.0.2")
api("com.sun.xml.bind:jaxb-xjc:3.0.2")
api("com.thoughtworks.qdox:qdox:2.1.0")
api("com.thoughtworks.qdox:qdox:2.2.0")
api("com.thoughtworks.xstream:xstream:1.4.21")
api("commons-io:commons-io:2.15.0")
api("de.bechte.junit:junit-hierarchicalcontextrunner:4.12.2")
@ -100,8 +100,8 @@ dependencies { @@ -100,8 +100,8 @@ dependencies {
api("org.apache.derby:derby:10.16.1.1")
api("org.apache.derby:derbyclient:10.16.1.1")
api("org.apache.derby:derbytools:10.16.1.1")
api("org.apache.httpcomponents.client5:httpclient5:5.4.1")
api("org.apache.httpcomponents.core5:httpcore5-reactive:5.3.1")
api("org.apache.httpcomponents.client5:httpclient5:5.4.2")
api("org.apache.httpcomponents.core5:httpcore5-reactive:5.3.3")
api("org.apache.poi:poi-ooxml:5.2.5")
api("org.apache.tomcat.embed:tomcat-embed-core:10.1.28")
api("org.apache.tomcat.embed:tomcat-embed-websocket:10.1.28")
@ -110,18 +110,18 @@ dependencies { @@ -110,18 +110,18 @@ dependencies {
api("org.aspectj:aspectjrt:1.9.22.1")
api("org.aspectj:aspectjtools:1.9.22.1")
api("org.aspectj:aspectjweaver:1.9.22.1")
api("org.awaitility:awaitility:4.2.2")
api("org.awaitility:awaitility:4.3.0")
api("org.bouncycastle:bcpkix-jdk18on:1.72")
api("org.codehaus.jettison:jettison:1.5.4")
api("org.crac:crac:1.4.0")
api("org.dom4j:dom4j:2.1.4")
api("org.easymock:easymock:5.4.0")
api("org.eclipse.jetty:jetty-reactive-httpclient:4.0.8")
api("org.easymock:easymock:5.5.0")
api("org.eclipse.jetty:jetty-reactive-httpclient:4.0.9")
api("org.eclipse.persistence:org.eclipse.persistence.jpa:3.0.4")
api("org.eclipse:yasson:2.0.4")
api("org.ehcache:ehcache:3.10.8")
api("org.ehcache:jcache:1.0.1")
api("org.freemarker:freemarker:2.3.33")
api("org.freemarker:freemarker:2.3.34")
api("org.glassfish.external:opendmk_jmxremote_optional_jar:1.0-b01-ea")
api("org.glassfish:jakarta.el:4.0.2")
api("org.glassfish.tyrus:tyrus-container-servlet:2.1.3")
@ -130,24 +130,24 @@ dependencies { @@ -130,24 +130,24 @@ dependencies {
api("org.hibernate:hibernate-core-jakarta:5.6.15.Final")
api("org.hibernate:hibernate-validator:7.0.5.Final")
api("org.hsqldb:hsqldb:2.7.4")
api("org.htmlunit:htmlunit:4.6.0")
api("org.htmlunit:htmlunit:4.10.0")
api("org.javamoney:moneta:1.4.4")
api("org.jruby:jruby:9.4.9.0")
api("org.jruby:jruby:9.4.12.0")
api("org.junit.support:testng-engine:1.0.5")
api("org.mozilla:rhino:1.7.15")
api("org.ogce:xpp3:1.1.6")
api("org.python:jython-standalone:2.7.3")
api("org.python:jython-standalone:2.7.4")
api("org.quartz-scheduler:quartz:2.3.2")
api("org.seleniumhq.selenium:htmlunit3-driver:4.26.0")
api("org.seleniumhq.selenium:selenium-java:4.26.0")
api("org.seleniumhq.selenium:htmlunit3-driver:4.29.0")
api("org.seleniumhq.selenium:selenium-java:4.29.0")
api("org.skyscreamer:jsonassert:1.5.3")
api("org.slf4j:slf4j-api:2.0.16")
api("org.slf4j:slf4j-api:2.0.17")
api("org.testng:testng:7.11.0")
api("org.webjars:underscorejs:1.8.3")
api("org.webjars:webjars-locator-core:0.55")
api("org.webjars:webjars-locator-lite:1.0.0")
api("org.webjars:webjars-locator-core:0.59")
api("org.webjars:webjars-locator-lite:1.1.0")
api("org.xmlunit:xmlunit-assertj:2.10.0")
api("org.xmlunit:xmlunit-matchers:2.10.0")
api("org.yaml:snakeyaml:2.3")
api("org.yaml:snakeyaml:2.4")
}
}

3
spring-web/src/main/java/org/springframework/http/server/reactive/JettyCoreHttpHandlerAdapter.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2024 the original author or authors.
* Copyright 2002-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -43,6 +43,7 @@ public class JettyCoreHttpHandlerAdapter extends Handler.Abstract.NonBlocking { @@ -43,6 +43,7 @@ public class JettyCoreHttpHandlerAdapter extends Handler.Abstract.NonBlocking {
this.httpHandler = httpHandler;
}
public void setDataBufferFactory(JettyDataBufferFactory dataBufferFactory) {
Assert.notNull(dataBufferFactory, "DataBufferFactory must not be null");
this.dataBufferFactory = dataBufferFactory;

3
spring-web/src/main/java/org/springframework/http/server/reactive/JettyCoreServerHttpRequest.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2024 the original author or authors.
* Copyright 2002-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -61,6 +61,7 @@ class JettyCoreServerHttpRequest extends AbstractServerHttpRequest { @@ -61,6 +61,7 @@ class JettyCoreServerHttpRequest extends AbstractServerHttpRequest {
this.request = request;
}
@Override
protected MultiValueMap<String, HttpCookie> initCookies() {
List<org.eclipse.jetty.http.HttpCookie> httpCookies = Request.getCookies(this.request);

23
spring-web/src/main/java/org/springframework/http/server/reactive/JettyCoreServerHttpResponse.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2024 the original author or authors.
* Copyright 2002-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -59,10 +59,10 @@ class JettyCoreServerHttpResponse extends AbstractServerHttpResponse implements @@ -59,10 +59,10 @@ class JettyCoreServerHttpResponse extends AbstractServerHttpResponse implements
super(dataBufferFactory, new HttpHeaders(new JettyHeadersAdapter(response.getHeaders())));
this.response = response;
// remove all existing cookies from the response and add them to the cookie map, to be added back later
for (ListIterator<HttpField> i = this.response.getHeaders().listIterator(); i.hasNext(); ) {
HttpField f = i.next();
if (f instanceof HttpCookieUtils.SetCookieHttpField setCookieHttpField) {
// Remove all existing cookies from the response and add them to the cookie map, to be added back later
for (ListIterator<HttpField> it = this.response.getHeaders().listIterator(); it.hasNext();) {
HttpField field = it.next();
if (field instanceof HttpCookieUtils.SetCookieHttpField setCookieHttpField) {
HttpCookie httpCookie = setCookieHttpField.getHttpCookie();
ResponseCookie responseCookie = ResponseCookie.from(httpCookie.getName(), httpCookie.getValue())
.httpOnly(httpCookie.isHttpOnly())
@ -72,8 +72,8 @@ class JettyCoreServerHttpResponse extends AbstractServerHttpResponse implements @@ -72,8 +72,8 @@ class JettyCoreServerHttpResponse extends AbstractServerHttpResponse implements
.secure(httpCookie.isSecure())
.partitioned(httpCookie.isPartitioned())
.build();
this.addCookie(responseCookie);
i.remove();
addCookie(responseCookie);
it.remove();
}
}
}
@ -94,7 +94,9 @@ class JettyCoreServerHttpResponse extends AbstractServerHttpResponse implements @@ -94,7 +94,9 @@ class JettyCoreServerHttpResponse extends AbstractServerHttpResponse implements
@Override
protected void applyStatusCode() {
HttpStatusCode status = getStatusCode();
this.response.setStatus(status == null ? 0 : status.value());
if (status != null){
this.response.setStatus(status.value());
}
}
@Override
@ -103,7 +105,7 @@ class JettyCoreServerHttpResponse extends AbstractServerHttpResponse implements @@ -103,7 +105,7 @@ class JettyCoreServerHttpResponse extends AbstractServerHttpResponse implements
@Override
protected void applyCookies() {
this.getCookies().values().stream()
getCookies().values().stream()
.flatMap(List::stream)
.forEach(cookie -> Response.addCookie(this.response, new ResponseHttpCookie(cookie)));
}
@ -165,12 +167,10 @@ class JettyCoreServerHttpResponse extends AbstractServerHttpResponse implements @@ -165,12 +167,10 @@ class JettyCoreServerHttpResponse extends AbstractServerHttpResponse implements
private final ResponseCookie responseCookie;
ResponseHttpCookie(ResponseCookie responseCookie) {
this.responseCookie = responseCookie;
}
@Override
public String getName() {
return this.responseCookie.getName();
@ -235,7 +235,6 @@ class JettyCoreServerHttpResponse extends AbstractServerHttpResponse implements @@ -235,7 +235,6 @@ class JettyCoreServerHttpResponse extends AbstractServerHttpResponse implements
public Map<String, String> getAttributes() {
return Collections.emptyMap();
}
}
}

Loading…
Cancel
Save