[Bug 69559] New: WARNING: sun.misc.Unsafe::invokeCleaner has been called by org.apache.tomcat.util.buf.ByteBufferUtils
https://bz.apache.org/bugzilla/show_bug.cgi?id=69559 Bug ID: 69559 Summary: WARNING: sun.misc.Unsafe::invokeCleaner has been called by org.apache.tomcat.util.buf.ByteBufferUtils Product: Tomcat 10 Version: 10.1.34 Hardware: PC Status: NEW Severity: normal Priority: P2 Component: Util Assignee: dev@tomcat.apache.org Reporter: asf-bugzi...@transentia.com.au Target Milestone: -- Windows 11 openjdk-24-ea+34_windows-x64_bin Spring boot: 3.4.2 Apache Tomcat/10.1.34 Gets WARNING at startup: === C:\LocalData\DEV\Java\jdk-24\bin\java.exe --enable-preview --enable-native-access=ALL-UNNAMED -XX:TieredStopAtLevel=1 ... 19:42:21.172 INFO - tools.ToolsApplication : Starting ToolsApplication using Java 24-ea with PID 19000 (...) ... 19:42:22.188 INFO - o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port 8080 (https) 19:42:22.198 INFO - o.apache.catalina.core.StandardService : Starting service [Tomcat] 19:42:22.198 INFO - o.apache.catalina.core.StandardEngine: Starting Servlet engine: [Apache Tomcat/10.1.34] ... 19:42:23.171 INFO - o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port 8080 (https) with context path '/' 19:42:23.177 INFO - tools.ToolsApplication : Started ToolsApplication in 2.428 seconds (process running for 2.821) WARNING: A terminally deprecated method in sun.misc.Unsafe has been called WARNING: sun.misc.Unsafe::invokeCleaner has been called by org.apache.tomcat.util.buf.ByteBufferUtils (file:/E:/.gradle/caches/modules-2/files-2.1/org.apache.tomcat.embed/tomcat-embed-core/10.1.34/f610f84be607fbc82e393cc220f0ad45f92afc91/tomcat-embed-core-10.1.34.jar) WARNING: Please consider reporting this to the maintainers of class org.apache.tomcat.util.buf.ByteBufferUtils WARNING: sun.misc.Unsafe::invokeCleaner will be removed in a future release === Havent' seen this reported anywhere else (searching here did not find anything). -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch main updated: Speed up test execution
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/main by this push: new 5f9f1fba36 Speed up test execution 5f9f1fba36 is described below commit 5f9f1fba360cc89416f731079d59a9db9fa28bd7 Author: Mark Thomas AuthorDate: Fri Jan 31 10:10:22 2025 + Speed up test execution Skip timeouts where they can be skipped and reduce them where they can't. --- .../apache/tomcat/websocket/TestWebSocketFrameClientSSL.java | 10 +- test/org/apache/tomcat/websocket/TesterFirehoseServer.java | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java b/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java index b815ccd508..25087c9dce 100644 --- a/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java +++ b/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java @@ -32,6 +32,8 @@ import javax.net.ssl.SSLContext; import javax.net.ssl.TrustManagerFactory; import jakarta.websocket.ClientEndpointConfig; +import jakarta.websocket.CloseReason; +import jakarta.websocket.CloseReason.CloseCodes; import jakarta.websocket.ContainerProvider; import jakarta.websocket.MessageHandler; import jakarta.websocket.Session; @@ -191,11 +193,9 @@ public class TestWebSocketFrameClientSSL extends WebSocketBaseTest { Assert.fail("There are [" + openConnectionCount + "] connections still open"); } -// Set a short session close timeout (milliseconds) -wsSession.getUserProperties().put( - org.apache.tomcat.websocket.Constants.SESSION_CLOSE_TIMEOUT_PROPERTY, Long.valueOf(2000)); -// Close the client session. -wsSession.close(); +// Cast so we can force the session to be closed quickly. +CloseReason cr = new CloseReason(CloseCodes.CLOSED_ABNORMALLY, ""); +((WsSession) wsSession).doClose(cr, cr, true); } diff --git a/test/org/apache/tomcat/websocket/TesterFirehoseServer.java b/test/org/apache/tomcat/websocket/TesterFirehoseServer.java index a903966c12..a09c4adac8 100644 --- a/test/org/apache/tomcat/websocket/TesterFirehoseServer.java +++ b/test/org/apache/tomcat/websocket/TesterFirehoseServer.java @@ -41,7 +41,7 @@ public class TesterFirehoseServer { public static final String MESSAGE; public static final int MESSAGE_SIZE = 1024; public static final int WAIT_TIME_MILLIS = 30; -public static final int SEND_TIME_OUT_MILLIS = 5000; +public static final int SEND_TIME_OUT_MILLIS = 2000; public static final String PATH = "/firehose"; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 11.0.x updated: Speed up test execution
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 11.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/11.0.x by this push: new 63d72cf2c1 Speed up test execution 63d72cf2c1 is described below commit 63d72cf2c1fbf633a769aa093748f383cb92b5a7 Author: Mark Thomas AuthorDate: Fri Jan 31 10:10:22 2025 + Speed up test execution Skip timeouts where they can be skipped and reduce them where they can't. --- .../apache/tomcat/websocket/TestWebSocketFrameClientSSL.java | 10 +- test/org/apache/tomcat/websocket/TesterFirehoseServer.java | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java b/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java index b815ccd508..25087c9dce 100644 --- a/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java +++ b/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java @@ -32,6 +32,8 @@ import javax.net.ssl.SSLContext; import javax.net.ssl.TrustManagerFactory; import jakarta.websocket.ClientEndpointConfig; +import jakarta.websocket.CloseReason; +import jakarta.websocket.CloseReason.CloseCodes; import jakarta.websocket.ContainerProvider; import jakarta.websocket.MessageHandler; import jakarta.websocket.Session; @@ -191,11 +193,9 @@ public class TestWebSocketFrameClientSSL extends WebSocketBaseTest { Assert.fail("There are [" + openConnectionCount + "] connections still open"); } -// Set a short session close timeout (milliseconds) -wsSession.getUserProperties().put( - org.apache.tomcat.websocket.Constants.SESSION_CLOSE_TIMEOUT_PROPERTY, Long.valueOf(2000)); -// Close the client session. -wsSession.close(); +// Cast so we can force the session to be closed quickly. +CloseReason cr = new CloseReason(CloseCodes.CLOSED_ABNORMALLY, ""); +((WsSession) wsSession).doClose(cr, cr, true); } diff --git a/test/org/apache/tomcat/websocket/TesterFirehoseServer.java b/test/org/apache/tomcat/websocket/TesterFirehoseServer.java index a903966c12..a09c4adac8 100644 --- a/test/org/apache/tomcat/websocket/TesterFirehoseServer.java +++ b/test/org/apache/tomcat/websocket/TesterFirehoseServer.java @@ -41,7 +41,7 @@ public class TesterFirehoseServer { public static final String MESSAGE; public static final int MESSAGE_SIZE = 1024; public static final int WAIT_TIME_MILLIS = 30; -public static final int SEND_TIME_OUT_MILLIS = 5000; +public static final int SEND_TIME_OUT_MILLIS = 2000; public static final String PATH = "/firehose"; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 10.1.x updated: Speed up test execution
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/10.1.x by this push: new 3d77f8e20e Speed up test execution 3d77f8e20e is described below commit 3d77f8e20e7d01d911265794dd1e553c246db787 Author: Mark Thomas AuthorDate: Fri Jan 31 10:10:22 2025 + Speed up test execution Skip timeouts where they can be skipped and reduce them where they can't. --- .../apache/tomcat/websocket/TestWebSocketFrameClientSSL.java | 10 +- test/org/apache/tomcat/websocket/TesterFirehoseServer.java | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java b/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java index 770caa9499..d77e376273 100644 --- a/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java +++ b/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java @@ -32,6 +32,8 @@ import javax.net.ssl.SSLContext; import javax.net.ssl.TrustManagerFactory; import jakarta.websocket.ClientEndpointConfig; +import jakarta.websocket.CloseReason; +import jakarta.websocket.CloseReason.CloseCodes; import jakarta.websocket.ContainerProvider; import jakarta.websocket.MessageHandler; import jakarta.websocket.Session; @@ -285,11 +287,9 @@ public class TestWebSocketFrameClientSSL extends WebSocketBaseTest { Assert.fail("There are [" + openConnectionCount + "] connections still open"); } -// Set a short session close timeout (milliseconds) -wsSession.getUserProperties().put( - org.apache.tomcat.websocket.Constants.SESSION_CLOSE_TIMEOUT_PROPERTY, Long.valueOf(2000)); -// Close the client session. -wsSession.close(); +// Cast so we can force the session to be closed quickly. +CloseReason cr = new CloseReason(CloseCodes.CLOSED_ABNORMALLY, ""); +((WsSession) wsSession).doClose(cr, cr, true); } diff --git a/test/org/apache/tomcat/websocket/TesterFirehoseServer.java b/test/org/apache/tomcat/websocket/TesterFirehoseServer.java index a903966c12..a09c4adac8 100644 --- a/test/org/apache/tomcat/websocket/TesterFirehoseServer.java +++ b/test/org/apache/tomcat/websocket/TesterFirehoseServer.java @@ -41,7 +41,7 @@ public class TesterFirehoseServer { public static final String MESSAGE; public static final int MESSAGE_SIZE = 1024; public static final int WAIT_TIME_MILLIS = 30; -public static final int SEND_TIME_OUT_MILLIS = 5000; +public static final int SEND_TIME_OUT_MILLIS = 2000; public static final String PATH = "/firehose"; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 9.0.x updated: Speed up test execution
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/9.0.x by this push: new 66e0ab5356 Speed up test execution 66e0ab5356 is described below commit 66e0ab53566e0812fe3ad6792a172b029cbd75a7 Author: Mark Thomas AuthorDate: Fri Jan 31 10:10:22 2025 + Speed up test execution Skip timeouts where they can be skipped and reduce them where they can't. --- .../apache/tomcat/websocket/TestWebSocketFrameClientSSL.java | 10 +- test/org/apache/tomcat/websocket/TesterFirehoseServer.java | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java b/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java index f1e89dfa6f..1378638b9b 100644 --- a/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java +++ b/test/org/apache/tomcat/websocket/TestWebSocketFrameClientSSL.java @@ -25,6 +25,8 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import javax.websocket.ClientEndpointConfig; +import javax.websocket.CloseReason; +import javax.websocket.CloseReason.CloseCodes; import javax.websocket.ContainerProvider; import javax.websocket.MessageHandler; import javax.websocket.Session; @@ -158,11 +160,9 @@ public class TestWebSocketFrameClientSSL extends WebSocketBaseTest { Assert.fail("There are [" + openConnectionCount + "] connections still open"); } -// Set a short session close timeout (milliseconds) -wsSession.getUserProperties().put( - org.apache.tomcat.websocket.Constants.SESSION_CLOSE_TIMEOUT_PROPERTY, Long.valueOf(2000)); -// Close the client session. -wsSession.close(); +// Cast so we can force the session to be closed quickly. +CloseReason cr = new CloseReason(CloseCodes.CLOSED_ABNORMALLY, ""); +((WsSession) wsSession).doClose(cr, cr, true); } @Override diff --git a/test/org/apache/tomcat/websocket/TesterFirehoseServer.java b/test/org/apache/tomcat/websocket/TesterFirehoseServer.java index f2b90d560e..f41dd5e48a 100644 --- a/test/org/apache/tomcat/websocket/TesterFirehoseServer.java +++ b/test/org/apache/tomcat/websocket/TesterFirehoseServer.java @@ -41,7 +41,7 @@ public class TesterFirehoseServer { public static final String MESSAGE; public static final int MESSAGE_SIZE = 1024; public static final int WAIT_TIME_MILLIS = 30; -public static final int SEND_TIME_OUT_MILLIS = 5000; +public static final int SEND_TIME_OUT_MILLIS = 2000; public static final String PATH = "/firehose"; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Buildbot failure in on tomcat-9.0.x
Build status: BUILD FAILED: failed compile (failure) Worker used: bb_worker2_ubuntu URL: https://ci2.apache.org/#builders/37/builds/1254 Blamelist: Mark Thomas Build Text: failed compile (failure) Status Detected: new failure Build Source Stamp: [branch 9.0.x] f5e25253092381245a6d162cf9fe131f056e74ed Steps: worker_preparation: 0 git: 0 shell: 0 shell_1: 0 shell_2: 0 shell_3: 0 shell_4: 0 shell_5: 0 compile: 2 -- ASF Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch main updated: EWmove copy of pre-refactoring tests
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/main by this push: new 65fd38d4d8 EWmove copy of pre-refactoring tests 65fd38d4d8 is described below commit 65fd38d4d82543288483fa2f603b7d6630d6bdaf Author: Mark Thomas AuthorDate: Fri Jan 31 17:04:12 2025 + EWmove copy of pre-refactoring tests --- .../TestHostConfigAutomaticDeploymentC8.java | 504 - 1 file changed, 504 deletions(-) diff --git a/test/org/apache/catalina/startup/TestHostConfigAutomaticDeploymentC8.java b/test/org/apache/catalina/startup/TestHostConfigAutomaticDeploymentC8.java deleted file mode 100644 index af3bd31074..00 --- a/test/org/apache/catalina/startup/TestHostConfigAutomaticDeploymentC8.java +++ /dev/null @@ -1,504 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.catalina.startup; - -import java.io.File; -import java.nio.file.Files; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.core.IsInstanceOf.instanceOf; - -import org.junit.Test; - -import org.apache.catalina.Context; -import org.apache.catalina.Host; -import org.apache.catalina.LifecycleState; -import org.apache.catalina.core.StandardHost; - -/** - * The purpose of this class is to test the automatic deployment features of the - * {@link HostConfig} implementation. - */ -public class TestHostConfigAutomaticDeploymentC8 extends HostConfigAutomaticDeploymentBaseTest { - -/* - * Expected behaviour for modification of files. - * - * Artifacts present Artifact Artifacts remaining - * XML WAR EXT DIRModifiedXML WAR EXT DIR Action - * NNNY DIR--- M None - * NYNN WAR-M- - Redeploy - * NYNY DIR-Y- M None - * NYNY WAR-M- R Redeploy - * YNNN XMLM-- - Redeploy - * YNNY DIRY-- M None - * YNNY XMLM-- Y Redeploy - * YNYN EXTY-M - Reload if WAR - * YNYN XMLM-Y - Redeploy - * YNYY DIRY-Y M None - * YNYY EXTY-M RReload - * YNYY XMLM-Y Y Redeploy - * YYNN WARYM- -Reload - * YYNN XMLMY- - Redeploy - * YYNY DIRYY- M None - * YYNY WARYM- -Reload - * YYNY XMLMY- Y Redeploy - */ -@Test -public void testModifyDirUpdateDir() throws Exception { -doTestModify(false, false, false, false, true, DIR, -false, false, true, DIR_COOKIE_NAME, NONE); -} - -@Test -public void testModifyWarUpdateWar() throws Exception { -doTestModify(false, false, false, true, false, WAR, -false, true, false, WAR_COOKIE_NAME, REDEPLOY); -} - -@Test -public void testModifyWarDirUpdateDir() throws Exception { -// DIR_COOKIE_NAME since Tomcat is going to assume DIR is expanded WAR -doTestModify(false, false, false, true, true, DIR, -false, true, true, DIR_COOKIE_NAME, NONE); -} - -@Test -public void testModifyWarDirUpdateWar() throws Exception { -doTestModify(false, false, false, true, true, WAR, -false, true, true, WAR_COOKIE_NAME, REDEPLOY); -} - -@Test -public void testModifyXmlUpdateXml() throws Exception { -doTestModify(true, false, false, false, false, XML, -true, false, false, XML_COOKIE_NAME, REDEPLOY, -LifecycleState.FAILED); -} - -@Test -public void testModifyXmlDirUpdateDir() throws Exception { -
(tomcat) branch 10.1.x updated: Fix back port
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/10.1.x by this push: new d3590fcb3c Fix back port d3590fcb3c is described below commit d3590fcb3caea891fa859f8e90f9b48f61e000b9 Author: Mark Thomas AuthorDate: Fri Jan 31 14:29:17 2025 + Fix back port --- java/org/apache/catalina/core/ApplicationHttpRequest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/org/apache/catalina/core/ApplicationHttpRequest.java b/java/org/apache/catalina/core/ApplicationHttpRequest.java index af3eea1fb4..fdc1dcc73f 100644 --- a/java/org/apache/catalina/core/ApplicationHttpRequest.java +++ b/java/org/apache/catalina/core/ApplicationHttpRequest.java @@ -733,7 +733,7 @@ class ApplicationHttpRequest extends HttpServletRequestWrapper { } Map requestParameters = getRequest().getParameterMap(); -if (requestParameters instanceof ParameterMap) { +if (requestParameters instanceof ParameterMap) { parameters = new ParameterMap<>((ParameterMap) requestParameters); } else { parameters = new ParameterMap<>(requestParameters); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Buildbot success in on tomcat-9.0.x
Build status: Build succeeded! Worker used: bb_worker2_ubuntu URL: https://ci2.apache.org/#builders/37/builds/1255 Blamelist: Mark Thomas Build Text: build successful Status Detected: restored build Build Source Stamp: [branch 9.0.x] 9923648cd4dcbf5e120a1a55db6dd788d03fcff8 Steps: worker_preparation: 0 git: 0 shell: 0 shell_1: 0 shell_2: 0 shell_3: 0 shell_4: 0 shell_5: 0 compile: 1 shell_6: 0 shell_7: 0 shell_8: 0 shell_9: 0 Rsync docs to nightlies.apache.org: 0 shell_10: 0 Rsync RAT to nightlies.apache.org: 0 compile_1: 1 shell_11: 0 Rsync Logs to nightlies.apache.org: 0 -- ASF Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 69285] Performance improvement to ApplicationHttpRequest.parseParameters()
https://bz.apache.org/bugzilla/show_bug.cgi?id=69285 Mark Thomas changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution|--- |FIXED --- Comment #6 from Mark Thomas --- I've add the cast and the type check in case the request has been wrapped. Fixed in: - 11.0.x for 11.0.3 onwards - 10.1.x for 10.1.35 onwards - 9.0.x for 9.0.99 onwards -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Buildbot failure in on tomcat-10.1.x
Build status: BUILD FAILED: failed compile (failure) Worker used: bb_worker2_ubuntu URL: https://ci2.apache.org/#builders/44/builds/1594 Blamelist: Mark Thomas Build Text: failed compile (failure) Status Detected: new failure Build Source Stamp: [branch 10.1.x] 59a2ce23f5ee0d3aba078e6ee234fab1f2ce9331 Steps: worker_preparation: 0 git: 0 shell: 0 shell_1: 0 shell_2: 0 shell_3: 0 shell_4: 0 shell_5: 0 compile: 2 -- ASF Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 11.0.x updated: Complete fix for BZ 69285. Optimize creation of ParameterMap
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 11.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/11.0.x by this push: new 43479bea7d Complete fix for BZ 69285. Optimize creation of ParameterMap 43479bea7d is described below commit 43479bea7de29cbb27901041c45b608a1b3107ac Author: Mark Thomas AuthorDate: Fri Jan 31 11:56:13 2025 + Complete fix for BZ 69285. Optimize creation of ParameterMap Based on sample code and test cases provided by John Engebretson --- java/org/apache/catalina/core/ApplicationHttpRequest.java | 7 ++- webapps/docs/changelog.xml| 5 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/java/org/apache/catalina/core/ApplicationHttpRequest.java b/java/org/apache/catalina/core/ApplicationHttpRequest.java index d7ba8ea25a..ce3baffd17 100644 --- a/java/org/apache/catalina/core/ApplicationHttpRequest.java +++ b/java/org/apache/catalina/core/ApplicationHttpRequest.java @@ -735,7 +735,12 @@ class ApplicationHttpRequest extends HttpServletRequestWrapper { return; } -parameters = new ParameterMap<>(getRequest().getParameterMap()); +Map requestParameters = getRequest().getParameterMap(); +if (requestParameters instanceof ParameterMap) { +parameters = new ParameterMap<>((ParameterMap) requestParameters); +} else { +parameters = new ParameterMap<>(requestParameters); +} mergeParameters(); ((ParameterMap) parameters).setLocked(true); parsedParams = true; diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index e85b823ce4..54a5d08bad 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -123,6 +123,11 @@ attribute value will also be used by the default and WebDAV Servlets. (remm) + +69285: Optimise the creation of the parameter map for +included requests. Based on sample code and test cases provided by John +Engebretson. (markt) + 69527: Avoid rare cases where a cached resource could be set with 0 content length, or could be evicted immediately. (remm) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 9.0.x updated: Complete fix for BZ 69285. Optimize creation of ParameterMap
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/9.0.x by this push: new f5e2525309 Complete fix for BZ 69285. Optimize creation of ParameterMap f5e2525309 is described below commit f5e25253092381245a6d162cf9fe131f056e74ed Author: Mark Thomas AuthorDate: Fri Jan 31 11:56:13 2025 + Complete fix for BZ 69285. Optimize creation of ParameterMap Based on sample code and test cases provided by John Engebretson --- java/org/apache/catalina/core/ApplicationHttpRequest.java | 7 ++- webapps/docs/changelog.xml| 5 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/java/org/apache/catalina/core/ApplicationHttpRequest.java b/java/org/apache/catalina/core/ApplicationHttpRequest.java index a176e6db7b..e78495e709 100644 --- a/java/org/apache/catalina/core/ApplicationHttpRequest.java +++ b/java/org/apache/catalina/core/ApplicationHttpRequest.java @@ -732,7 +732,12 @@ class ApplicationHttpRequest extends HttpServletRequestWrapper { return; } -parameters = new ParameterMap<>(getRequest().getParameterMap()); +Map requestParameters = getRequest().getParameterMap(); +if (requestParameters instanceof ParameterMap) { +parameters = new ParameterMap<>((ParameterMap) requestParameters); +} else { +parameters = new ParameterMap<>(requestParameters); +} mergeParameters(); ((ParameterMap) parameters).setLocked(true); parsedParams = true; diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 2be174ee59..3e98154f19 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -123,6 +123,11 @@ attribute value will also be used by the default and WebDAV Servlets. (remm) + +69285: Optimise the creation of the parameter map for +included requests. Based on sample code and test cases provided by John +Engebretson. (markt) + 69527: Avoid rare cases where a cached resource could be set with 0 content length, or could be evicted immediately. (remm) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 10.1.x updated: Complete fix for BZ 69285. Optimize creation of ParameterMap
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/10.1.x by this push: new 59a2ce23f5 Complete fix for BZ 69285. Optimize creation of ParameterMap 59a2ce23f5 is described below commit 59a2ce23f5ee0d3aba078e6ee234fab1f2ce9331 Author: Mark Thomas AuthorDate: Fri Jan 31 11:56:13 2025 + Complete fix for BZ 69285. Optimize creation of ParameterMap Based on sample code and test cases provided by John Engebretson --- java/org/apache/catalina/core/ApplicationHttpRequest.java | 7 ++- webapps/docs/changelog.xml| 5 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/java/org/apache/catalina/core/ApplicationHttpRequest.java b/java/org/apache/catalina/core/ApplicationHttpRequest.java index 50f594d6b8..af3eea1fb4 100644 --- a/java/org/apache/catalina/core/ApplicationHttpRequest.java +++ b/java/org/apache/catalina/core/ApplicationHttpRequest.java @@ -732,7 +732,12 @@ class ApplicationHttpRequest extends HttpServletRequestWrapper { return; } -parameters = new ParameterMap<>(getRequest().getParameterMap()); +Map requestParameters = getRequest().getParameterMap(); +if (requestParameters instanceof ParameterMap) { +parameters = new ParameterMap<>((ParameterMap) requestParameters); +} else { +parameters = new ParameterMap<>(requestParameters); +} mergeParameters(); ((ParameterMap) parameters).setLocked(true); parsedParams = true; diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index f9e571896b..caadc5721c 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -123,6 +123,11 @@ attribute value will also be used by the default and WebDAV Servlets. (remm) + +69285: Optimise the creation of the parameter map for +included requests. Based on sample code and test cases provided by John +Engebretson. (markt) + 69527: Avoid rare cases where a cached resource could be set with 0 content length, or could be evicted immediately. (remm) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch main updated: Complete fix for BZ 69285. Optimize creation of ParameterMap
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/main by this push: new 78e363931c Complete fix for BZ 69285. Optimize creation of ParameterMap 78e363931c is described below commit 78e363931c2629882aa48c8a1c6ccb15fe37a28c Author: Mark Thomas AuthorDate: Fri Jan 31 11:56:13 2025 + Complete fix for BZ 69285. Optimize creation of ParameterMap Based on sample code and test cases provided by John Engebretson --- java/org/apache/catalina/core/ApplicationHttpRequest.java | 7 ++- webapps/docs/changelog.xml| 5 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/java/org/apache/catalina/core/ApplicationHttpRequest.java b/java/org/apache/catalina/core/ApplicationHttpRequest.java index d7ba8ea25a..ce3baffd17 100644 --- a/java/org/apache/catalina/core/ApplicationHttpRequest.java +++ b/java/org/apache/catalina/core/ApplicationHttpRequest.java @@ -735,7 +735,12 @@ class ApplicationHttpRequest extends HttpServletRequestWrapper { return; } -parameters = new ParameterMap<>(getRequest().getParameterMap()); +Map requestParameters = getRequest().getParameterMap(); +if (requestParameters instanceof ParameterMap) { +parameters = new ParameterMap<>((ParameterMap) requestParameters); +} else { +parameters = new ParameterMap<>(requestParameters); +} mergeParameters(); ((ParameterMap) parameters).setLocked(true); parsedParams = true; diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 797d83a558..9379414eaf 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -160,6 +160,11 @@ attribute value will also be used by the default and WebDAV Servlets. (remm) + +69285: Optimise the creation of the parameter map for +included requests. Based on sample code and test cases provided by John +Engebretson. (markt) + 69527: Avoid rare cases where a cached resource could be set with 0 content length, or could be evicted immediately. (remm) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Tomcat 9 extended support
On Thu, Jan 30, 2025 at 5:52 PM Mark Thomas wrote: > > All, > > We have discussed plans for extended Tomcat 9 support several times. It > is still probably a couple of years away but I thought it would be worth > starting the discussion again. > > There are a wide range of options. This is a brain dump of the questions > I have been mulling over when considering options. > > 1. Extended support requires back-porting of security fixes. What else > do we want to back-port. Bug fixes? New features? I would keep the current backport policy, so backport most. > 2. Do we want to continue to support the APR connector? If we decide no, > we can also stop supporting Tomcat Native 1.x. Equally, if we keep APR > we'll need to keep making Native 1.x releases to pick up OpenSSL updates. Keeping it is certainly a high cost ... > 3. What minimum version of Java do we want to support? Stick with Java > 8? Increase the minimum version in line with availability of free > supported JREs (e.g. from Temurin)? Something else? I would stick with Java 8 rather than ever try bumping. Bumping Java could be very hard for apps and their libraries. Realistically we would have to move to 21 minimum all of a sudden, so this would hurt a lot. Java 8 remains supported until the end of 2026 (and 2030 for extended support versions). It would therefore seem ok to me to keep in mind those dates for the Tomcat 9.0 support. I volunteer to keep on RMing Tomcat 9.0 :D (and make the releases as long as I have enough votes obviously) > 4. Do we cancel plans for extended Tomcat 9 support? (I'm not a fan of > this.) I would say no. > 5. Do we effectively just continue with 9.0.x or create 9.?.x? I would continue with 9.0 for now (see below). > 6. Do we continue from 9.0.x or do we start from 10.1.x and revert the > Jakarta EE API changes? I would not do that, there's still not much benefit to it. > I suspect the folks that want extended 9.0.x support also want minimal > changes. If we do plan on changing things (minimum Java version, > dropping APR) we should provide plenty of notice. Right now I would say upgrading Java is a bad move, we might as well EOL Tomcat 9.0. As a compromise to maintainability, there's a rationale for dropping THE problematic feature (the APR connector and tomcat-native 1.x). That would justify doing a 9.1 without any other changes, which would be that "extended support version". > When do we think extended support will start? My best guess is no > earlier than 31 March 2027. It could start when Java 8 is EOL in Temurin (Red Hat has the same date too), so end of 2026 ? Rémy > Thoughts? > > Mark > > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 69559] WARNING: sun.misc.Unsafe::invokeCleaner has been called by org.apache.tomcat.util.buf.ByteBufferUtils
https://bz.apache.org/bugzilla/show_bug.cgi?id=69559 Remy Maucherat changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |WONTFIX OS||All --- Comment #1 from Remy Maucherat --- This is a Java 24 feature. You should try to move away from using any direct ByteBuffer (since garbage collecting them is impossible without Unsafe), which means: - Avoid using the direct buffers options from the Tomcat Connector (this is not the default configuration). - Do not use tomcat-native for OpenSSL on Java 24, use Java FFM instead (remove the tomcat-native library). -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Buildbot failure in on tomcat-12.0.x
Build status: BUILD FAILED: failed compile (failure) Worker used: bb_worker2_ubuntu URL: https://ci2.apache.org/#builders/120/builds/352 Blamelist: Mark Thomas Build Text: failed compile (failure) Status Detected: new failure Build Source Stamp: [branch main] 65fd38d4d82543288483fa2f603b7d6630d6bdaf Steps: worker_preparation: 0 git: 0 shell: 0 shell_1: 0 shell_2: 0 shell_3: 0 shell_4: 0 shell_5: 0 shell_6: 0 compile: 1 shell_7: 0 shell_8: 0 shell_9: 0 shell_10: 0 Rsync docs to nightlies.apache.org: 0 shell_11: 0 Rsync RAT to nightlies.apache.org: 0 compile_1: 2 shell_12: 0 Rsync Logs to nightlies.apache.org: 0 -- ASF Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 69545] Issue Posting a huge content with header transfer-encoding chunked not working from 10.1.29 version of tomcat in spring cloud gateway application using reactive webflux
https://bz.apache.org/bugzilla/show_bug.cgi?id=69545 Mark Thomas changed: What|Removed |Added Resolution|--- |FIXED Status|NEEDINFO|RESOLVED --- Comment #14 from Mark Thomas --- Further testing did find an issue and the root cause is understood. Rémy has applied a fix for this issue that should also address any similar issues. Fixed in: - 11.0.x for 11.0.3 onwards - 10.1.x for 10.1.35 onwards - 9.0.x for 9.0.99 onwards -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) 01/02: Refactor into shorter tests
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git commit 5af03ad88be6cea4a26f7ef25bd3f0d0dfca0e5f Author: Mark Thomas AuthorDate: Fri Jan 31 14:27:40 2025 + Refactor into shorter tests --- ...HttpServletDoHeadInvalidWrite0ValidWrite0.java} | 14 +++--- ...HttpServletDoHeadInvalidWrite0ValidWrite1.java} | 14 +++--- ...pServletDoHeadInvalidWrite0ValidWrite1023.java} | 14 +++--- ...pServletDoHeadInvalidWrite0ValidWrite1024.java} | 14 +++--- ...pServletDoHeadInvalidWrite0ValidWrite1025.java} | 14 +++--- ...tpServletDoHeadInvalidWrite0ValidWrite511.java} | 14 +++--- ...tpServletDoHeadInvalidWrite0ValidWrite512.java} | 14 +++--- ...tpServletDoHeadInvalidWrite0ValidWrite513.java} | 14 +++--- ...pServletDoHeadInvalidWrite1023ValidWrite0.java} | 14 +++--- ...pServletDoHeadInvalidWrite1023ValidWrite1.java} | 14 +++--- ...rvletDoHeadInvalidWrite1023ValidWrite1023.java} | 14 +++--- ...rvletDoHeadInvalidWrite1023ValidWrite1024.java} | 14 +++--- ...rvletDoHeadInvalidWrite1023ValidWrite1025.java} | 14 +++--- ...ervletDoHeadInvalidWrite1023ValidWrite511.java} | 14 +++--- ...ervletDoHeadInvalidWrite1023ValidWrite512.java} | 14 +++--- ...ervletDoHeadInvalidWrite1023ValidWrite513.java} | 14 +++--- ...pServletDoHeadInvalidWrite1024ValidWrite0.java} | 14 +++--- ...pServletDoHeadInvalidWrite1024ValidWrite1.java} | 14 +++--- ...rvletDoHeadInvalidWrite1024ValidWrite1023.java} | 14 +++--- ...rvletDoHeadInvalidWrite1024ValidWrite1024.java} | 14 +++--- ...rvletDoHeadInvalidWrite1024ValidWrite1025.java} | 14 +++--- ...ervletDoHeadInvalidWrite1024ValidWrite511.java} | 14 +++--- ...ervletDoHeadInvalidWrite1024ValidWrite512.java} | 14 +++--- ...ervletDoHeadInvalidWrite1024ValidWrite513.java} | 14 +++--- ...pServletDoHeadInvalidWrite1025ValidWrite0.java} | 14 +++--- ...pServletDoHeadInvalidWrite1025ValidWrite1.java} | 14 +++--- ...rvletDoHeadInvalidWrite1025ValidWrite1023.java} | 14 +++--- ...rvletDoHeadInvalidWrite1025ValidWrite1024.java} | 14 +++--- ...rvletDoHeadInvalidWrite1025ValidWrite1025.java} | 14 +++--- ...ervletDoHeadInvalidWrite1025ValidWrite511.java} | 14 +++--- ...ervletDoHeadInvalidWrite1025ValidWrite512.java} | 14 +++--- ...ervletDoHeadInvalidWrite1025ValidWrite513.java} | 14 +++--- ...HttpServletDoHeadInvalidWrite1ValidWrite0.java} | 14 +++--- ...HttpServletDoHeadInvalidWrite1ValidWrite1.java} | 14 +++--- ...pServletDoHeadInvalidWrite1ValidWrite1023.java} | 14 +++--- ...pServletDoHeadInvalidWrite1ValidWrite1024.java} | 14 +++--- ...pServletDoHeadInvalidWrite1ValidWrite1025.java} | 14 +++--- ...tpServletDoHeadInvalidWrite1ValidWrite511.java} | 14 +++--- ...tpServletDoHeadInvalidWrite1ValidWrite512.java} | 14 +++--- ...tpServletDoHeadInvalidWrite1ValidWrite513.java} | 14 +++--- ...tpServletDoHeadInvalidWrite511ValidWrite0.java} | 14 +++--- ...tpServletDoHeadInvalidWrite511ValidWrite1.java} | 14 +++--- ...ervletDoHeadInvalidWrite511ValidWrite1023.java} | 14 +++--- ...ervletDoHeadInvalidWrite511ValidWrite1024.java} | 14 +++--- ...ervletDoHeadInvalidWrite511ValidWrite1025.java} | 14 +++--- ...ServletDoHeadInvalidWrite511ValidWrite511.java} | 14 +++--- ...ServletDoHeadInvalidWrite511ValidWrite512.java} | 14 +++--- ...ServletDoHeadInvalidWrite511ValidWrite513.java} | 14 +++--- ...tpServletDoHeadInvalidWrite512ValidWrite0.java} | 14 +++--- ...tpServletDoHeadInvalidWrite512ValidWrite1.java} | 14 +++--- ...ervletDoHeadInvalidWrite512ValidWrite1023.java} | 14 +++--- ...ervletDoHeadInvalidWrite512ValidWrite1024.java} | 14 +++--- ...ervletDoHeadInvalidWrite512ValidWrite1025.java} | 14 +++--- ...ServletDoHeadInvalidWrite512ValidWrite511.java} | 14 +++--- ...ServletDoHeadInvalidWrite512ValidWrite512.java} | 14 +++--- ...ServletDoHeadInvalidWrite512ValidWrite513.java} | 14 +++--- ...tpServletDoHeadInvalidWrite513ValidWrite0.java} | 14 +++--- ...tpServletDoHeadInvalidWrite513ValidWrite1.java} | 14 +++--- ...ervletDoHeadInvalidWrite513ValidWrite1023.java} | 14 +++--- ...ervletDoHeadInvalidWrite513ValidWrite1024.java} | 14 +++--- ...ervletDoHeadInvalidWrite513ValidWrite1025.java} | 14 +++--- ...ServletDoHeadInvalidWrite513ValidWrite511.java} | 14 +++--- ...ServletDoHeadInvalidWrite513ValidWrite512.java} | 14 +++--- ...ServletDoHeadInvalidWrite513ValidWrite513.java} | 14 +++--- .../http/TestHttpServletDoHeadValidWrite1023.java | 55 -- .../http/TestHttpServletDoHeadValidWrite1024.java | 55 -- .../http/TestHttpServletDoHeadValidWrite1025.java | 55 -- .../http/TestHttpServletDoHeadValidWrite513.java | 55 -- 68 files changed, 384 insertions(+), 732 deletions(-) diff --git a/test/javax/servlet/http/TestHttpServletDoHeadValidWrite0.java b/test/javax/servlet/http/TestHttpServletDoHeadInvalidWrite0ValidWrite0.java similarity index 76% copy from test/javax/servlet/http/T
(tomcat) branch 9.0.x updated (f5e2525309 -> af270321d7)
This is an automated email from the ASF dual-hosted git repository. markt pushed a change to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git from f5e2525309 Complete fix for BZ 69285. Optimize creation of ParameterMap new 5af03ad88b Refactor into shorter tests new af270321d7 Fix back port The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../catalina/core/ApplicationHttpRequest.java | 2 +- ...HttpServletDoHeadInvalidWrite0ValidWrite0.java} | 14 +++--- ...HttpServletDoHeadInvalidWrite0ValidWrite1.java} | 14 +++--- ...pServletDoHeadInvalidWrite0ValidWrite1023.java} | 14 +++--- ...pServletDoHeadInvalidWrite0ValidWrite1024.java} | 14 +++--- ...pServletDoHeadInvalidWrite0ValidWrite1025.java} | 14 +++--- ...tpServletDoHeadInvalidWrite0ValidWrite511.java} | 14 +++--- ...tpServletDoHeadInvalidWrite0ValidWrite512.java} | 14 +++--- ...tpServletDoHeadInvalidWrite0ValidWrite513.java} | 14 +++--- ...pServletDoHeadInvalidWrite1023ValidWrite0.java} | 14 +++--- ...pServletDoHeadInvalidWrite1023ValidWrite1.java} | 14 +++--- ...rvletDoHeadInvalidWrite1023ValidWrite1023.java} | 14 +++--- ...rvletDoHeadInvalidWrite1023ValidWrite1024.java} | 14 +++--- ...rvletDoHeadInvalidWrite1023ValidWrite1025.java} | 14 +++--- ...ervletDoHeadInvalidWrite1023ValidWrite511.java} | 14 +++--- ...ervletDoHeadInvalidWrite1023ValidWrite512.java} | 14 +++--- ...ervletDoHeadInvalidWrite1023ValidWrite513.java} | 14 +++--- ...pServletDoHeadInvalidWrite1024ValidWrite0.java} | 14 +++--- ...pServletDoHeadInvalidWrite1024ValidWrite1.java} | 14 +++--- ...rvletDoHeadInvalidWrite1024ValidWrite1023.java} | 14 +++--- ...rvletDoHeadInvalidWrite1024ValidWrite1024.java} | 14 +++--- ...rvletDoHeadInvalidWrite1024ValidWrite1025.java} | 14 +++--- ...ervletDoHeadInvalidWrite1024ValidWrite511.java} | 14 +++--- ...ervletDoHeadInvalidWrite1024ValidWrite512.java} | 14 +++--- ...ervletDoHeadInvalidWrite1024ValidWrite513.java} | 14 +++--- ...pServletDoHeadInvalidWrite1025ValidWrite0.java} | 14 +++--- ...pServletDoHeadInvalidWrite1025ValidWrite1.java} | 14 +++--- ...rvletDoHeadInvalidWrite1025ValidWrite1023.java} | 14 +++--- ...rvletDoHeadInvalidWrite1025ValidWrite1024.java} | 14 +++--- ...rvletDoHeadInvalidWrite1025ValidWrite1025.java} | 14 +++--- ...ervletDoHeadInvalidWrite1025ValidWrite511.java} | 14 +++--- ...ervletDoHeadInvalidWrite1025ValidWrite512.java} | 14 +++--- ...ervletDoHeadInvalidWrite1025ValidWrite513.java} | 14 +++--- ...HttpServletDoHeadInvalidWrite1ValidWrite0.java} | 14 +++--- ...HttpServletDoHeadInvalidWrite1ValidWrite1.java} | 14 +++--- ...pServletDoHeadInvalidWrite1ValidWrite1023.java} | 14 +++--- ...pServletDoHeadInvalidWrite1ValidWrite1024.java} | 14 +++--- ...pServletDoHeadInvalidWrite1ValidWrite1025.java} | 14 +++--- ...tpServletDoHeadInvalidWrite1ValidWrite511.java} | 14 +++--- ...tpServletDoHeadInvalidWrite1ValidWrite512.java} | 14 +++--- ...tpServletDoHeadInvalidWrite1ValidWrite513.java} | 14 +++--- ...tpServletDoHeadInvalidWrite511ValidWrite0.java} | 14 +++--- ...tpServletDoHeadInvalidWrite511ValidWrite1.java} | 14 +++--- ...ervletDoHeadInvalidWrite511ValidWrite1023.java} | 14 +++--- ...ervletDoHeadInvalidWrite511ValidWrite1024.java} | 14 +++--- ...ervletDoHeadInvalidWrite511ValidWrite1025.java} | 14 +++--- ...ServletDoHeadInvalidWrite511ValidWrite511.java} | 14 +++--- ...ServletDoHeadInvalidWrite511ValidWrite512.java} | 14 +++--- ...ServletDoHeadInvalidWrite511ValidWrite513.java} | 14 +++--- ...tpServletDoHeadInvalidWrite512ValidWrite0.java} | 14 +++--- ...tpServletDoHeadInvalidWrite512ValidWrite1.java} | 14 +++--- ...ervletDoHeadInvalidWrite512ValidWrite1023.java} | 14 +++--- ...ervletDoHeadInvalidWrite512ValidWrite1024.java} | 14 +++--- ...ervletDoHeadInvalidWrite512ValidWrite1025.java} | 14 +++--- ...ServletDoHeadInvalidWrite512ValidWrite511.java} | 14 +++--- ...ServletDoHeadInvalidWrite512ValidWrite512.java} | 14 +++--- ...ServletDoHeadInvalidWrite512ValidWrite513.java} | 14 +++--- ...tpServletDoHeadInvalidWrite513ValidWrite0.java} | 14 +++--- ...tpServletDoHeadInvalidWrite513ValidWrite1.java} | 14 +++--- ...ervletDoHeadInvalidWrite513ValidWrite1023.java} | 14 +++--- ...ervletDoHeadInvalidWrite513ValidWrite1024.java} | 14 +++--- ...ervletDoHeadInvalidWrite513ValidWrite1025.java} | 14 +++--- ...ServletDoHeadInvalidWrite513ValidWrite511.java} | 14 +++--- ...ServletDoHeadInvalidWrite513ValidWrite512.java} | 14 +++--- ...ServletDoHeadInvalidWrite513ValidWrite513.java} | 14 +++--- .../http/TestHttpServletDoHeadValidWrite1023.java | 55 -- .../http/TestHttpServletDoHeadValidWrite1024.java | 55 -- .../http/TestHttpServletDoHeadValidWrite1025.java | 55 -- .../http/TestHtt
(tomcat) 02/02: Fix back port
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git commit af270321d7e48dadcab02be17795fc494a8145eb Author: Mark Thomas AuthorDate: Fri Jan 31 15:04:26 2025 + Fix back port --- java/org/apache/catalina/core/ApplicationHttpRequest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/org/apache/catalina/core/ApplicationHttpRequest.java b/java/org/apache/catalina/core/ApplicationHttpRequest.java index e78495e709..048a9309e6 100644 --- a/java/org/apache/catalina/core/ApplicationHttpRequest.java +++ b/java/org/apache/catalina/core/ApplicationHttpRequest.java @@ -733,7 +733,7 @@ class ApplicationHttpRequest extends HttpServletRequestWrapper { } Map requestParameters = getRequest().getParameterMap(); -if (requestParameters instanceof ParameterMap) { +if (requestParameters instanceof ParameterMap) { parameters = new ParameterMap<>((ParameterMap) requestParameters); } else { parameters = new ParameterMap<>(requestParameters); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Tomcat 9 extended support
Am 31.01.25 um 14:49 schrieb Rémy Maucherat: On Thu, Jan 30, 2025 at 5:52 PM Mark Thomas wrote: All, We have discussed plans for extended Tomcat 9 support several times. It is still probably a couple of years away but I thought it would be worth starting the discussion again. There are a wide range of options. This is a brain dump of the questions I have been mulling over when considering options. 1. Extended support requires back-porting of security fixes. What else do we want to back-port. Bug fixes? New features? I would keep the current backport policy, so backport most. I agree with Rémy. There might come bigger changes, which we do not even backport to 10.1, but it might be better to discuss, once we know what type of feature this would be. Then we can see, whether the old plan of having a 9.x.y with x != 0 makes sense. 2. Do we want to continue to support the APR connector? If we decide no, we can also stop supporting Tomcat Native 1.x. Equally, if we keep APR we'll need to keep making Native 1.x releases to pick up OpenSSL updates. Keeping it is certainly a high cost ... Not sure either. Normally we don't throw out a feature during an version lifecycle and we announce deprecation far in advance. So kicking APR might mean deprecation, announcing EOL for APR and probably 9.0 with a date in the future and switching from 9.0 to 9.1 (or whatever) without APR then. 3. What minimum version of Java do we want to support? Stick with Java 8? Increase the minimum version in line with availability of free supported JREs (e.g. from Temurin)? Something else? I would stick with Java 8 rather than ever try bumping. Bumping Java could be very hard for apps and their libraries. Realistically we would have to move to 21 minimum all of a sudden, so this would hurt a lot. Java 8 remains supported until the end of 2026 (and 2030 for extended support versions). It would therefore seem ok to me to keep in mind those dates for the Tomcat 9.0 support. I volunteer to keep on RMing Tomcat 9.0 :D (and make the releases as long as I have enough votes obviously) I agree with 8. Although most vendors stop free releases of OpenJDK 8 october/november 2026, Amazon announced Corretto until 2030: https://aws.amazon.com/de/corretto/faqs/ and the commercial offerings provide paid support until 2030. Even Adoptium has not yet release a final date, just an "at least". It might make sense to review this decision around mid 2026. And it might have a dependency on APR deprecation and branching 9.1 or similar. All in all I think Java 8 support still has a big value out in the field, exactly for the legacy apps that no-one ports from javax to jakarta. So if the burden is not to high on the project it would be quite nice to support it. 4. Do we cancel plans for extended Tomcat 9 support? (I'm not a fan of this.) I would say no. Agreed. 5. Do we effectively just continue with 9.0.x or create 9.?.x? I would continue with 9.0 for now (see below). Agreed. 6. Do we continue from 9.0.x or do we start from 10.1.x and revert the Jakarta EE API changes? I would not do that, there's still not much benefit to it. Agreed. I suspect the folks that want extended 9.0.x support also want minimal changes. If we do plan on changing things (minimum Java version, dropping APR) we should provide plenty of notice. Right now I would say upgrading Java is a bad move, we might as well EOL Tomcat 9.0. As a compromise to maintainability, there's a rationale for dropping THE problematic feature (the APR connector and tomcat-native 1.x). That would justify doing a 9.1 without any other changes, which would be that "extended support version". ... and would need some advance publication of the plan. When do we think extended support will start? My best guess is no earlier than 31 March 2027. It could start when Java 8 is EOL in Temurin (Red Hat has the same date too), so end of 2026 ? See above, there might be free Java 8 support even longer (Coretto, maybe even Temurin). I'm not sure, what we mean be "extended" support. Just keeping it supported - then there would be no start date - or some kind of reduced support (eg. only security) or what? Best regards, Rainer - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [PR] certificate regression [tomcat]
Dmole commented on PR #815: URL: https://github.com/apache/tomcat/pull/815#issuecomment-2627508924 So can we add a warning to current versions that all Certificate tags require an empty certificateKeystorePassword attribute (even when no Keystore is in use) in order to prevent future breakage? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 69545] Issue Posting a huge content with header transfer-encoding chunked not working from 10.1.29 version of tomcat in spring cloud gateway application using reactive webflux
https://bz.apache.org/bugzilla/show_bug.cgi?id=69545 --- Comment #15 from Aravinda --- Thats great news!!! Thank you very much Mark Thomas and Remy Maucherat! Do you have any tentative date for the 10.1.35 release? -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch main updated: Use constants. Update comments.
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/main by this push: new 5114a28b59 Use constants. Update comments. 5114a28b59 is described below commit 5114a28b59747851c3cfce645735eda1c91733ac Author: Mark Thomas AuthorDate: Fri Jan 31 15:27:19 2025 + Use constants. Update comments. --- test/org/apache/catalina/util/TestParameterMapPerformance.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/org/apache/catalina/util/TestParameterMapPerformance.java b/test/org/apache/catalina/util/TestParameterMapPerformance.java index fe2ea9bf79..a89341a1a5 100644 --- a/test/org/apache/catalina/util/TestParameterMapPerformance.java +++ b/test/org/apache/catalina/util/TestParameterMapPerformance.java @@ -62,10 +62,10 @@ public class TestParameterMapPerformance { System.out.println("Done with standard in " + duration + "ms"); } /* - * The CI systems tend to produce outliers that lead to false failures so skip the longest two runs. + * The CI systems tend to produce outliers that lead to false failures so skip the longest NUM_SKIP runs. */ long standardTotalDuration = -standardDurations.stream().sorted().limit(NUM_TESTS - 2).reduce(Long::sum).get().longValue(); +standardDurations.stream().sorted().limit(NUM_TESTS - NUM_SKIP).reduce(Long::sum).get().longValue(); List optimizedDurations = new ArrayList<>(); for (int i = 0; i < NUM_TESTS; i++) { @@ -79,7 +79,7 @@ public class TestParameterMapPerformance { System.out.println("Done with optimized in " + duration + "ms"); } /* - * The CI systems tend to produce outliers that lead to false failures so skip the longest two runs. + * The CI systems tend to produce outliers that lead to false failures so skip the longest NUM_SKIP runs. */ long optimizedTotalDuration = optimizedDurations.stream().sorted().limit(NUM_TESTS - NUM_SKIP).reduce(Long::sum).get().longValue(); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 9.0.x updated: Use constants. Update comments.
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/9.0.x by this push: new ed39e0a422 Use constants. Update comments. ed39e0a422 is described below commit ed39e0a4226adfc850370d8bd5a3e0ce9e5af877 Author: Mark Thomas AuthorDate: Fri Jan 31 15:27:19 2025 + Use constants. Update comments. --- test/org/apache/catalina/util/TestParameterMapPerformance.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/org/apache/catalina/util/TestParameterMapPerformance.java b/test/org/apache/catalina/util/TestParameterMapPerformance.java index fe2ea9bf79..a89341a1a5 100644 --- a/test/org/apache/catalina/util/TestParameterMapPerformance.java +++ b/test/org/apache/catalina/util/TestParameterMapPerformance.java @@ -62,10 +62,10 @@ public class TestParameterMapPerformance { System.out.println("Done with standard in " + duration + "ms"); } /* - * The CI systems tend to produce outliers that lead to false failures so skip the longest two runs. + * The CI systems tend to produce outliers that lead to false failures so skip the longest NUM_SKIP runs. */ long standardTotalDuration = -standardDurations.stream().sorted().limit(NUM_TESTS - 2).reduce(Long::sum).get().longValue(); +standardDurations.stream().sorted().limit(NUM_TESTS - NUM_SKIP).reduce(Long::sum).get().longValue(); List optimizedDurations = new ArrayList<>(); for (int i = 0; i < NUM_TESTS; i++) { @@ -79,7 +79,7 @@ public class TestParameterMapPerformance { System.out.println("Done with optimized in " + duration + "ms"); } /* - * The CI systems tend to produce outliers that lead to false failures so skip the longest two runs. + * The CI systems tend to produce outliers that lead to false failures so skip the longest NUM_SKIP runs. */ long optimizedTotalDuration = optimizedDurations.stream().sorted().limit(NUM_TESTS - NUM_SKIP).reduce(Long::sum).get().longValue(); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 11.0.x updated: Use constants. Update comments.
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 11.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/11.0.x by this push: new 9a6e029c98 Use constants. Update comments. 9a6e029c98 is described below commit 9a6e029c98b61731d280c3eb68f8cbf3e374dc6b Author: Mark Thomas AuthorDate: Fri Jan 31 15:27:19 2025 + Use constants. Update comments. --- test/org/apache/catalina/util/TestParameterMapPerformance.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/org/apache/catalina/util/TestParameterMapPerformance.java b/test/org/apache/catalina/util/TestParameterMapPerformance.java index fe2ea9bf79..a89341a1a5 100644 --- a/test/org/apache/catalina/util/TestParameterMapPerformance.java +++ b/test/org/apache/catalina/util/TestParameterMapPerformance.java @@ -62,10 +62,10 @@ public class TestParameterMapPerformance { System.out.println("Done with standard in " + duration + "ms"); } /* - * The CI systems tend to produce outliers that lead to false failures so skip the longest two runs. + * The CI systems tend to produce outliers that lead to false failures so skip the longest NUM_SKIP runs. */ long standardTotalDuration = -standardDurations.stream().sorted().limit(NUM_TESTS - 2).reduce(Long::sum).get().longValue(); +standardDurations.stream().sorted().limit(NUM_TESTS - NUM_SKIP).reduce(Long::sum).get().longValue(); List optimizedDurations = new ArrayList<>(); for (int i = 0; i < NUM_TESTS; i++) { @@ -79,7 +79,7 @@ public class TestParameterMapPerformance { System.out.println("Done with optimized in " + duration + "ms"); } /* - * The CI systems tend to produce outliers that lead to false failures so skip the longest two runs. + * The CI systems tend to produce outliers that lead to false failures so skip the longest NUM_SKIP runs. */ long optimizedTotalDuration = optimizedDurations.stream().sorted().limit(NUM_TESTS - NUM_SKIP).reduce(Long::sum).get().longValue(); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 10.1.x updated: Use constants. Update comments.
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/10.1.x by this push: new da7d469e59 Use constants. Update comments. da7d469e59 is described below commit da7d469e591f57b8ad7b1605b3b636734f0df837 Author: Mark Thomas AuthorDate: Fri Jan 31 15:27:19 2025 + Use constants. Update comments. --- test/org/apache/catalina/util/TestParameterMapPerformance.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/org/apache/catalina/util/TestParameterMapPerformance.java b/test/org/apache/catalina/util/TestParameterMapPerformance.java index fe2ea9bf79..a89341a1a5 100644 --- a/test/org/apache/catalina/util/TestParameterMapPerformance.java +++ b/test/org/apache/catalina/util/TestParameterMapPerformance.java @@ -62,10 +62,10 @@ public class TestParameterMapPerformance { System.out.println("Done with standard in " + duration + "ms"); } /* - * The CI systems tend to produce outliers that lead to false failures so skip the longest two runs. + * The CI systems tend to produce outliers that lead to false failures so skip the longest NUM_SKIP runs. */ long standardTotalDuration = -standardDurations.stream().sorted().limit(NUM_TESTS - 2).reduce(Long::sum).get().longValue(); +standardDurations.stream().sorted().limit(NUM_TESTS - NUM_SKIP).reduce(Long::sum).get().longValue(); List optimizedDurations = new ArrayList<>(); for (int i = 0; i < NUM_TESTS; i++) { @@ -79,7 +79,7 @@ public class TestParameterMapPerformance { System.out.println("Done with optimized in " + duration + "ms"); } /* - * The CI systems tend to produce outliers that lead to false failures so skip the longest two runs. + * The CI systems tend to produce outliers that lead to false failures so skip the longest NUM_SKIP runs. */ long optimizedTotalDuration = optimizedDurations.stream().sorted().limit(NUM_TESTS - NUM_SKIP).reduce(Long::sum).get().longValue(); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch main updated: Speed up test execution
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/main by this push: new 4cddb2acf1 Speed up test execution 4cddb2acf1 is described below commit 4cddb2acf1e954fcdcf27e24ab54e46d0cdf7bc0 Author: Mark Thomas AuthorDate: Fri Jan 31 15:35:09 2025 + Speed up test execution --- test/org/apache/tomcat/websocket/server/TestSlowClient.java | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/test/org/apache/tomcat/websocket/server/TestSlowClient.java b/test/org/apache/tomcat/websocket/server/TestSlowClient.java index a9203609f5..b45f0b4698 100644 --- a/test/org/apache/tomcat/websocket/server/TestSlowClient.java +++ b/test/org/apache/tomcat/websocket/server/TestSlowClient.java @@ -19,6 +19,8 @@ package org.apache.tomcat.websocket.server; import java.net.URI; import jakarta.websocket.ClientEndpointConfig; +import jakarta.websocket.CloseReason; +import jakarta.websocket.CloseReason.CloseCodes; import jakarta.websocket.ContainerProvider; import jakarta.websocket.MessageHandler; import jakarta.websocket.Session; @@ -34,6 +36,7 @@ import org.apache.coyote.AbstractProtocol; import org.apache.tomcat.websocket.TesterFirehoseServer; import org.apache.tomcat.websocket.TesterMessageCountClient.TesterProgrammaticEndpoint; import org.apache.tomcat.websocket.WebSocketBaseTest; +import org.apache.tomcat.websocket.WsSession; public class TestSlowClient extends WebSocketBaseTest { @@ -70,10 +73,10 @@ public class TestSlowClient extends WebSocketBaseTest { count++; } Assert.assertTrue(wsSession.isOpen()); -// Set a short session close timeout (milliseconds) -wsSession.getUserProperties().put( - org.apache.tomcat.websocket.Constants.SESSION_CLOSE_TIMEOUT_PROPERTY, Long.valueOf(2000)); -wsSession.close(); + +// Cast so we can force the session to be closed quickly. +CloseReason cr = new CloseReason(CloseCodes.CLOSED_ABNORMALLY, ""); +((WsSession) wsSession).doClose(cr, cr, true); // BZ 64848 (non-container thread variant) // Confirm there are no waiting processors - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 10.1.x updated: Speed up test execution
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/10.1.x by this push: new 9fe232a187 Speed up test execution 9fe232a187 is described below commit 9fe232a187558daed9c01c21ee8210135d146e24 Author: Mark Thomas AuthorDate: Fri Jan 31 15:35:09 2025 + Speed up test execution --- test/org/apache/tomcat/websocket/server/TestSlowClient.java | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/test/org/apache/tomcat/websocket/server/TestSlowClient.java b/test/org/apache/tomcat/websocket/server/TestSlowClient.java index a9203609f5..b45f0b4698 100644 --- a/test/org/apache/tomcat/websocket/server/TestSlowClient.java +++ b/test/org/apache/tomcat/websocket/server/TestSlowClient.java @@ -19,6 +19,8 @@ package org.apache.tomcat.websocket.server; import java.net.URI; import jakarta.websocket.ClientEndpointConfig; +import jakarta.websocket.CloseReason; +import jakarta.websocket.CloseReason.CloseCodes; import jakarta.websocket.ContainerProvider; import jakarta.websocket.MessageHandler; import jakarta.websocket.Session; @@ -34,6 +36,7 @@ import org.apache.coyote.AbstractProtocol; import org.apache.tomcat.websocket.TesterFirehoseServer; import org.apache.tomcat.websocket.TesterMessageCountClient.TesterProgrammaticEndpoint; import org.apache.tomcat.websocket.WebSocketBaseTest; +import org.apache.tomcat.websocket.WsSession; public class TestSlowClient extends WebSocketBaseTest { @@ -70,10 +73,10 @@ public class TestSlowClient extends WebSocketBaseTest { count++; } Assert.assertTrue(wsSession.isOpen()); -// Set a short session close timeout (milliseconds) -wsSession.getUserProperties().put( - org.apache.tomcat.websocket.Constants.SESSION_CLOSE_TIMEOUT_PROPERTY, Long.valueOf(2000)); -wsSession.close(); + +// Cast so we can force the session to be closed quickly. +CloseReason cr = new CloseReason(CloseCodes.CLOSED_ABNORMALLY, ""); +((WsSession) wsSession).doClose(cr, cr, true); // BZ 64848 (non-container thread variant) // Confirm there are no waiting processors - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 11.0.x updated: Speed up test execution
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 11.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/11.0.x by this push: new c6187ca2b8 Speed up test execution c6187ca2b8 is described below commit c6187ca2b820e3164b01295bb87a2577ed88aa5f Author: Mark Thomas AuthorDate: Fri Jan 31 15:35:09 2025 + Speed up test execution --- test/org/apache/tomcat/websocket/server/TestSlowClient.java | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/test/org/apache/tomcat/websocket/server/TestSlowClient.java b/test/org/apache/tomcat/websocket/server/TestSlowClient.java index a9203609f5..b45f0b4698 100644 --- a/test/org/apache/tomcat/websocket/server/TestSlowClient.java +++ b/test/org/apache/tomcat/websocket/server/TestSlowClient.java @@ -19,6 +19,8 @@ package org.apache.tomcat.websocket.server; import java.net.URI; import jakarta.websocket.ClientEndpointConfig; +import jakarta.websocket.CloseReason; +import jakarta.websocket.CloseReason.CloseCodes; import jakarta.websocket.ContainerProvider; import jakarta.websocket.MessageHandler; import jakarta.websocket.Session; @@ -34,6 +36,7 @@ import org.apache.coyote.AbstractProtocol; import org.apache.tomcat.websocket.TesterFirehoseServer; import org.apache.tomcat.websocket.TesterMessageCountClient.TesterProgrammaticEndpoint; import org.apache.tomcat.websocket.WebSocketBaseTest; +import org.apache.tomcat.websocket.WsSession; public class TestSlowClient extends WebSocketBaseTest { @@ -70,10 +73,10 @@ public class TestSlowClient extends WebSocketBaseTest { count++; } Assert.assertTrue(wsSession.isOpen()); -// Set a short session close timeout (milliseconds) -wsSession.getUserProperties().put( - org.apache.tomcat.websocket.Constants.SESSION_CLOSE_TIMEOUT_PROPERTY, Long.valueOf(2000)); -wsSession.close(); + +// Cast so we can force the session to be closed quickly. +CloseReason cr = new CloseReason(CloseCodes.CLOSED_ABNORMALLY, ""); +((WsSession) wsSession).doClose(cr, cr, true); // BZ 64848 (non-container thread variant) // Confirm there are no waiting processors - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 9.0.x updated: Speed up test execution
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/9.0.x by this push: new 9923648cd4 Speed up test execution 9923648cd4 is described below commit 9923648cd4dcbf5e120a1a55db6dd788d03fcff8 Author: Mark Thomas AuthorDate: Fri Jan 31 15:35:09 2025 + Speed up test execution --- test/org/apache/tomcat/websocket/server/TestSlowClient.java | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/test/org/apache/tomcat/websocket/server/TestSlowClient.java b/test/org/apache/tomcat/websocket/server/TestSlowClient.java index 5460d4fc78..aa31657218 100644 --- a/test/org/apache/tomcat/websocket/server/TestSlowClient.java +++ b/test/org/apache/tomcat/websocket/server/TestSlowClient.java @@ -19,6 +19,8 @@ package org.apache.tomcat.websocket.server; import java.net.URI; import javax.websocket.ClientEndpointConfig; +import javax.websocket.CloseReason; +import javax.websocket.CloseReason.CloseCodes; import javax.websocket.ContainerProvider; import javax.websocket.MessageHandler; import javax.websocket.Session; @@ -34,6 +36,7 @@ import org.apache.coyote.AbstractProtocol; import org.apache.tomcat.websocket.TesterFirehoseServer; import org.apache.tomcat.websocket.TesterMessageCountClient.TesterProgrammaticEndpoint; import org.apache.tomcat.websocket.WebSocketBaseTest; +import org.apache.tomcat.websocket.WsSession; public class TestSlowClient extends WebSocketBaseTest { @@ -70,10 +73,10 @@ public class TestSlowClient extends WebSocketBaseTest { count++; } Assert.assertTrue(wsSession.isOpen()); -// Set a short session close timeout (milliseconds) -wsSession.getUserProperties().put( - org.apache.tomcat.websocket.Constants.SESSION_CLOSE_TIMEOUT_PROPERTY, Long.valueOf(2000)); -wsSession.close(); + +// Cast so we can force the session to be closed quickly. +CloseReason cr = new CloseReason(CloseCodes.CLOSED_ABNORMALLY, ""); +((WsSession) wsSession).doClose(cr, cr, true); // BZ 64848 (non-container thread variant) // Confirm there are no waiting processors - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 69559] WARNING: sun.misc.Unsafe::invokeCleaner has been called by org.apache.tomcat.util.buf.ByteBufferUtils
https://bz.apache.org/bugzilla/show_bug.cgi?id=69559 --- Comment #2 from asf-bugzi...@transentia.com.au --- But *I* am not doing anything, other than using the default Tomcat stasrter in Spring Boot: """ sun.misc.Unsafe::invokeCleaner has been called by org.apache.tomcat.util.buf.ByteBufferUtils === I assume that you need to know this: === Please consider reporting this to the maintainers of class org.apache.tomcat.util.buf.ByteBufferUtils WARNING: sun.misc.Unsafe::invokeCleaner will be removed in a future release === I guess I'll raise this with the Spring Boot guys... -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org