(tomcat) branch main updated: Flag needs to be volatile

2024-02-08 Thread markt
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 27632c78a3 Flag needs to be volatile
27632c78a3 is described below

commit 27632c78a3ad078a40b795f845e7898b6dd30376
Author: Mark Thomas 
AuthorDate: Thu Feb 8 18:52:50 2024 +

Flag needs to be volatile
---
 java/org/apache/tomcat/jni/Library.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/tomcat/jni/Library.java 
b/java/org/apache/tomcat/jni/Library.java
index 8354406450..908a9a8b56 100644
--- a/java/org/apache/tomcat/jni/Library.java
+++ b/java/org/apache/tomcat/jni/Library.java
@@ -29,7 +29,7 @@ public final class Library {
  */
 private static Library _instance = null;
 
-private static boolean initialized = false;
+private static volatile boolean initialized = false;
 
 private Library() throws Exception {
 boolean loaded = false;


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Buildbot success in on tomcat-10.1.x

2024-02-08 Thread buildbot
Build status: Build succeeded!
Worker used: bb_worker2_ubuntu
URL: https://ci2.apache.org/#builders/44/builds/1139
Blamelist: Mark Thomas , remm 
Build Text: build successful
Status Detected: restored build
Build Source Stamp: [branch 10.1.x] 6616d84ddf978293b5bdfb6bd83eefb137b03d80


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



(tomcat) 01/02: Re-order so library isn't reported as running after it is terminated

2024-02-08 Thread markt
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

commit 712f6d8a70e0e89d66cba8a7b9cc81c717ecbe7d
Author: Mark Thomas 
AuthorDate: Thu Feb 8 18:54:18 2024 +

Re-order so library isn't reported as running after it is terminated
---
 java/org/apache/catalina/core/AprLifecycleListener.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/catalina/core/AprLifecycleListener.java 
b/java/org/apache/catalina/core/AprLifecycleListener.java
index 4ed37531fa..8fea80148e 100644
--- a/java/org/apache/catalina/core/AprLifecycleListener.java
+++ b/java/org/apache/catalina/core/AprLifecycleListener.java
@@ -170,11 +170,11 @@ public class AprLifecycleListener implements 
LifecycleListener {
 
 private static void terminateAPR() {
 Library.terminatePrepare();
-Library.terminate();
-AprStatus.setAprAvailable(false);
 AprStatus.setAprInitialized(false);
-sslInitialized = false; // Well we cleaned the pool in terminate.
+AprStatus.setAprAvailable(false);
 fipsModeActive = false;
+sslInitialized = false; // Well we cleaned the pool in terminate.
+Library.terminate();
 }
 
 private static void init() {


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) branch main updated (27632c78a3 -> 543e2b56bc)

2024-02-08 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


from 27632c78a3 Flag needs to be volatile
 new 712f6d8a70 Re-order so library isn't reported as running after it is 
terminated
 new 543e2b56bc Reduce changes of crash on Library shutdown with OpenSSL 
connections

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:
 .../apache/catalina/core/AprLifecycleListener.java|  6 +++---
 .../tomcat/util/net/openssl/OpenSSLContext.java   | 19 +++
 2 files changed, 14 insertions(+), 11 deletions(-)


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) 02/02: Reduce changes of crash on Library shutdown with OpenSSL connections

2024-02-08 Thread markt
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

commit 543e2b56bc8ccbde973366975b211b61408caf8a
Author: Mark Thomas 
AuthorDate: Thu Feb 8 18:54:45 2024 +

Reduce changes of crash on Library shutdown with OpenSSL connections
---
 .../tomcat/util/net/openssl/OpenSSLContext.java   | 19 +++
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java 
b/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java
index f1d7b092ec..12dc41455b 100644
--- a/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java
+++ b/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java
@@ -46,6 +46,7 @@ import javax.net.ssl.X509TrustManager;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 import org.apache.tomcat.jni.CertificateVerifier;
+import org.apache.tomcat.jni.Library;
 import org.apache.tomcat.jni.Pool;
 import org.apache.tomcat.jni.SSL;
 import org.apache.tomcat.jni.SSLConf;
@@ -648,14 +649,16 @@ public class OpenSSLContext implements 
org.apache.tomcat.util.net.SSLContext {
 
 @Override
 public void run() {
-if (ctx != 0) {
-SSLContext.free(ctx);
-}
-if (cctx != 0) {
-SSLConf.free(cctx);
-}
-if (aprPool != 0) {
-Pool.destroy(aprPool);
+if (Library.isInitialized()) {
+if (ctx != 0) {
+SSLContext.free(ctx);
+}
+if (cctx != 0) {
+SSLConf.free(cctx);
+}
+if (aprPool != 0) {
+Pool.destroy(aprPool);
+}
 }
 }
 }


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) 03/04: Re-order so library isn't reported as running after it is terminated

2024-02-08 Thread markt
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

commit 6b38522ec964ac76ab329fb44c6313dba9289467
Author: Mark Thomas 
AuthorDate: Thu Feb 8 18:54:18 2024 +

Re-order so library isn't reported as running after it is terminated
---
 java/org/apache/catalina/core/AprLifecycleListener.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/catalina/core/AprLifecycleListener.java 
b/java/org/apache/catalina/core/AprLifecycleListener.java
index 4ed37531fa..8fea80148e 100644
--- a/java/org/apache/catalina/core/AprLifecycleListener.java
+++ b/java/org/apache/catalina/core/AprLifecycleListener.java
@@ -170,11 +170,11 @@ public class AprLifecycleListener implements 
LifecycleListener {
 
 private static void terminateAPR() {
 Library.terminatePrepare();
-Library.terminate();
-AprStatus.setAprAvailable(false);
 AprStatus.setAprInitialized(false);
-sslInitialized = false; // Well we cleaned the pool in terminate.
+AprStatus.setAprAvailable(false);
 fipsModeActive = false;
+sslInitialized = false; // Well we cleaned the pool in terminate.
+Library.terminate();
 }
 
 private static void init() {


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) 01/04: Preparatory work for APR/Native shutdown stability fix

2024-02-08 Thread markt
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

commit 2001d59f5a326696ebd6ea7f26f83113f97803ef
Author: Mark Thomas 
AuthorDate: Thu Feb 8 18:47:07 2024 +

Preparatory work for APR/Native shutdown stability fix
---
 .../apache/catalina/core/AprLifecycleListener.java |  1 +
 java/org/apache/tomcat/jni/Library.java| 32 ++
 test/org/apache/tomcat/util/net/TesterSupport.java |  1 +
 3 files changed, 29 insertions(+), 5 deletions(-)

diff --git a/java/org/apache/catalina/core/AprLifecycleListener.java 
b/java/org/apache/catalina/core/AprLifecycleListener.java
index 8a6184438d..4ed37531fa 100644
--- a/java/org/apache/catalina/core/AprLifecycleListener.java
+++ b/java/org/apache/catalina/core/AprLifecycleListener.java
@@ -169,6 +169,7 @@ public class AprLifecycleListener implements 
LifecycleListener {
 }
 
 private static void terminateAPR() {
+Library.terminatePrepare();
 Library.terminate();
 AprStatus.setAprAvailable(false);
 AprStatus.setAprInitialized(false);
diff --git a/java/org/apache/tomcat/jni/Library.java 
b/java/org/apache/tomcat/jni/Library.java
index 9b9585f689..f7a72a9606 100644
--- a/java/org/apache/tomcat/jni/Library.java
+++ b/java/org/apache/tomcat/jni/Library.java
@@ -29,6 +29,8 @@ public final class Library {
  */
 private static Library _instance = null;
 
+private static boolean initialized = false;
+
 private Library() throws Exception {
 boolean loaded = false;
 StringBuilder err = new StringBuilder();
@@ -97,12 +99,26 @@ public final class Library {
 System.loadLibrary(libraryName);
 }
 
-/* create global TCN's APR pool
- * This has to be the first call to TCN library.
+/**
+ * Create Tomcat Native's global APR pool. This has to be the first call 
to TCN library.
  */
 private static native boolean initialize();
-/* destroy global TCN's APR pool
- * This has to be the last call to TCN library.
+/**
+ * Signal that Tomcat Native is about to be shutdown.
+ * 
+ * The main purpose of this flag is to allow instances that manage their 
own APR root pools to determine if those
+ * pools need to be explicitly cleaned up or if they will be / have been 
cleaned up by the call to
+ * {@link #terminate()}. The code needs to avoid multiple attempts to 
clean up these pools else the Native code may
+ * crash.
+ */
+public static void terminatePrepare() {
+initialized = false;
+}
+/**
+ * Destroys Tomcat Native's global APR pool. This has to be the last call 
to TCN library. This will destroy any APR
+ * root pools that have not been explicitly destroyed.
+ * 
+ * Callers of this method should call {@link #terminatePrepare()} before 
calling this method.
  */
 public static native void terminate();
 /* Internal function for loading APR Features */
@@ -161,6 +177,12 @@ public final class Library {
aprVersionString() + ")");
 }
 }
-return initialize();
+initialized = initialize();
+return initialized;
+}
+
+
+public static boolean isInitialized() {
+return initialized;
 }
 }
diff --git a/test/org/apache/tomcat/util/net/TesterSupport.java 
b/test/org/apache/tomcat/util/net/TesterSupport.java
index 03eb1d9bb9..5bf884b393 100644
--- a/test/org/apache/tomcat/util/net/TesterSupport.java
+++ b/test/org/apache/tomcat/util/net/TesterSupport.java
@@ -105,6 +105,7 @@ public final class TesterSupport {
 Library.initialize(null);
 available = true;
 version = SSL.version();
+Library.terminatePrepare();
 Library.terminate();
 } catch (Exception | LibraryNotFoundError ex) {
 err = ex.getMessage();


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) 02/04: Flag needs to be volatile

2024-02-08 Thread markt
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

commit b33cc894b178809bbb98d805e264420ecf5239c9
Author: Mark Thomas 
AuthorDate: Thu Feb 8 18:52:50 2024 +

Flag needs to be volatile
---
 java/org/apache/tomcat/jni/Library.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/tomcat/jni/Library.java 
b/java/org/apache/tomcat/jni/Library.java
index f7a72a9606..590f1b19d9 100644
--- a/java/org/apache/tomcat/jni/Library.java
+++ b/java/org/apache/tomcat/jni/Library.java
@@ -29,7 +29,7 @@ public final class Library {
  */
 private static Library _instance = null;
 
-private static boolean initialized = false;
+private static volatile boolean initialized = false;
 
 private Library() throws Exception {
 boolean loaded = false;


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) 04/04: Reduce changes of crash on Library shutdown with OpenSSL connections

2024-02-08 Thread markt
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

commit e19fa66b8397194f421134debb1f71b590a1f0c0
Author: Mark Thomas 
AuthorDate: Thu Feb 8 18:54:45 2024 +

Reduce changes of crash on Library shutdown with OpenSSL connections
---
 .../tomcat/util/net/openssl/OpenSSLContext.java   | 19 +++
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java 
b/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java
index f1d7b092ec..12dc41455b 100644
--- a/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java
+++ b/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java
@@ -46,6 +46,7 @@ import javax.net.ssl.X509TrustManager;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 import org.apache.tomcat.jni.CertificateVerifier;
+import org.apache.tomcat.jni.Library;
 import org.apache.tomcat.jni.Pool;
 import org.apache.tomcat.jni.SSL;
 import org.apache.tomcat.jni.SSLConf;
@@ -648,14 +649,16 @@ public class OpenSSLContext implements 
org.apache.tomcat.util.net.SSLContext {
 
 @Override
 public void run() {
-if (ctx != 0) {
-SSLContext.free(ctx);
-}
-if (cctx != 0) {
-SSLConf.free(cctx);
-}
-if (aprPool != 0) {
-Pool.destroy(aprPool);
+if (Library.isInitialized()) {
+if (ctx != 0) {
+SSLContext.free(ctx);
+}
+if (cctx != 0) {
+SSLConf.free(cctx);
+}
+if (aprPool != 0) {
+Pool.destroy(aprPool);
+}
 }
 }
 }


-
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 (6616d84ddf -> e19fa66b83)

2024-02-08 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a change to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


from 6616d84ddf No need for reflection here
 new 2001d59f5a Preparatory work for APR/Native shutdown stability fix
 new b33cc894b1 Flag needs to be volatile
 new 6b38522ec9 Re-order so library isn't reported as running after it is 
terminated
 new e19fa66b83 Reduce changes of crash on Library shutdown with OpenSSL 
connections

The 4 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:
 .../apache/catalina/core/AprLifecycleListener.java |  7 +++--
 java/org/apache/tomcat/jni/Library.java| 32 ++
 .../tomcat/util/net/openssl/OpenSSLContext.java| 19 +++--
 test/org/apache/tomcat/util/net/TesterSupport.java |  1 +
 4 files changed, 43 insertions(+), 16 deletions(-)


-
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 (552cf5e5f4 -> 967be0a2d5)

2024-02-08 Thread markt
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 552cf5e5f4 No need for reflection here
 new 8fff07ff83 Preparatory work for APR/Native shutdown stability fix
 new 7aaead13e4 Flag needs to be volatile
 new afc9bf21eb Re-order so library isn't reported as running after it is 
terminated
 new b2751e207a Reduce changes of crash on Library shutdown with OpenSSL 
connections
 new 967be0a2d5 Need for force GC to avoid duplicate clean-up (which 
triggers a crash)

The 5 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:
 .../apache/catalina/core/AprLifecycleListener.java |  9 --
 java/org/apache/tomcat/jni/Library.java| 32 ++
 .../tomcat/util/net/openssl/OpenSSLContext.java|  3 +-
 test/org/apache/tomcat/util/net/TesterSupport.java |  1 +
 4 files changed, 36 insertions(+), 9 deletions(-)


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) 01/05: Preparatory work for APR/Native shutdown stability fix

2024-02-08 Thread markt
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 8fff07ff8388806fddbcaa02c0f8d1873c226015
Author: Mark Thomas 
AuthorDate: Thu Feb 8 18:47:07 2024 +

Preparatory work for APR/Native shutdown stability fix
---
 .../apache/catalina/core/AprLifecycleListener.java |  1 +
 java/org/apache/tomcat/jni/Library.java| 32 ++
 test/org/apache/tomcat/util/net/TesterSupport.java |  1 +
 3 files changed, 29 insertions(+), 5 deletions(-)

diff --git a/java/org/apache/catalina/core/AprLifecycleListener.java 
b/java/org/apache/catalina/core/AprLifecycleListener.java
index fb93d96b5a..d8fd5ad023 100644
--- a/java/org/apache/catalina/core/AprLifecycleListener.java
+++ b/java/org/apache/catalina/core/AprLifecycleListener.java
@@ -169,6 +169,7 @@ public class AprLifecycleListener implements 
LifecycleListener {
 }
 
 private static void terminateAPR() {
+Library.terminatePrepare();
 Library.terminate();
 AprStatus.setAprAvailable(false);
 AprStatus.setAprInitialized(false);
diff --git a/java/org/apache/tomcat/jni/Library.java 
b/java/org/apache/tomcat/jni/Library.java
index 218a101b59..cf05501d54 100644
--- a/java/org/apache/tomcat/jni/Library.java
+++ b/java/org/apache/tomcat/jni/Library.java
@@ -32,6 +32,8 @@ public final class Library {
  */
 private static Library _instance = null;
 
+private static boolean initialized = false;
+
 private Library() throws Exception {
 boolean loaded = false;
 StringBuilder err = new StringBuilder();
@@ -100,12 +102,26 @@ public final class Library {
 System.loadLibrary(libraryName);
 }
 
-/* create global TCN's APR pool
- * This has to be the first call to TCN library.
+/**
+ * Create Tomcat Native's global APR pool. This has to be the first call 
to TCN library.
  */
 private static native boolean initialize();
-/* destroy global TCN's APR pool
- * This has to be the last call to TCN library.
+/**
+ * Signal that Tomcat Native is about to be shutdown.
+ * 
+ * The main purpose of this flag is to allow instances that manage their 
own APR root pools to determine if those
+ * pools need to be explicitly cleaned up or if they will be / have been 
cleaned up by the call to
+ * {@link #terminate()}. The code needs to avoid multiple attempts to 
clean up these pools else the Native code may
+ * crash.
+ */
+public static void terminatePrepare() {
+initialized = false;
+}
+/**
+ * Destroys Tomcat Native's global APR pool. This has to be the last call 
to TCN library. This will destroy any APR
+ * root pools that have not been explicitly destroyed.
+ * 
+ * Callers of this method should call {@link #terminatePrepare()} before 
calling this method.
  */
 public static native void terminate();
 /* Internal function for loading APR Features */
@@ -284,7 +300,13 @@ public final class Library {
 throw new UnsatisfiedLinkError("Missing threading support from 
APR");
 }
 }
-return initialize();
+initialized = initialize();
+return initialized;
+}
+
+
+public static boolean isInitialized() {
+return initialized;
 }
 
 /**
diff --git a/test/org/apache/tomcat/util/net/TesterSupport.java 
b/test/org/apache/tomcat/util/net/TesterSupport.java
index afbae25dc9..555e498fb0 100644
--- a/test/org/apache/tomcat/util/net/TesterSupport.java
+++ b/test/org/apache/tomcat/util/net/TesterSupport.java
@@ -103,6 +103,7 @@ public final class TesterSupport {
 Library.initialize(null);
 available = true;
 version = SSL.version();
+Library.terminatePrepare();
 Library.terminate();
 } catch (Exception | LibraryNotFoundError ex) {
 err = ex.getMessage();


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) 04/05: Reduce changes of crash on Library shutdown with OpenSSL connections

2024-02-08 Thread markt
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 b2751e207a9e64f93ed57e7ad469f88148f9e10e
Author: Mark Thomas 
AuthorDate: Thu Feb 8 18:54:45 2024 +

Reduce changes of crash on Library shutdown with OpenSSL connections
---
 java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java 
b/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java
index 399c6a3985..c513c808ea 100644
--- a/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java
+++ b/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java
@@ -45,6 +45,7 @@ import javax.net.ssl.X509TrustManager;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 import org.apache.tomcat.jni.CertificateVerifier;
+import org.apache.tomcat.jni.Library;
 import org.apache.tomcat.jni.Pool;
 import org.apache.tomcat.jni.SSL;
 import org.apache.tomcat.jni.SSLConf;
@@ -187,7 +188,7 @@ public class OpenSSLContext implements 
org.apache.tomcat.util.net.SSLContext {
 @Override
 public synchronized void destroy() {
 // Guard against multiple destroyPools() calls triggered by 
construction exception and finalize() later
-if (aprPoolDestroyed.compareAndSet(0, 1)) {
+if (aprPoolDestroyed.compareAndSet(0, 1) && Library.isInitialized()) {
 if (ctx != 0) {
 SSLContext.free(ctx);
 }


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) 03/05: Re-order so library isn't reported as running after it is terminated

2024-02-08 Thread markt
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 afc9bf21eb7551fab2452b228c3602d1f15c4d3c
Author: Mark Thomas 
AuthorDate: Thu Feb 8 18:54:18 2024 +

Re-order so library isn't reported as running after it is terminated
---
 java/org/apache/catalina/core/AprLifecycleListener.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/catalina/core/AprLifecycleListener.java 
b/java/org/apache/catalina/core/AprLifecycleListener.java
index d8fd5ad023..da2c0e3862 100644
--- a/java/org/apache/catalina/core/AprLifecycleListener.java
+++ b/java/org/apache/catalina/core/AprLifecycleListener.java
@@ -170,11 +170,11 @@ public class AprLifecycleListener implements 
LifecycleListener {
 
 private static void terminateAPR() {
 Library.terminatePrepare();
-Library.terminate();
-AprStatus.setAprAvailable(false);
 AprStatus.setAprInitialized(false);
-sslInitialized = false; // Well we cleaned the pool in terminate.
+AprStatus.setAprAvailable(false);
 fipsModeActive = false;
+sslInitialized = false; // Well we cleaned the pool in terminate.
+Library.terminate();
 }
 
 @SuppressWarnings("deprecation")


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) 02/05: Flag needs to be volatile

2024-02-08 Thread markt
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 7aaead13e41b0b6c5ee4eba34668cd5e6c66906b
Author: Mark Thomas 
AuthorDate: Thu Feb 8 18:52:50 2024 +

Flag needs to be volatile
---
 java/org/apache/tomcat/jni/Library.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/tomcat/jni/Library.java 
b/java/org/apache/tomcat/jni/Library.java
index cf05501d54..2576beecd1 100644
--- a/java/org/apache/tomcat/jni/Library.java
+++ b/java/org/apache/tomcat/jni/Library.java
@@ -32,7 +32,7 @@ public final class Library {
  */
 private static Library _instance = null;
 
-private static boolean initialized = false;
+private static volatile boolean initialized = false;
 
 private Library() throws Exception {
 boolean loaded = false;


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) 05/05: Need for force GC to avoid duplicate clean-up (which triggers a crash)

2024-02-08 Thread markt
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 967be0a2d5bb90a5f962359e80fe3e6a78b1ea51
Author: Mark Thomas 
AuthorDate: Thu Feb 8 21:17:24 2024 +

Need for force GC to avoid duplicate clean-up (which triggers a crash)
---
 java/org/apache/catalina/core/AprLifecycleListener.java | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/java/org/apache/catalina/core/AprLifecycleListener.java 
b/java/org/apache/catalina/core/AprLifecycleListener.java
index da2c0e3862..974af71ba2 100644
--- a/java/org/apache/catalina/core/AprLifecycleListener.java
+++ b/java/org/apache/catalina/core/AprLifecycleListener.java
@@ -170,6 +170,8 @@ public class AprLifecycleListener implements 
LifecycleListener {
 
 private static void terminateAPR() {
 Library.terminatePrepare();
+// Need to force GC here as some components do APR clean-up in 
finalize()
+System.gc();
 AprStatus.setAprInitialized(false);
 AprStatus.setAprAvailable(false);
 fipsModeActive = false;


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) 01/05: Preparatory work for APR/Native shutdown stability fix

2024-02-08 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit b57631dd130e266b3ffe231a3075bbf8022de82d
Author: Mark Thomas 
AuthorDate: Thu Feb 8 18:47:07 2024 +

Preparatory work for APR/Native shutdown stability fix
---
 .../apache/catalina/core/AprLifecycleListener.java |  1 +
 java/org/apache/tomcat/jni/Library.java| 32 ++
 test/org/apache/tomcat/util/net/TesterSupport.java |  1 +
 3 files changed, 29 insertions(+), 5 deletions(-)

diff --git a/java/org/apache/catalina/core/AprLifecycleListener.java 
b/java/org/apache/catalina/core/AprLifecycleListener.java
index 42a5bf432b..e510d0bdad 100644
--- a/java/org/apache/catalina/core/AprLifecycleListener.java
+++ b/java/org/apache/catalina/core/AprLifecycleListener.java
@@ -175,6 +175,7 @@ public class AprLifecycleListener implements 
LifecycleListener {
 }
 
 private static void terminateAPR() {
+Library.terminatePrepare();
 Library.terminate();
 aprAvailable = false;
 aprInitialized = false;
diff --git a/java/org/apache/tomcat/jni/Library.java 
b/java/org/apache/tomcat/jni/Library.java
index 75a2de866d..8c48732740 100644
--- a/java/org/apache/tomcat/jni/Library.java
+++ b/java/org/apache/tomcat/jni/Library.java
@@ -30,6 +30,8 @@ public final class Library {
  */
 private static Library _instance = null;
 
+private static boolean initialized = false;
+
 private Library() throws Exception {
 boolean loaded = false;
 String path = System.getProperty("java.library.path");
@@ -74,12 +76,26 @@ public final class Library {
 System.loadLibrary(libraryName);
 }
 
-/* create global TCN's APR pool
- * This has to be the first call to TCN library.
+/**
+ * Create Tomcat Native's global APR pool. This has to be the first call 
to TCN library.
  */
 private static native boolean initialize();
-/* destroy global TCN's APR pool
- * This has to be the last call to TCN library.
+/**
+ * Signal that Tomcat Native is about to be shutdown.
+ * 
+ * The main purpose of this flag is to allow instances that manage their 
own APR root pools to determine if those
+ * pools need to be explicitly cleaned up or if they will be / have been 
cleaned up by the call to
+ * {@link #terminate()}. The code needs to avoid multiple attempts to 
clean up these pools else the Native code may
+ * crash.
+ */
+public static void terminatePrepare() {
+initialized = false;
+}
+/**
+ * Destroys Tomcat Native's global APR pool. This has to be the last call 
to TCN library. This will destroy any APR
+ * root pools that have not been explicitly destroyed.
+ * 
+ * Callers of this method should call {@link #terminatePrepare()} before 
calling this method.
  */
 public static native void terminate();
 /* Internal function for loading APR Features */
@@ -247,7 +263,13 @@ public final class Library {
 throw new UnsatisfiedLinkError("Missing threading support from 
APR");
 }
 }
-return initialize();
+initialized = initialize();
+return initialized;
+}
+
+
+public static boolean isInitialized() {
+return initialized;
 }
 
 /**
diff --git a/test/org/apache/tomcat/util/net/TesterSupport.java 
b/test/org/apache/tomcat/util/net/TesterSupport.java
index 568ea1ece8..c0f908ffc9 100644
--- a/test/org/apache/tomcat/util/net/TesterSupport.java
+++ b/test/org/apache/tomcat/util/net/TesterSupport.java
@@ -101,6 +101,7 @@ public final class TesterSupport {
 Library.initialize(null);
 available = true;
 version = SSL.version();
+Library.terminatePrepare();
 Library.terminate();
 } catch (Exception | LibraryNotFoundError ex) {
 // Ignore


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) 04/05: Reduce changes of crash on Library shutdown with OpenSSL connections

2024-02-08 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 3d495c13f30c2b5cf5c2730e26b7082147b9a313
Author: Mark Thomas 
AuthorDate: Thu Feb 8 18:54:45 2024 +

Reduce changes of crash on Library shutdown with OpenSSL connections
---
 java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java 
b/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java
index 82b01e775c..b2878a8beb 100644
--- a/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java
+++ b/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java
@@ -44,6 +44,7 @@ import javax.net.ssl.X509TrustManager;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 import org.apache.tomcat.jni.CertificateVerifier;
+import org.apache.tomcat.jni.Library;
 import org.apache.tomcat.jni.Pool;
 import org.apache.tomcat.jni.SSL;
 import org.apache.tomcat.jni.SSLConf;
@@ -189,7 +190,7 @@ public class OpenSSLContext implements 
org.apache.tomcat.util.net.SSLContext {
 @Override
 public synchronized void destroy() {
 // Guard against multiple destroyPools() calls triggered by 
construction exception and finalize() later
-if (aprPoolDestroyed.compareAndSet(0, 1)) {
+if (aprPoolDestroyed.compareAndSet(0, 1) && Library.isInitialized()) {
 if (ctx != 0) {
 SSLContext.free(ctx);
 }


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) 02/05: Flag needs to be volatile

2024-02-08 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 99a63ba6e5e05154740e23f7d0f155751bfe48a3
Author: Mark Thomas 
AuthorDate: Thu Feb 8 18:52:50 2024 +

Flag needs to be volatile
---
 java/org/apache/tomcat/jni/Library.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/tomcat/jni/Library.java 
b/java/org/apache/tomcat/jni/Library.java
index 8c48732740..a08dae4c07 100644
--- a/java/org/apache/tomcat/jni/Library.java
+++ b/java/org/apache/tomcat/jni/Library.java
@@ -30,7 +30,7 @@ public final class Library {
  */
 private static Library _instance = null;
 
-private static boolean initialized = false;
+private static volatile boolean initialized = false;
 
 private Library() throws Exception {
 boolean loaded = false;


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) 05/05: Need for force GC to avoid duplicate clean-up (which triggers a crash)

2024-02-08 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 4471b2a54975a7afc79cfbd33387f7f19f45df07
Author: Mark Thomas 
AuthorDate: Thu Feb 8 21:17:24 2024 +

Need for force GC to avoid duplicate clean-up (which triggers a crash)
---
 java/org/apache/catalina/core/AprLifecycleListener.java | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/java/org/apache/catalina/core/AprLifecycleListener.java 
b/java/org/apache/catalina/core/AprLifecycleListener.java
index 28bdee051b..ffcc694e6f 100644
--- a/java/org/apache/catalina/core/AprLifecycleListener.java
+++ b/java/org/apache/catalina/core/AprLifecycleListener.java
@@ -176,6 +176,8 @@ public class AprLifecycleListener implements 
LifecycleListener {
 
 private static void terminateAPR() {
 Library.terminatePrepare();
+// Need to force GC here as some components do APR clean-up in 
finalize()
+System.gc();
 aprInitialized = false;
 aprAvailable = false;
 fipsModeActive = false;


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) 03/05: Re-order so library isn't reported as running after it is terminated

2024-02-08 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit fb6a26893eb1bf2260d166f36771202c79b135a5
Author: Mark Thomas 
AuthorDate: Thu Feb 8 18:54:18 2024 +

Re-order so library isn't reported as running after it is terminated
---
 java/org/apache/catalina/core/AprLifecycleListener.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/catalina/core/AprLifecycleListener.java 
b/java/org/apache/catalina/core/AprLifecycleListener.java
index e510d0bdad..28bdee051b 100644
--- a/java/org/apache/catalina/core/AprLifecycleListener.java
+++ b/java/org/apache/catalina/core/AprLifecycleListener.java
@@ -176,11 +176,11 @@ public class AprLifecycleListener implements 
LifecycleListener {
 
 private static void terminateAPR() {
 Library.terminatePrepare();
-Library.terminate();
-aprAvailable = false;
 aprInitialized = false;
-sslInitialized = false; // Well we cleaned the pool in terminate.
+aprAvailable = false;
 fipsModeActive = false;
+sslInitialized = false; // Well we cleaned the pool in terminate.
+Library.terminate();
 }
 
 @SuppressWarnings("deprecation")


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) branch 8.5.x updated (06c434f327 -> 4471b2a549)

2024-02-08 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a change to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


from 06c434f327 No need for reflection here
 new b57631dd13 Preparatory work for APR/Native shutdown stability fix
 new 99a63ba6e5 Flag needs to be volatile
 new fb6a26893e Re-order so library isn't reported as running after it is 
terminated
 new 3d495c13f3 Reduce changes of crash on Library shutdown with OpenSSL 
connections
 new 4471b2a549 Need for force GC to avoid duplicate clean-up (which 
triggers a crash)

The 5 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:
 .../apache/catalina/core/AprLifecycleListener.java |  9 --
 java/org/apache/tomcat/jni/Library.java| 32 ++
 .../tomcat/util/net/openssl/OpenSSLContext.java|  3 +-
 test/org/apache/tomcat/util/net/TesterSupport.java |  1 +
 4 files changed, 36 insertions(+), 9 deletions(-)


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) branch main updated: Update changelog

2024-02-08 Thread markt
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 925516836a Update changelog
925516836a is described below

commit 925516836a8d38970a42d60879d6959e29053094
Author: Mark Thomas 
AuthorDate: Thu Feb 8 21:46:36 2024 +

Update changelog
---
 webapps/docs/changelog.xml | 4 
 1 file changed, 4 insertions(+)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 61c67f700d..5f742e45f5 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -171,6 +171,10 @@
 configured on SSLHostConfigCertificate instances. Based on
 pull request 673 provided by Hakan Altındağ. (markt)
   
+  
+Improve the Tomcat Native shutdown process to reduce the likelihood of 
a
+JVM crash during Tomcat shutdown. (markt)
+  
 
   
   


-
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: Update changelog

2024-02-08 Thread markt
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 7300705361 Update changelog
7300705361 is described below

commit 7300705361ce7d4f8929c19f7ad8878de8157d6b
Author: Mark Thomas 
AuthorDate: Thu Feb 8 21:46:36 2024 +

Update changelog
---
 webapps/docs/changelog.xml | 4 
 1 file changed, 4 insertions(+)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 1578011215..a4b6b2bdf3 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -156,6 +156,10 @@
 configured on SSLHostConfigCertificate instances. Based on
 pull request 673 provided by Hakan Altındağ. (markt)
   
+  
+Improve the Tomcat Native shutdown process to reduce the likelihood of 
a
+JVM crash during Tomcat shutdown. (markt)
+  
 
   
   


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) branch 8.5.x updated: Update changelog

2024-02-08 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new d1197ae75f Update changelog
d1197ae75f is described below

commit d1197ae75f077856eac93303440258bd8f60c392
Author: Mark Thomas 
AuthorDate: Thu Feb 8 21:46:36 2024 +

Update changelog
---
 webapps/docs/changelog.xml | 4 
 1 file changed, 4 insertions(+)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 1390508baf..d243122586 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -150,6 +150,10 @@
 configured on SSLHostConfigCertificate instances. Based on
 pull request 673 provided by Hakan Altındağ. (markt)
   
+  
+Improve the Tomcat Native shutdown process to reduce the likelihood of 
a
+JVM crash during Tomcat shutdown. (markt)
+  
 
   
   


-
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: Update changelog

2024-02-08 Thread markt
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 b9bc2e5234 Update changelog
b9bc2e5234 is described below

commit b9bc2e5234a3293144e59d1d9b405a9c984e0801
Author: Mark Thomas 
AuthorDate: Thu Feb 8 21:46:36 2024 +

Update changelog
---
 webapps/docs/changelog.xml | 4 
 1 file changed, 4 insertions(+)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 01a21ef39a..118a42eba2 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -160,6 +160,10 @@
 configured on SSLHostConfigCertificate instances. Based on
 pull request 673 provided by Hakan Altındağ. (markt)
   
+  
+Improve the Tomcat Native shutdown process to reduce the likelihood of 
a
+JVM crash during Tomcat shutdown. (markt)
+  
 
   
   


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: [VOTE] Release Apache Tomcat Native 1.3.0

2024-02-08 Thread Mark Thomas
Just a reminder that at least one more PMC vote is required for this 
VOTE to pass.


Mark


On 05/02/2024 20:43, Mark Thomas wrote:
This is the first release of the 1.3.x branch. The main differences 
compared to the 1.2.x branch are


- Minimum OpenSSL version of 1.1.1
- Minimum APR version of 1.6.3
- Minimum LibreSSL version of 3.5.2
- The windows binaries in this release have been built with OpenSSL
   3.0.13 and APR 1.7.4

The proposed release artifacts can be found at [1],
and the build was done using tag [2].

The Apache Tomcat Native 1.3.0 release is
  [ ] Stable, go ahead and release
  [ ] Broken because of ...

Thanks,

Mark


[1]
https://dist.apache.org/repos/dist/dev/tomcat/tomcat-connectors/native/1.3.0
[2] 
https://github.com/apache/tomcat-native/commit/998746966815e1ae105cba9f2681d37cc30249bc


-
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



Re: [VOTE] Release Apache Tomcat Native 1.3.0

2024-02-08 Thread Rémy Maucherat
On Mon, Feb 5, 2024 at 9:43 PM Mark Thomas  wrote:
>
> This is the first release of the 1.3.x branch. The main differences
> compared to the 1.2.x branch are
>
> - Minimum OpenSSL version of 1.1.1
> - Minimum APR version of 1.6.3
> - Minimum LibreSSL version of 3.5.2
> - The windows binaries in this release have been built with OpenSSL
>3.0.13 and APR 1.7.4
>
> The proposed release artifacts can be found at [1],
> and the build was done using tag [2].
>
> The Apache Tomcat Native 1.3.0 release is
>   [X] Stable, go ahead and release
>   [ ] Broken because of ...

Rémy

> Thanks,
>
> Mark
>
>
> [1]
> https://dist.apache.org/repos/dist/dev/tomcat/tomcat-connectors/native/1.3.0
> [2]
> https://github.com/apache/tomcat-native/commit/998746966815e1ae105cba9f2681d37cc30249bc
>
> -
> 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 68603] Request Context path and Query param gets replaced

2024-02-08 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=68603

Naresh  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|DUPLICATE   |---

--- Comment #2 from Naresh  ---
(In reply to Mark Thomas from comment #1)
> FORM authentication is REQUIRED to restore the original request after a
> successful authentication.
> 
> Please use the users mailing if you require assistance with using FORM
> authentication.
> 
> *** This bug has been marked as a duplicate of bug 68593 ***

I do understand...The case is different over here, the request ("/bill/login")
is from the same context("/bill") before and after login...
Take for example before login request URI is "/bill/login" with request body of
"leacsrf=c8b01130-3e28-4f29-b9e6-f9f54f3f2501".

Scenario is after authentication the current request URI(/bill/login) is
changed with "srf=c8b01130-3e28" and the request query param is changed to
"4f29-b9e6-f9f54f3f2501"

Is this the Intended flow... can you please let me know why the request URI is
changed with the content of the body which is not to be happened?

-- 
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



[Bug 68597] New: hannover messe

2024-02-08 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=68597

Bug ID: 68597
   Summary: hannover messe
   Product: Tomcat Connectors
   Version: unspecified
  Hardware: PC
Status: NEW
  Severity: normal
  Priority: P2
 Component: Common
  Assignee: dev@tomcat.apache.org
  Reporter: mahyarpiricryp...@gmail.com
  Target Milestone: ---

https://bhowco.de/exhibition-centers-in-germany/messe-hanover-center/hannover-messe/";>hannover
messe

-- 
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



[VOTE][RESULT] Release Apache Tomcat Native 2.0.7

2024-02-08 Thread Mark Thomas

The following votes were cast:

Binding:
+1: markt, schultz, remm

No other votes were cast.

The vote therefore passes.

Thanks to everyone who contributed to this release.

Mark


On 04/02/2024 20:42, Mark Thomas wrote:

The key differences of version 2.0.7 compared to 2.0.6 are:

- Align default pass phrase prompt with httpd on Windows
- The windows binaries in this release have been built with OpenSSL
   3.0.13 and APR 1.7.4

The 2.0.x branch is primarily intended for use with Tomcat 10.1.x 
onwards but can be used with earlier versions as long as the APR/native 
connector is not used.


The proposed release artifacts can be found at [1],
and the build was done using tag [2].

The Apache Tomcat Native 2.0.7 release is
  [ ] Stable, go ahead and release
  [ ] Broken because of ...

Thanks,

Mark


[1]
https://dist.apache.org/repos/dist/dev/tomcat/tomcat-connectors/native/2.0.7
[2] 
https://github.com/apache/tomcat-native/commit/feefd3b9cf9dc60063860c173c6d027125bac843


-
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



svn commit: r67244 - /dev/tomcat/tomcat-connectors/native/2.0.7/ /release/tomcat/tomcat-connectors/native/2.0.7/ /release/tomcat/tomcat-connectors/native/README.html

2024-02-08 Thread markt
Author: markt
Date: Thu Feb  8 09:25:48 2024
New Revision: 67244

Log:
Release Tomcat Native 2.0.7

Added:
release/tomcat/tomcat-connectors/native/2.0.7/
  - copied from r67243, dev/tomcat/tomcat-connectors/native/2.0.7/
Removed:
dev/tomcat/tomcat-connectors/native/2.0.7/
Modified:
release/tomcat/tomcat-connectors/native/README.html

Modified: release/tomcat/tomcat-connectors/native/README.html
==
--- release/tomcat/tomcat-connectors/native/README.html (original)
+++ release/tomcat/tomcat-connectors/native/README.html Thu Feb  8 09:25:48 2024
@@ -1,6 +1,6 @@
 The Apache Tomcat Native
 The latest releases are:
 
-1.2.38
-2.0.6
+1.2.39
+2.0.7
 



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) branch main updated: Fix string

2024-02-08 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm 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 0ff3f93c90 Fix string
0ff3f93c90 is described below

commit 0ff3f93c905164ecce7814845dd25a0b1e8facc1
Author: remm 
AuthorDate: Thu Feb 8 10:59:03 2024 +0100

Fix string
---
 java/org/apache/tomcat/websocket/LocalStrings.properties | 1 +
 java/org/apache/tomcat/websocket/Util.java   | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/tomcat/websocket/LocalStrings.properties 
b/java/org/apache/tomcat/websocket/LocalStrings.properties
index 03d95d39c8..317b3e48e4 100644
--- a/java/org/apache/tomcat/websocket/LocalStrings.properties
+++ b/java/org/apache/tomcat/websocket/LocalStrings.properties
@@ -53,6 +53,7 @@ perMessageDeflate.unknownParameter=An unknown extension 
parameter [{0}] was defi
 
 util.invalidMessageHandler=The message handler provided does not have an 
onMessage(Object) method
 util.invalidType=Unable to coerce value [{0}] to type [{1}]. That type is not 
supported.
+util.invalidValue=Value [{0}] contains delimiters
 util.notToken=An illegal extension parameter was specified with name [{0}] and 
value [{1}]
 util.unknownDecoderType=The Decoder type [{0}] is not recognized
 
diff --git a/java/org/apache/tomcat/websocket/Util.java 
b/java/org/apache/tomcat/websocket/Util.java
index 4aa51e305c..00e47b4698 100644
--- a/java/org/apache/tomcat/websocket/Util.java
+++ b/java/org/apache/tomcat/websocket/Util.java
@@ -506,7 +506,7 @@ public class Util {
 }
 if (value != null && (value.indexOf(',') > -1 || 
value.indexOf(';') > -1 || value.indexOf('\"') > -1 ||
 value.indexOf('=') > -1)) {
-throw new IllegalArgumentException(sm.getString("", 
value));
+throw new 
IllegalArgumentException(sm.getString("util.invalidValue", value));
 }
 extension.addParameter(new WsExtensionParameter(name, value));
 }


-
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: Fix string

2024-02-08 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm 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 7022729747 Fix string
7022729747 is described below

commit 7022729747702abb510eb386f755b0900d543ca8
Author: remm 
AuthorDate: Thu Feb 8 10:59:03 2024 +0100

Fix string
---
 java/org/apache/tomcat/websocket/LocalStrings.properties | 1 +
 java/org/apache/tomcat/websocket/Util.java   | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/tomcat/websocket/LocalStrings.properties 
b/java/org/apache/tomcat/websocket/LocalStrings.properties
index 32dd285bf7..a24e32610d 100644
--- a/java/org/apache/tomcat/websocket/LocalStrings.properties
+++ b/java/org/apache/tomcat/websocket/LocalStrings.properties
@@ -53,6 +53,7 @@ perMessageDeflate.unknownParameter=An unknown extension 
parameter [{0}] was defi
 
 util.invalidMessageHandler=The message handler provided does not have an 
onMessage(Object) method
 util.invalidType=Unable to coerce value [{0}] to type [{1}]. That type is not 
supported.
+util.invalidValue=Value [{0}] contains delimiters
 util.notToken=An illegal extension parameter was specified with name [{0}] and 
value [{1}]
 util.unknownDecoderType=The Decoder type [{0}] is not recognized
 
diff --git a/java/org/apache/tomcat/websocket/Util.java 
b/java/org/apache/tomcat/websocket/Util.java
index 4aa51e305c..00e47b4698 100644
--- a/java/org/apache/tomcat/websocket/Util.java
+++ b/java/org/apache/tomcat/websocket/Util.java
@@ -506,7 +506,7 @@ public class Util {
 }
 if (value != null && (value.indexOf(',') > -1 || 
value.indexOf(';') > -1 || value.indexOf('\"') > -1 ||
 value.indexOf('=') > -1)) {
-throw new IllegalArgumentException(sm.getString("", 
value));
+throw new 
IllegalArgumentException(sm.getString("util.invalidValue", value));
 }
 extension.addParameter(new WsExtensionParameter(name, value));
 }


-
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: Fix string

2024-02-08 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm 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 9696112d25 Fix string
9696112d25 is described below

commit 9696112d25b8a1fa78022931cf915910dbe7c3ca
Author: remm 
AuthorDate: Thu Feb 8 10:59:03 2024 +0100

Fix string
---
 java/org/apache/tomcat/websocket/LocalStrings.properties | 1 +
 java/org/apache/tomcat/websocket/Util.java   | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/tomcat/websocket/LocalStrings.properties 
b/java/org/apache/tomcat/websocket/LocalStrings.properties
index 47af443304..6113667aae 100644
--- a/java/org/apache/tomcat/websocket/LocalStrings.properties
+++ b/java/org/apache/tomcat/websocket/LocalStrings.properties
@@ -55,6 +55,7 @@ transformerFactory.unsupportedExtension=The extension [{0}] 
is not supported
 
 util.invalidMessageHandler=The message handler provided does not have an 
onMessage(Object) method
 util.invalidType=Unable to coerce value [{0}] to type [{1}]. That type is not 
supported.
+util.invalidValue=Value [{0}] contains delimiters
 util.notToken=An illegal extension parameter was specified with name [{0}] and 
value [{1}]
 util.unknownDecoderType=The Decoder type [{0}] is not recognized
 
diff --git a/java/org/apache/tomcat/websocket/Util.java 
b/java/org/apache/tomcat/websocket/Util.java
index 34d3ea815e..be26a1dc4a 100644
--- a/java/org/apache/tomcat/websocket/Util.java
+++ b/java/org/apache/tomcat/websocket/Util.java
@@ -523,7 +523,7 @@ public class Util {
 }
 if (value != null && (value.indexOf(',') > -1 || 
value.indexOf(';') > -1 || value.indexOf('\"') > -1 ||
 value.indexOf('=') > -1)) {
-throw new IllegalArgumentException(sm.getString("", 
value));
+throw new 
IllegalArgumentException(sm.getString("util.invalidValue", value));
 }
 extension.addParameter(new WsExtensionParameter(name, value));
 }


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) branch 8.5.x updated: Fix string

2024-02-08 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new b8baad9dce Fix string
b8baad9dce is described below

commit b8baad9dcedcbe7549e1347b6c41d95d5b2fbebe
Author: remm 
AuthorDate: Thu Feb 8 10:59:03 2024 +0100

Fix string
---
 java/org/apache/tomcat/websocket/LocalStrings.properties | 1 +
 java/org/apache/tomcat/websocket/Util.java   | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/tomcat/websocket/LocalStrings.properties 
b/java/org/apache/tomcat/websocket/LocalStrings.properties
index 47af443304..6113667aae 100644
--- a/java/org/apache/tomcat/websocket/LocalStrings.properties
+++ b/java/org/apache/tomcat/websocket/LocalStrings.properties
@@ -55,6 +55,7 @@ transformerFactory.unsupportedExtension=The extension [{0}] 
is not supported
 
 util.invalidMessageHandler=The message handler provided does not have an 
onMessage(Object) method
 util.invalidType=Unable to coerce value [{0}] to type [{1}]. That type is not 
supported.
+util.invalidValue=Value [{0}] contains delimiters
 util.notToken=An illegal extension parameter was specified with name [{0}] and 
value [{1}]
 util.unknownDecoderType=The Decoder type [{0}] is not recognized
 
diff --git a/java/org/apache/tomcat/websocket/Util.java 
b/java/org/apache/tomcat/websocket/Util.java
index 34d3ea815e..be26a1dc4a 100644
--- a/java/org/apache/tomcat/websocket/Util.java
+++ b/java/org/apache/tomcat/websocket/Util.java
@@ -523,7 +523,7 @@ public class Util {
 }
 if (value != null && (value.indexOf(',') > -1 || 
value.indexOf(';') > -1 || value.indexOf('\"') > -1 ||
 value.indexOf('=') > -1)) {
-throw new IllegalArgumentException(sm.getString("", 
value));
+throw new 
IllegalArgumentException(sm.getString("util.invalidValue", value));
 }
 extension.addParameter(new WsExtensionParameter(name, value));
 }


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1915640 - in /tomcat/site/trunk: docs/download-native.html docs/index.html docs/oldnews.html xdocs/download-native.xml xdocs/index.xml xdocs/oldnews.xml

2024-02-08 Thread markt
Author: markt
Date: Thu Feb  8 10:06:33 2024
New Revision: 1915640

URL: http://svn.apache.org/viewvc?rev=1915640&view=rev
Log:
Update site for Tomcat Native 2.0.7

Modified:
tomcat/site/trunk/docs/download-native.html
tomcat/site/trunk/docs/index.html
tomcat/site/trunk/docs/oldnews.html
tomcat/site/trunk/xdocs/download-native.xml
tomcat/site/trunk/xdocs/index.xml
tomcat/site/trunk/xdocs/oldnews.xml

Modified: tomcat/site/trunk/docs/download-native.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/download-native.html?rev=1915640&r1=1915639&r2=1915640&view=diff
==
--- tomcat/site/trunk/docs/download-native.html (original)
+++ tomcat/site/trunk/docs/download-native.html Thu Feb  8 10:06:33 2024
@@ -10,7 +10,7 @@
   archive download site.
 Quick Navigation
   
-[define v]2.0.6[end]
+[define v]2.0.7[end]
 [define w]1.2.39[end]
 [define y]3.0.11[end]
   https://downloads.apache.org/tomcat/tomcat-connectors/KEYS";>KEYS |

Modified: tomcat/site/trunk/docs/index.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/index.html?rev=1915640&r1=1915639&r2=1915640&view=diff
==
--- tomcat/site/trunk/docs/index.html (original)
+++ tomcat/site/trunk/docs/index.html Thu Feb  8 10:06:33 2024
@@ -34,6 +34,20 @@ wiki page.
 Apache Tomcat, Tomcat, Apache, the Apache feather, and the Apache Tomcat
 project logo are trademarks of the Apache Software Foundation.
 
+2024-02-08 Tomcat Native 2.0.7 Released
+
+The Apache Tomcat Project is proud to announce the release of version 2.0.7 of
+Tomcat Native. The notable changes compared to 2.0.6 include:
+
+
+Align default pass phrase prompt with httpd on Windows
+The windows binaries in this release have been built with OpenSSL
+3.0.13 
+
+
+https://tomcat.apache.org/download-native.cgi";>Download |
+Change log for 2.0.5
+
 2024-02-06 Tomcat Migration Tool for Jakarta EE 1.0.8 
Released
 
 The Apache Tomcat Project is proud to announce the release of 1.0.8 of the
@@ -194,21 +208,6 @@ Tomcat Native. The notable changes since
 https://tomcat.apache.org/download-native.cgi";>Download |
 Change log for 1.2.39
 
-2023-10-02 Tomcat Native 2.0.6 Released
-
-The Apache Tomcat Project is proud to announce the release of version 2.0.6 of
-Tomcat Native. The notable changes compared to 2.0.5 include:
-
-
-Disable OCSP if the insecure optionalNoCA certificate verification option 
is
-used
-The windows binaries in this release have been built with OpenSSL
-3.0.11 
-
-
-https://tomcat.apache.org/download-native.cgi";>Download |
-Change log for 2.0.5
-
 2023-09-12 Tomcat Connectors 1.2.49 Released
 
 The Apache Tomcat Project is proud to announce the release of version 1.2.49 of

Modified: tomcat/site/trunk/docs/oldnews.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/oldnews.html?rev=1915640&r1=1915639&r2=1915640&view=diff
==
--- tomcat/site/trunk/docs/oldnews.html (original)
+++ tomcat/site/trunk/docs/oldnews.html Thu Feb  8 10:06:33 2024
@@ -543,6 +543,21 @@ with Connector configurations when 
 https://tomcat.apache.org/download-11.cgi";>Download
 
+2023-10-02 Tomcat Native 2.0.6 Released
+
+The Apache Tomcat Project is proud to announce the release of version 2.0.6 of
+Tomcat Native. The notable changes compared to 2.0.5 include:
+
+
+Disable OCSP if the insecure optionalNoCA certificate verification option 
is
+used
+The windows binaries in this release have been built with OpenSSL
+3.0.11 
+
+
+https://tomcat.apache.org/download-native.cgi";>Download |
+Change log for 2.0.5
+
 2023-08-25 Tomcat 10.1.13 Released
 
 The Apache Tomcat Project is proud to announce the release of version 10.1.13

Modified: tomcat/site/trunk/xdocs/download-native.xml
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/download-native.xml?rev=1915640&r1=1915639&r2=1915640&view=diff
==
--- tomcat/site/trunk/xdocs/download-native.xml (original)
+++ tomcat/site/trunk/xdocs/download-native.xml Thu Feb  8 10:06:33 2024
@@ -22,7 +22,7 @@
 Define variables to hold the current version numbers.
 Documentation for ezt.py: https://code.google.com/p/ezt/wiki/Syntax
   -->
-[define v]2.0.6[end]
+[define v]2.0.7[end]
 [define w]1.2.39[end]
 [define y]3.0.11[end]
   https://downloads.apache.org/tomcat/tomcat-connectors/KEYS";>KEYS |

Modified: tomcat/site/trunk/xdocs/index.xml
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/index.xml?rev=1915640&r1=1915639&r2=1915640&view=diff
==
--- tomcat/site/trunk/xdocs/index.xml (original)
+++ tomcat/site/trunk/xdocs/index.xml Thu Feb  8 10:06:33 2024
@@ -55,6 +55,22 @@ project logo are

(tomcat) branch 10.1.x updated: Update Tomcat Native to 2.0.7

2024-02-08 Thread markt
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 b3a8fcbda7 Update Tomcat Native to 2.0.7
b3a8fcbda7 is described below

commit b3a8fcbda74e4f2590da6312c0ce5c24d75b111d
Author: Mark Thomas 
AuthorDate: Thu Feb 8 10:16:07 2024 +

Update Tomcat Native to 2.0.7
---
 build.properties.default   | 8 
 webapps/docs/changelog.xml | 3 +++
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/build.properties.default b/build.properties.default
index 5054a8a65b..26f40f9b6d 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -160,14 +160,14 @@ 
jdt.loc.1=http://archive.eclipse.org/eclipse/downloads/drops4/${jdt.release}/ecj
 
jdt.loc.2=http://download.eclipse.org/eclipse/downloads/drops4/${jdt.release}/ecj-${jdt.version}.jar
 
 # - Tomcat native library -
-tomcat-native.version=2.0.6
-tomcat-native-openssl.version=3.0.11
+tomcat-native.version=2.0.7
+tomcat-native-openssl.version=3.0.13
 tomcat-native.src.checksum.enabled=true
 tomcat-native.src.checksum.algorithm=SHA-512
-tomcat-native.src.checksum.value=d714fb96f880d0d565c58d25bb803fa9a144a6d87e825ad8d00aeac833b40a5512f888b94b3109853f8ee28b176b24fde95fb2d2a70ce65181a51ca7fc60cdab
+tomcat-native.src.checksum.value=625b334271494f7c86c06d6a8c6d13c06d9d6094f65cccbdc8d3df13ee2aae4cb42ad326e20bcbf8a8f141240111778991882f9bf87793b09a2920433d6c8c85
 tomcat-native.win.checksum.enabled=true
 tomcat-native.win.checksum.algorithm=SHA-512
-tomcat-native.win.checksum.value=f45083d2148d6f17549eba395f6ac4f25f4ffc5cdd45a99d25bef89aee9395d1f913c3fcc27689648c13c298a86083ad7df49311fc3178cbadfa3c2d97b0dc38
+tomcat-native.win.checksum.value=7486ac1587bbd2871eb84a4a393fc5f1e72918612a35272b4375cc8b92ccab5adf4506cd16eb0165e654152f979f45ca1de5a72dc57531c57ffd0f859694c36b
 tomcat-native.home=${base.path}/tomcat-native-${tomcat-native.version}
 tomcat-native.tar.gz=${tomcat-native.home}/tomcat-native.tar.gz
 
tomcat-native.loc.1=${base-tomcat.loc.1}/tomcat-connectors/native/${tomcat-native.version}/source/tomcat-native-${tomcat-native.version}-src.tar.gz
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 427dff9cfd..c9c87206cd 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -200,6 +200,9 @@
 Update the packaged version of the Tomcat Migration Tool for Jakarta EE
 to 1.0.7. (markt)
   
+  
+Update Tomcat Native to 2.0.7. (markt)
+  
 
   
 


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) branch main updated: Update Tomcat Native to 2.0.7

2024-02-08 Thread markt
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 d4eaa0c697 Update Tomcat Native to 2.0.7
d4eaa0c697 is described below

commit d4eaa0c69734568f07b4c9b7c35c973f380572d6
Author: Mark Thomas 
AuthorDate: Thu Feb 8 10:16:07 2024 +

Update Tomcat Native to 2.0.7
---
 build.properties.default   | 8 
 webapps/docs/changelog.xml | 3 +++
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/build.properties.default b/build.properties.default
index dd326dc16f..116b38229e 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -139,14 +139,14 @@ 
jdt.loc.1=http://archive.eclipse.org/eclipse/downloads/drops4/${jdt.release}/ecj
 
jdt.loc.2=http://download.eclipse.org/eclipse/downloads/drops4/${jdt.release}/ecj-${jdt.version}.jar
 
 # - Tomcat native library -
-tomcat-native.version=2.0.6
-tomcat-native-openssl.version=3.0.11
+tomcat-native.version=2.0.7
+tomcat-native-openssl.version=3.0.13
 tomcat-native.src.checksum.enabled=true
 tomcat-native.src.checksum.algorithm=SHA-512
-tomcat-native.src.checksum.value=d714fb96f880d0d565c58d25bb803fa9a144a6d87e825ad8d00aeac833b40a5512f888b94b3109853f8ee28b176b24fde95fb2d2a70ce65181a51ca7fc60cdab
+tomcat-native.src.checksum.value=625b334271494f7c86c06d6a8c6d13c06d9d6094f65cccbdc8d3df13ee2aae4cb42ad326e20bcbf8a8f141240111778991882f9bf87793b09a2920433d6c8c85
 tomcat-native.win.checksum.enabled=true
 tomcat-native.win.checksum.algorithm=SHA-512
-tomcat-native.win.checksum.value=f45083d2148d6f17549eba395f6ac4f25f4ffc5cdd45a99d25bef89aee9395d1f913c3fcc27689648c13c298a86083ad7df49311fc3178cbadfa3c2d97b0dc38
+tomcat-native.win.checksum.value=7486ac1587bbd2871eb84a4a393fc5f1e72918612a35272b4375cc8b92ccab5adf4506cd16eb0165e654152f979f45ca1de5a72dc57531c57ffd0f859694c36b
 tomcat-native.home=${base.path}/tomcat-native-${tomcat-native.version}
 tomcat-native.tar.gz=${tomcat-native.home}/tomcat-native.tar.gz
 
tomcat-native.loc.1=${base-tomcat.loc.1}/tomcat-connectors/native/${tomcat-native.version}/source/tomcat-native-${tomcat-native.version}-src.tar.gz
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index f5b2319f59..4521e6c419 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -215,6 +215,9 @@
 Update the packaged version of the Tomcat Migration Tool for Jakarta EE
 to 1.0.7. (markt)
   
+  
+Update Tomcat Native to 2.0.7. (markt)
+  
 
   
 


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) branch main updated: Add missing strings

2024-02-08 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm 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 413fe6eec3 Add missing strings
413fe6eec3 is described below

commit 413fe6eec34f9e9c57f56867fac9098465e8c670
Author: remm 
AuthorDate: Thu Feb 8 11:45:33 2024 +0100

Add missing strings
---
 java/org/apache/catalina/filters/CsrfPreventionFilter.java |  3 ++-
 java/org/apache/catalina/filters/LocalStrings.properties   |  1 +
 java/org/apache/catalina/valves/FilterValve.java   | 14 ++
 java/org/apache/catalina/valves/LocalStrings.properties|  6 ++
 java/org/apache/tomcat/util/codec/binary/BaseNCodec.java   |  2 +-
 .../tomcat/util/codec/binary/LocalStrings.properties   |  2 ++
 6 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/java/org/apache/catalina/filters/CsrfPreventionFilter.java 
b/java/org/apache/catalina/filters/CsrfPreventionFilter.java
index 2d65bb3544..9d4639c2bf 100644
--- a/java/org/apache/catalina/filters/CsrfPreventionFilter.java
+++ b/java/org/apache/catalina/filters/CsrfPreventionFilter.java
@@ -70,6 +70,7 @@ import org.apache.juli.logging.LogFactory;
  *   Some URLs should not have nonce parameters added to them at all
  */
 public class CsrfPreventionFilter extends CsrfPreventionFilterBase {
+
 /**
  * The default set of URL patterns for which nonces will not be appended.
  */
@@ -240,7 +241,7 @@ public class CsrfPreventionFilter extends 
CsrfPreventionFilterBase {
 } else if (pattern.startsWith("/") && pattern.endsWith("/")) {
 return new PatternPredicate(pattern.substring(1, pattern.length() 
- 1));
 } else {
-throw new IllegalArgumentException("Unsupported pattern: " + 
pattern);
+throw new 
IllegalArgumentException(sm.getString("csrfPrevention.unsupportedPattern", 
pattern));
 }
 }
 
diff --git a/java/org/apache/catalina/filters/LocalStrings.properties 
b/java/org/apache/catalina/filters/LocalStrings.properties
index e7766c74d3..5c5da1559e 100644
--- a/java/org/apache/catalina/filters/LocalStrings.properties
+++ b/java/org/apache/catalina/filters/LocalStrings.properties
@@ -24,6 +24,7 @@ corsFilter.wrongType1=Expects an HttpServletRequest object of 
type [{0}]
 corsFilter.wrongType2=Expects an HttpServletRequest object of type [{0}] or 
[{1}]
 
 csrfPrevention.invalidRandomClass=Unable to create Random source using class 
[{0}]
+csrfPrevention.unsupportedPattern=Unsupported pattern [{0}]
 
 expiresFilter.exceptionProcessingParameter=Exception processing configuration 
parameter [{0}]:[{1}]
 expiresFilter.expirationHeaderAlreadyDefined=Request [{0}] with response 
status [{1}] content-type [{2}], expiration header already defined
diff --git a/java/org/apache/catalina/valves/FilterValve.java 
b/java/org/apache/catalina/valves/FilterValve.java
index 4405106d31..f110f05274 100644
--- a/java/org/apache/catalina/valves/FilterValve.java
+++ b/java/org/apache/catalina/valves/FilterValve.java
@@ -141,8 +141,7 @@ public class FilterValve extends ValveBase implements 
FilterConfig {
 @Override
 public ServletContext getServletContext() {
 if (null == application) {
-throw new IllegalStateException("Filter " + filter +
-" has called getServletContext from FilterValve, but this 
FilterValve is not ");
+throw new 
IllegalStateException(sm.getString("filterValve.noContext", 
getFilterClassName()));
 } else {
 return application;
 }
@@ -184,7 +183,7 @@ public class FilterValve extends ValveBase implements 
FilterConfig {
 super.startInternal();
 
 if (null == getFilterClassName()) {
-throw new LifecycleException("No filterClass specified for 
FilterValve: a filterClass is required");
+throw new 
LifecycleException(sm.getString("filterValve.nullFilterClassName"));
 }
 Container parent = super.getContainer();
 if (parent instanceof Context) {
@@ -202,8 +201,7 @@ public class FilterValve extends ValveBase implements 
FilterConfig {
 
ScheduledThreadPoolExecutor.class.getName().equals(args[0])) {
 return executor;
 } else {
-throw new UnsupportedOperationException(
-"This ServletContext is not really 
meant to be used.");
+throw new 
UnsupportedOperationException(sm.getString("filterValve.proxyServletContext"));
 }
 }
 });
@@ -215,7 +213,7 @@ public class FilterValve extends ValveBase implements 
FilterConfig {
 filter.init(this);
 } catch (ServletException | InstantiationException | 
IllegalAccessExcept

(tomcat) branch 10.1.x updated: Add missing strings

2024-02-08 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm 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 706070a58c Add missing strings
706070a58c is described below

commit 706070a58c873b16ba20f74a53b93b297e1241cf
Author: remm 
AuthorDate: Thu Feb 8 11:45:33 2024 +0100

Add missing strings
---
 java/org/apache/catalina/filters/CsrfPreventionFilter.java   | 3 ++-
 java/org/apache/catalina/filters/LocalStrings.properties | 1 +
 java/org/apache/tomcat/util/codec/binary/BaseNCodec.java | 2 +-
 java/org/apache/tomcat/util/codec/binary/LocalStrings.properties | 2 ++
 4 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/filters/CsrfPreventionFilter.java 
b/java/org/apache/catalina/filters/CsrfPreventionFilter.java
index 2d65bb3544..9d4639c2bf 100644
--- a/java/org/apache/catalina/filters/CsrfPreventionFilter.java
+++ b/java/org/apache/catalina/filters/CsrfPreventionFilter.java
@@ -70,6 +70,7 @@ import org.apache.juli.logging.LogFactory;
  *   Some URLs should not have nonce parameters added to them at all
  */
 public class CsrfPreventionFilter extends CsrfPreventionFilterBase {
+
 /**
  * The default set of URL patterns for which nonces will not be appended.
  */
@@ -240,7 +241,7 @@ public class CsrfPreventionFilter extends 
CsrfPreventionFilterBase {
 } else if (pattern.startsWith("/") && pattern.endsWith("/")) {
 return new PatternPredicate(pattern.substring(1, pattern.length() 
- 1));
 } else {
-throw new IllegalArgumentException("Unsupported pattern: " + 
pattern);
+throw new 
IllegalArgumentException(sm.getString("csrfPrevention.unsupportedPattern", 
pattern));
 }
 }
 
diff --git a/java/org/apache/catalina/filters/LocalStrings.properties 
b/java/org/apache/catalina/filters/LocalStrings.properties
index e7766c74d3..5c5da1559e 100644
--- a/java/org/apache/catalina/filters/LocalStrings.properties
+++ b/java/org/apache/catalina/filters/LocalStrings.properties
@@ -24,6 +24,7 @@ corsFilter.wrongType1=Expects an HttpServletRequest object of 
type [{0}]
 corsFilter.wrongType2=Expects an HttpServletRequest object of type [{0}] or 
[{1}]
 
 csrfPrevention.invalidRandomClass=Unable to create Random source using class 
[{0}]
+csrfPrevention.unsupportedPattern=Unsupported pattern [{0}]
 
 expiresFilter.exceptionProcessingParameter=Exception processing configuration 
parameter [{0}]:[{1}]
 expiresFilter.expirationHeaderAlreadyDefined=Request [{0}] with response 
status [{1}] content-type [{2}], expiration header already defined
diff --git a/java/org/apache/tomcat/util/codec/binary/BaseNCodec.java 
b/java/org/apache/tomcat/util/codec/binary/BaseNCodec.java
index 3575c992a8..7c7bf17fa5 100644
--- a/java/org/apache/tomcat/util/codec/binary/BaseNCodec.java
+++ b/java/org/apache/tomcat/util/codec/binary/BaseNCodec.java
@@ -160,7 +160,7 @@ public abstract class BaseNCodec {
 private static int createPositiveCapacity(final int minCapacity) {
 if (minCapacity < 0) {
 // overflow
-throw new OutOfMemoryError("Unable to allocate array size: " + 
(minCapacity & 0xL));
+throw new OutOfMemoryError(sm.getString("base64.outOfMemory", 
Long.valueOf(minCapacity & 0xL)));
 }
 // This is called when we require buffer expansion to a very big array.
 // Use the conservative maximum buffer size if possible, otherwise the 
biggest required.
diff --git a/java/org/apache/tomcat/util/codec/binary/LocalStrings.properties 
b/java/org/apache/tomcat/util/codec/binary/LocalStrings.properties
index 1ae86a32fb..6b17260a15 100644
--- a/java/org/apache/tomcat/util/codec/binary/LocalStrings.properties
+++ b/java/org/apache/tomcat/util/codec/binary/LocalStrings.properties
@@ -17,3 +17,5 @@ base64.impossibleModulus=Impossible modulus [{0}]
 base64.inputTooLarge=Input array too large, the output array would be bigger 
[{0}] than the specified maximum size of [{1}]
 base64.lineSeparator=Line separator must not contain base64 characters [{0}]
 base64.nullEncodeParameter=Cannot encode integer with null parameter
+
+base64.outOfMemory=Unable to allocate array size [{0}]


-
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: Add missing strings

2024-02-08 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm 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 73fbbba5b1 Add missing strings
73fbbba5b1 is described below

commit 73fbbba5b15aa4a5ed12028f40456fe06d147c4e
Author: remm 
AuthorDate: Thu Feb 8 11:45:33 2024 +0100

Add missing strings
---
 java/org/apache/catalina/filters/CsrfPreventionFilter.java   | 3 ++-
 java/org/apache/catalina/filters/LocalStrings.properties | 1 +
 java/org/apache/tomcat/util/codec/binary/BaseNCodec.java | 2 +-
 java/org/apache/tomcat/util/codec/binary/LocalStrings.properties | 2 ++
 4 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/filters/CsrfPreventionFilter.java 
b/java/org/apache/catalina/filters/CsrfPreventionFilter.java
index 4cdc3aafc7..2fe4e618aa 100644
--- a/java/org/apache/catalina/filters/CsrfPreventionFilter.java
+++ b/java/org/apache/catalina/filters/CsrfPreventionFilter.java
@@ -70,6 +70,7 @@ import org.apache.juli.logging.LogFactory;
  *   Some URLs should not have nonce parameters added to them at all
  */
 public class CsrfPreventionFilter extends CsrfPreventionFilterBase {
+
 /**
  * The default set of URL patterns for which nonces will not be appended.
  */
@@ -240,7 +241,7 @@ public class CsrfPreventionFilter extends 
CsrfPreventionFilterBase {
 } else if (pattern.startsWith("/") && pattern.endsWith("/")) {
 return new PatternPredicate(pattern.substring(1, pattern.length() 
- 1));
 } else {
-throw new IllegalArgumentException("Unsupported pattern: " + 
pattern);
+throw new 
IllegalArgumentException(sm.getString("csrfPrevention.unsupportedPattern", 
pattern));
 }
 }
 
diff --git a/java/org/apache/catalina/filters/LocalStrings.properties 
b/java/org/apache/catalina/filters/LocalStrings.properties
index e7766c74d3..5c5da1559e 100644
--- a/java/org/apache/catalina/filters/LocalStrings.properties
+++ b/java/org/apache/catalina/filters/LocalStrings.properties
@@ -24,6 +24,7 @@ corsFilter.wrongType1=Expects an HttpServletRequest object of 
type [{0}]
 corsFilter.wrongType2=Expects an HttpServletRequest object of type [{0}] or 
[{1}]
 
 csrfPrevention.invalidRandomClass=Unable to create Random source using class 
[{0}]
+csrfPrevention.unsupportedPattern=Unsupported pattern [{0}]
 
 expiresFilter.exceptionProcessingParameter=Exception processing configuration 
parameter [{0}]:[{1}]
 expiresFilter.expirationHeaderAlreadyDefined=Request [{0}] with response 
status [{1}] content-type [{2}], expiration header already defined
diff --git a/java/org/apache/tomcat/util/codec/binary/BaseNCodec.java 
b/java/org/apache/tomcat/util/codec/binary/BaseNCodec.java
index 32eaa33e5b..80ebaeb288 100644
--- a/java/org/apache/tomcat/util/codec/binary/BaseNCodec.java
+++ b/java/org/apache/tomcat/util/codec/binary/BaseNCodec.java
@@ -172,7 +172,7 @@ public abstract class BaseNCodec {
 private static int createPositiveCapacity(final int minCapacity) {
 if (minCapacity < 0) {
 // overflow
-throw new OutOfMemoryError("Unable to allocate array size: " + 
(minCapacity & 0xL));
+throw new OutOfMemoryError(sm.getString("base64.outOfMemory", 
Long.valueOf(minCapacity & 0xL)));
 }
 // This is called when we require buffer expansion to a very big array.
 // Use the conservative maximum buffer size if possible, otherwise the 
biggest required.
diff --git a/java/org/apache/tomcat/util/codec/binary/LocalStrings.properties 
b/java/org/apache/tomcat/util/codec/binary/LocalStrings.properties
index 1ae86a32fb..6b17260a15 100644
--- a/java/org/apache/tomcat/util/codec/binary/LocalStrings.properties
+++ b/java/org/apache/tomcat/util/codec/binary/LocalStrings.properties
@@ -17,3 +17,5 @@ base64.impossibleModulus=Impossible modulus [{0}]
 base64.inputTooLarge=Input array too large, the output array would be bigger 
[{0}] than the specified maximum size of [{1}]
 base64.lineSeparator=Line separator must not contain base64 characters [{0}]
 base64.nullEncodeParameter=Cannot encode integer with null parameter
+
+base64.outOfMemory=Unable to allocate array size [{0}]


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) branch 8.5.x updated: Add missing strings

2024-02-08 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new bc7f4d4be6 Add missing strings
bc7f4d4be6 is described below

commit bc7f4d4be6efd4a90f298cc0278feb3680de9404
Author: remm 
AuthorDate: Thu Feb 8 11:45:33 2024 +0100

Add missing strings
---
 java/org/apache/catalina/filters/CsrfPreventionFilter.java   | 3 ++-
 java/org/apache/catalina/filters/LocalStrings.properties | 1 +
 java/org/apache/tomcat/util/codec/binary/BaseNCodec.java | 2 +-
 java/org/apache/tomcat/util/codec/binary/LocalStrings.properties | 2 ++
 4 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/filters/CsrfPreventionFilter.java 
b/java/org/apache/catalina/filters/CsrfPreventionFilter.java
index 9958c9ac9b..6640c1c3a5 100644
--- a/java/org/apache/catalina/filters/CsrfPreventionFilter.java
+++ b/java/org/apache/catalina/filters/CsrfPreventionFilter.java
@@ -69,6 +69,7 @@ import org.apache.juli.logging.LogFactory;
  *   Some URLs should not have nonce parameters added to them at all
  */
 public class CsrfPreventionFilter extends CsrfPreventionFilterBase {
+
 /**
  * The default set of URL patterns for which nonces will not be appended.
  */
@@ -244,7 +245,7 @@ public class CsrfPreventionFilter extends 
CsrfPreventionFilterBase {
 } else if (pattern.startsWith("/") && pattern.endsWith("/")) {
 return new PatternPredicate(pattern.substring(1, pattern.length() 
- 1));
 } else {
-throw new IllegalArgumentException("Unsupported pattern: " + 
pattern);
+throw new 
IllegalArgumentException(sm.getString("csrfPrevention.unsupportedPattern", 
pattern));
 }
 }
 
diff --git a/java/org/apache/catalina/filters/LocalStrings.properties 
b/java/org/apache/catalina/filters/LocalStrings.properties
index e7766c74d3..5c5da1559e 100644
--- a/java/org/apache/catalina/filters/LocalStrings.properties
+++ b/java/org/apache/catalina/filters/LocalStrings.properties
@@ -24,6 +24,7 @@ corsFilter.wrongType1=Expects an HttpServletRequest object of 
type [{0}]
 corsFilter.wrongType2=Expects an HttpServletRequest object of type [{0}] or 
[{1}]
 
 csrfPrevention.invalidRandomClass=Unable to create Random source using class 
[{0}]
+csrfPrevention.unsupportedPattern=Unsupported pattern [{0}]
 
 expiresFilter.exceptionProcessingParameter=Exception processing configuration 
parameter [{0}]:[{1}]
 expiresFilter.expirationHeaderAlreadyDefined=Request [{0}] with response 
status [{1}] content-type [{2}], expiration header already defined
diff --git a/java/org/apache/tomcat/util/codec/binary/BaseNCodec.java 
b/java/org/apache/tomcat/util/codec/binary/BaseNCodec.java
index 51e3792e0e..8030c9aa08 100644
--- a/java/org/apache/tomcat/util/codec/binary/BaseNCodec.java
+++ b/java/org/apache/tomcat/util/codec/binary/BaseNCodec.java
@@ -194,7 +194,7 @@ public abstract class BaseNCodec implements BinaryEncoder, 
BinaryDecoder {
 private static int createPositiveCapacity(final int minCapacity) {
 if (minCapacity < 0) {
 // overflow
-throw new OutOfMemoryError("Unable to allocate array size: " + 
(minCapacity & 0xL));
+throw new OutOfMemoryError(sm.getString("base64.outOfMemory", 
Long.valueOf(minCapacity & 0xL)));
 }
 // This is called when we require buffer expansion to a very big array.
 // Use the conservative maximum buffer size if possible, otherwise the 
biggest required.
diff --git a/java/org/apache/tomcat/util/codec/binary/LocalStrings.properties 
b/java/org/apache/tomcat/util/codec/binary/LocalStrings.properties
index 1ae86a32fb..6b17260a15 100644
--- a/java/org/apache/tomcat/util/codec/binary/LocalStrings.properties
+++ b/java/org/apache/tomcat/util/codec/binary/LocalStrings.properties
@@ -17,3 +17,5 @@ base64.impossibleModulus=Impossible modulus [{0}]
 base64.inputTooLarge=Input array too large, the output array would be bigger 
[{0}] than the specified maximum size of [{1}]
 base64.lineSeparator=Line separator must not contain base64 characters [{0}]
 base64.nullEncodeParameter=Cannot encode integer with null parameter
+
+base64.outOfMemory=Unable to allocate array size [{0}]


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Buildbot failure in on tomcat-11.0.x

2024-02-08 Thread buildbot
Build status: BUILD FAILED: failed compile (failure)
Worker used: bb_worker2_ubuntu
URL: https://ci2.apache.org/#builders/112/builds/911
Blamelist: Mark Thomas , remm 
Build Text: failed compile (failure)
Status Detected: new failure
Build Source Stamp: [branch main] 413fe6eec34f9e9c57f56867fac9098465e8c670


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: 2


-- ASF Buildbot


-
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

2024-02-08 Thread buildbot
Build status: BUILD FAILED: failed compile (failure)
Worker used: bb_worker2_ubuntu
URL: https://ci2.apache.org/#builders/44/builds/1137
Blamelist: Mark Thomas , remm 
Build Text: failed compile (failure)
Status Detected: new failure
Build Source Stamp: [branch 10.1.x] 706070a58c873b16ba20f74a53b93b297e1241cf


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



Re: [VOTE][RESULT] Release Apache Tomcat Native 2.0.7

2024-02-08 Thread Mark Thomas
The source is OK but the convenience binary needs to be re-packaged. I 
think the DLL name changed which meant the correct files weren't picked up.


Since we aren't changing the source or the tag, I don't think we need a 
new release but I'll confirm that once I figure out exactly where things 
went wrong.


Mark


On 08/02/2024 09:23, Mark Thomas wrote:

The following votes were cast:

Binding:
+1: markt, schultz, remm

No other votes were cast.

The vote therefore passes.

Thanks to everyone who contributed to this release.

Mark


On 04/02/2024 20:42, Mark Thomas wrote:

The key differences of version 2.0.7 compared to 2.0.6 are:

- Align default pass phrase prompt with httpd on Windows
- The windows binaries in this release have been built with OpenSSL
   3.0.13 and APR 1.7.4

The 2.0.x branch is primarily intended for use with Tomcat 10.1.x 
onwards but can be used with earlier versions as long as the 
APR/native connector is not used.


The proposed release artifacts can be found at [1],
and the build was done using tag [2].

The Apache Tomcat Native 2.0.7 release is
  [ ] Stable, go ahead and release
  [ ] Broken because of ...

Thanks,

Mark


[1]
https://dist.apache.org/repos/dist/dev/tomcat/tomcat-connectors/native/2.0.7
[2] 
https://github.com/apache/tomcat-native/commit/feefd3b9cf9dc60063860c173c6d027125bac843


-
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



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r67248 - /release/tomcat/tomcat-connectors/native/2.0.7/binaries/

2024-02-08 Thread markt
Author: markt
Date: Thu Feb  8 12:14:22 2024
New Revision: 67248

Log:
Fix convenience binaries - add missing files

Modified:

release/tomcat/tomcat-connectors/native/2.0.7/binaries/tomcat-native-2.0.7-openssl-3.0.13-ocsp-win32-bin.zip

release/tomcat/tomcat-connectors/native/2.0.7/binaries/tomcat-native-2.0.7-openssl-3.0.13-ocsp-win32-bin.zip.asc

release/tomcat/tomcat-connectors/native/2.0.7/binaries/tomcat-native-2.0.7-openssl-3.0.13-ocsp-win32-bin.zip.sha512

release/tomcat/tomcat-connectors/native/2.0.7/binaries/tomcat-native-2.0.7-openssl-3.0.13-win32-bin.zip

release/tomcat/tomcat-connectors/native/2.0.7/binaries/tomcat-native-2.0.7-openssl-3.0.13-win32-bin.zip.asc

release/tomcat/tomcat-connectors/native/2.0.7/binaries/tomcat-native-2.0.7-openssl-3.0.13-win32-bin.zip.sha512

Modified: 
release/tomcat/tomcat-connectors/native/2.0.7/binaries/tomcat-native-2.0.7-openssl-3.0.13-ocsp-win32-bin.zip
==
Binary files - no diff available.

Modified: 
release/tomcat/tomcat-connectors/native/2.0.7/binaries/tomcat-native-2.0.7-openssl-3.0.13-ocsp-win32-bin.zip.asc
==
--- 
release/tomcat/tomcat-connectors/native/2.0.7/binaries/tomcat-native-2.0.7-openssl-3.0.13-ocsp-win32-bin.zip.asc
 (original)
+++ 
release/tomcat/tomcat-connectors/native/2.0.7/binaries/tomcat-native-2.0.7-openssl-3.0.13-ocsp-win32-bin.zip.asc
 Thu Feb  8 12:14:22 2024
@@ -1,16 +1,16 @@
 -BEGIN PGP SIGNATURE-
 
-iQIzBAABCgAdFiEEqcXfTSLpmZjZh1pREMAcWi9gWecFAmW/9G0ACgkQEMAcWi9g
-Wec5bA/+OO8UjEahxSZvrLurxLOpAHbAUCUEyOdtq2+CgPBQixI+X2/BBmKlm7fM
-d1Qvd/WXhB9N2J6oEYrxCKN3y4XgGhGEwJIfOEywfTkNuKJaJV3cEB78t/7isA7G
-WN+3if7eHGVw7sangE5m3qGUMGQ4KhMS0RIJjYRPfFLTVZU+bd0ggx33YeZkupDL
-yUmI4YjgyIniCWdoFJjAHfCquF4PlSlSFvRBPbzFaeoroZUv7Z1o7zCn6chc7vsB
-A4vTg1oNE0RuwZK09SMPIhZeM9h0RpERQzHcd9hdEjBtE8QsILuYSlaOH5+zBad0
-NH1GpF9cEuJdTtt8bgY0R+sE9ZkrmKCC6ujTVDC/BtUnLeIg9i5RoHFrL2lzdSAg
-P+6spwcNhZRHT/DFgbDlRXmzWiw96hhg+9aUzn5PezKOyOuxPnBhNFOwAyEHmoey
-EHcNtQjRkA3XrWdk25kCapW8xpmc0P99jvUEVdwTWHuY3igoj7UP7rN3VQ75BXiC
-hSDXUKht9epLYQuxFZNloT5Ynl8f7oct4xylEMO11Y1HvCDHYeEqGUHcUaqbvbqj
-WVeZ9QUIAr4GJNY6DjsxmVZTfw1BF6E3IIgJUzgC1I6asiWe5g/IeTuy4NxGzGHq
-yAXjjm4U0dC23EU8PRUNICvqt28yCthX3Dku9BIVNuVNKcBoKXY=
-=LAjv
+iQIzBAABCgAdFiEEqcXfTSLpmZjZh1pREMAcWi9gWecFAmXExSwACgkQEMAcWi9g
+Wef4oxAAqEeGFS3VtumpnlFcgiqe2psBkF/l9A1+xFkK90tOVx9UKpUTNNdnu02d
+Dhm763WZiu8j5jR5E5o01SdvQKOIam4RnVG5FYmSoXU+H4W+usxV559tJLvvtLKq
+TMc5tQ1vEd/ul6WlYu/MIg8YZ9RCcb9y8WAxe/YoiRX/H0hU3jG98Qf740QliMhr
+VhPuis+NoUiUbIoDbKcmy8IXCX2xqbwK4gdBIL2WR0KEimH9Qv5SsiT3hmqSS0yW
++p9SRtSICAo4eS/gJtVGEzuxZWCjep3D++U1xc089UE9qXA7XYasmph/d81QP06A
+FBF6msuvnPP+W5vZGRRv/VzPMKNkX+Ku3iXEYtESYjIQvtpNIQAQqGL8IPF/iu6o
+ooSH5C+VkA7pLxjr7l/rsvXzXp4gWHCDvf20hZqBp74HPK85vMKPO8HoG6efwSwU
+mw+O7DOJ2Oz6k6a7Q0skuHNmkbxz8XLGzSD4UGQyjofWaLXZWHuSDi61EOzd+ViK
+dNAtskLgI4VeIgcwF8Cyzrd4w3LO5airLSUDdTnBXpYOXGpeSaS2lXk1wrN3MvYC
+eMwCQkrVx5mJZkxsFkxfQEmN/UhM0QVwKXY6AkZf6YJt92/KsS2SgdQyBtd+rOZS
+0c3lfWlpRkfx0Im0Z4a+KuqdLNg6AxyndOzCUVkWDz7plargUAU=
+=qcpK
 -END PGP SIGNATURE-

Modified: 
release/tomcat/tomcat-connectors/native/2.0.7/binaries/tomcat-native-2.0.7-openssl-3.0.13-ocsp-win32-bin.zip.sha512
==
--- 
release/tomcat/tomcat-connectors/native/2.0.7/binaries/tomcat-native-2.0.7-openssl-3.0.13-ocsp-win32-bin.zip.sha512
 (original)
+++ 
release/tomcat/tomcat-connectors/native/2.0.7/binaries/tomcat-native-2.0.7-openssl-3.0.13-ocsp-win32-bin.zip.sha512
 Thu Feb  8 12:14:22 2024
@@ -1 +1 @@
-7486ac1587bbd2871eb84a4a393fc5f1e72918612a35272b4375cc8b92ccab5adf4506cd16eb0165e654152f979f45ca1de5a72dc57531c57ffd0f859694c36b
 *tomcat-native-2.0.7-openssl-3.0.13-ocsp-win32-bin.zip
\ No newline at end of file
+ad2632be5db3989ba71ec407121119159d15ec43b00fabfe207f6f97752063a001dc429c6ffd55c21896bd31c20bf7cb004548929eaf0fe6c6d2a5cda538f7f1
 *tomcat-native-2.0.7-openssl-3.0.13-ocsp-win32-bin.zip
\ No newline at end of file

Modified: 
release/tomcat/tomcat-connectors/native/2.0.7/binaries/tomcat-native-2.0.7-openssl-3.0.13-win32-bin.zip
==
Binary files - no diff available.

Modified: 
release/tomcat/tomcat-connectors/native/2.0.7/binaries/tomcat-native-2.0.7-openssl-3.0.13-win32-bin.zip.asc
==
--- 
release/tomcat/tomcat-connectors/native/2.0.7/binaries/tomcat-native-2.0.7-openssl-3.0.13-win32-bin.zip.asc
 (original)
+++ 
release/tomcat/tomcat-connectors/native/2.0.7/binaries/tomcat-native-2.0.7-openssl-3.0.13-win32-bin.zip.asc
 Thu Feb  8 12:14:22 2024
@@ -1,16 +1,16 @@
 -BEGIN PGP SIGNATURE-
 
-iQIzBAABCgAdFiEEqcXfTSLpmZjZh1pREMAcWi9gWecFAmW/9G4ACgkQEMAcWi9g
-Wece6A//QZitSwrwvQmNOG5maJT8s5kImrIXzeiNES8SHI5YAJik6YArS0t0D1HI
-KLlCtsDlLQn2

(tomcat) branch main updated (413fe6eec3 -> c1d9909a68)

2024-02-08 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


from 413fe6eec3 Add missing strings
 new 801e4bd597 Fix BZ 68559 - allow async error handling to write to 
response
 new c1d9909a68 Update hash for correctly packaged convenience binary

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:
 build.properties.default  | 2 +-
 java/org/apache/catalina/connector/CoyoteAdapter.java | 4 
 webapps/docs/changelog.xml| 4 
 3 files changed, 9 insertions(+), 1 deletion(-)


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) 01/02: Fix BZ 68559 - allow async error handling to write to response

2024-02-08 Thread markt
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

commit 801e4bd597a34054788c1ea43ae8441235f92e21
Author: Mark Thomas 
AuthorDate: Thu Feb 8 11:32:48 2024 +

Fix BZ 68559 - allow async error handling to write to response

https://bz.apache.org/bugzilla/show_bug.cgi?id=68559
---
 java/org/apache/catalina/connector/CoyoteAdapter.java | 4 
 webapps/docs/changelog.xml| 4 
 2 files changed, 8 insertions(+)

diff --git a/java/org/apache/catalina/connector/CoyoteAdapter.java 
b/java/org/apache/catalina/connector/CoyoteAdapter.java
index bfd3f6f56b..cb329b10f0 100644
--- a/java/org/apache/catalina/connector/CoyoteAdapter.java
+++ b/java/org/apache/catalina/connector/CoyoteAdapter.java
@@ -177,6 +177,8 @@ public class CoyoteAdapter implements Adapter {
 }
 } catch (Throwable t) {
 ExceptionUtils.handleThrowable(t);
+// Allow the error handling to write to the response
+response.setSuspended(false);
 // Need to trigger the call to 
AbstractProcessor.setErrorState()
 // before the listener is called so the listener can 
call complete
 // Therefore no need to set success=false as that 
would trigger a
@@ -210,6 +212,8 @@ public class CoyoteAdapter implements Adapter {
 }
 } catch (Throwable t) {
 ExceptionUtils.handleThrowable(t);
+// Allow the error handling to write to the response
+response.setSuspended(false);
 // Need to trigger the call to 
AbstractProcessor.setErrorState()
 // before the listener is called so the listener can 
call complete
 // Therefore no need to set success=false as that 
would trigger a
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 4521e6c419..61c67f700d 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -133,6 +133,10 @@
 Review usage of debug logging and downgrade trace or data dumping
 operations from debug level to trace. (remm)
   
+  
+68559: Allow asynchronous error handling to write to the
+response after an error during asynchronous processing. (markt)
+  
 
   
   


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) 02/02: Update hash for correctly packaged convenience binary

2024-02-08 Thread markt
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

commit c1d9909a68fbaac5e18c547aa0d8dd52f5bdbfd5
Author: Mark Thomas 
AuthorDate: Thu Feb 8 12:18:08 2024 +

Update hash for correctly packaged convenience binary
---
 build.properties.default | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build.properties.default b/build.properties.default
index 116b38229e..476c2f7461 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -146,7 +146,7 @@ tomcat-native.src.checksum.algorithm=SHA-512
 
tomcat-native.src.checksum.value=625b334271494f7c86c06d6a8c6d13c06d9d6094f65cccbdc8d3df13ee2aae4cb42ad326e20bcbf8a8f141240111778991882f9bf87793b09a2920433d6c8c85
 tomcat-native.win.checksum.enabled=true
 tomcat-native.win.checksum.algorithm=SHA-512
-tomcat-native.win.checksum.value=7486ac1587bbd2871eb84a4a393fc5f1e72918612a35272b4375cc8b92ccab5adf4506cd16eb0165e654152f979f45ca1de5a72dc57531c57ffd0f859694c36b
+tomcat-native.win.checksum.value=5473e62b3743c776442656abad3ef7edb1aa086ed3231a72efab91b700cbf14ec1bdb619a8303ceafb5304ce6b756e61411e8b2d7cbf4c4b1f0c285fe8aaa77b
 tomcat-native.home=${base.path}/tomcat-native-${tomcat-native.version}
 tomcat-native.tar.gz=${tomcat-native.home}/tomcat-native.tar.gz
 
tomcat-native.loc.1=${base-tomcat.loc.1}/tomcat-connectors/native/${tomcat-native.version}/source/tomcat-native-${tomcat-native.version}-src.tar.gz


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) branch main updated: File name updates for Tomcat Native 2.0.7

2024-02-08 Thread markt
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 a26a5fdbed File name updates for Tomcat Native 2.0.7
a26a5fdbed is described below

commit a26a5fdbedd8a74fd57f784f60de60d7dbe75573
Author: Mark Thomas 
AuthorDate: Thu Feb 8 12:50:30 2024 +

File name updates for Tomcat Native 2.0.7
---
 BUILDING.txt   | 2 +-
 RUNNING.txt| 4 ++--
 res/install-win/tomcat.nsi | 2 +-
 webapps/docs/apr.xml   | 8 
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/BUILDING.txt b/BUILDING.txt
index d4e248b7b0..fc440f237b 100644
--- a/BUILDING.txt
+++ b/BUILDING.txt
@@ -374,7 +374,7 @@ By default the "test.apr.loc" property specifies the 
following location:
 output/build/bin/
 
 If you are on Windows and want to test the OpenSSL TLS implementation you can
-put the tcnative-1.dll file into ${tomcat.source}/bin/ and it will be
+put the tcnative-2.dll file into ${tomcat.source}/bin/ and it will be
 copied into the above directory when the build runs.
 
 The unit tests include tests of the clustering functionality which require
diff --git a/RUNNING.txt b/RUNNING.txt
index 0adb82c6da..1e250526ff 100644
--- a/RUNNING.txt
+++ b/RUNNING.txt
@@ -422,8 +422,8 @@ To deactivate Apache Tomcat Native library:
 
 The binary file of Apache Tomcat Native library is usually named
 
-  - "tcnative-1.dll" on Windows
-  - "libtcnative-1.so" on *nix systems
+  - "tcnative-2.dll" on Windows
+  - "libtcnative-2.so" on *nix systems
 
 
 Apache Commons Daemon
diff --git a/res/install-win/tomcat.nsi b/res/install-win/tomcat.nsi
index fc133aa4af..424eb949a1 100644
--- a/res/install-win/tomcat.nsi
+++ b/res/install-win/tomcat.nsi
@@ -257,7 +257,7 @@ Section "Native" SecTomcatNative
 
   SetOutPath $INSTDIR\bin
 
-  File bin\tcnative-1.dll
+  File bin\tcnative-2.dll
 
   ClearErrors
 
diff --git a/webapps/docs/apr.xml b/webapps/docs/apr.xml
index ba84ee87a1..1987d39078 100644
--- a/webapps/docs/apr.xml
+++ b/webapps/docs/apr.xml
@@ -62,11 +62,11 @@
 
 
 
-  Windows binaries are provided for tcnative-1, which is a statically 
compiled .dll which includes
+  Windows binaries are provided for tcnative-2, which is a statically 
compiled .dll which includes
   OpenSSL and APR. It can be downloaded from https://tomcat.apache.org/download-native.cgi";>here
   as 32bit or AMD x86-64 binaries.
   In security conscious production environments, it is recommended to use 
separate shared dlls
-  for OpenSSL, APR, and libtcnative-1, and update them as needed according 
to security bulletins.
+  for OpenSSL, APR, and libtcnative-2, and update them as needed according 
to security bulletins.
   Windows OpenSSL binaries are linked from the https://www.openssl.org";>Official OpenSSL
   website (see related/binaries).
 
@@ -84,8 +84,8 @@
   Requirements:
 
 
-  APR 1.2+ development headers (libapr1-dev package)
-  OpenSSL 1.0.2+ development headers (libssl-dev package)
+  APR 1.6.3+ development headers (libapr1-dev package)
+  OpenSSL 1.1.1+ development headers (libssl-dev package)
   JNI headers from Java compatible JDK 1.4+
   GNU development environment (gcc, make)
 


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: [VOTE][RESULT] Release Apache Tomcat Native 2.0.7

2024-02-08 Thread Mark Thomas

On 08/02/2024 11:43, Mark Thomas wrote:
The source is OK but the convenience binary needs to be re-packaged. I 
think the DLL name changed which meant the correct files weren't picked up.


Since we aren't changing the source or the tag, I don't think we need a 
new release but I'll confirm that once I figure out exactly where things 
went wrong.


Confirmed. Just the binaries and it was caused by the file name change 
so the copy and pasted commands didn't pick up the dll or symbol files.


I still have the build directory I used for the release so I have 
uploaded new convenience binaries that include the dll and symbol files 
from the original release build.


Mark

-
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 (706070a58c -> 5d0108a483)

2024-02-08 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a change to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


from 706070a58c Add missing strings
 new 865d1403ff Update hash for correctly packaged convenience binary
 new 5d0108a483 File name updates for Tomcat Native 2.0.7

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:
 BUILDING.txt   | 2 +-
 RUNNING.txt| 4 ++--
 build.properties.default   | 2 +-
 res/install-win/tomcat.nsi | 4 ++--
 webapps/docs/apr.xml   | 8 
 5 files changed, 10 insertions(+), 10 deletions(-)


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) 01/02: Update hash for correctly packaged convenience binary

2024-02-08 Thread markt
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

commit 865d1403ff41cb73ca605c8aeb0f6ec18577fe20
Author: Mark Thomas 
AuthorDate: Thu Feb 8 12:18:08 2024 +

Update hash for correctly packaged convenience binary
---
 build.properties.default | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build.properties.default b/build.properties.default
index 26f40f9b6d..607bd8189d 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -167,7 +167,7 @@ tomcat-native.src.checksum.algorithm=SHA-512
 
tomcat-native.src.checksum.value=625b334271494f7c86c06d6a8c6d13c06d9d6094f65cccbdc8d3df13ee2aae4cb42ad326e20bcbf8a8f141240111778991882f9bf87793b09a2920433d6c8c85
 tomcat-native.win.checksum.enabled=true
 tomcat-native.win.checksum.algorithm=SHA-512
-tomcat-native.win.checksum.value=7486ac1587bbd2871eb84a4a393fc5f1e72918612a35272b4375cc8b92ccab5adf4506cd16eb0165e654152f979f45ca1de5a72dc57531c57ffd0f859694c36b
+tomcat-native.win.checksum.value=5473e62b3743c776442656abad3ef7edb1aa086ed3231a72efab91b700cbf14ec1bdb619a8303ceafb5304ce6b756e61411e8b2d7cbf4c4b1f0c285fe8aaa77b
 tomcat-native.home=${base.path}/tomcat-native-${tomcat-native.version}
 tomcat-native.tar.gz=${tomcat-native.home}/tomcat-native.tar.gz
 
tomcat-native.loc.1=${base-tomcat.loc.1}/tomcat-connectors/native/${tomcat-native.version}/source/tomcat-native-${tomcat-native.version}-src.tar.gz


-
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: Fix BZ 68559 - allow async error handling to write to response

2024-02-08 Thread markt
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 ee3e233dc6 Fix BZ 68559 - allow async error handling to write to 
response
ee3e233dc6 is described below

commit ee3e233dc6852eca84572d821bd21d2781ef
Author: Mark Thomas 
AuthorDate: Thu Feb 8 11:32:48 2024 +

Fix BZ 68559 - allow async error handling to write to response

https://bz.apache.org/bugzilla/show_bug.cgi?id=68559
---
 java/org/apache/catalina/connector/CoyoteAdapter.java | 4 
 webapps/docs/changelog.xml| 4 
 2 files changed, 8 insertions(+)

diff --git a/java/org/apache/catalina/connector/CoyoteAdapter.java 
b/java/org/apache/catalina/connector/CoyoteAdapter.java
index 943496e0f9..c3a0dc2506 100644
--- a/java/org/apache/catalina/connector/CoyoteAdapter.java
+++ b/java/org/apache/catalina/connector/CoyoteAdapter.java
@@ -177,6 +177,8 @@ public class CoyoteAdapter implements Adapter {
 }
 } catch (Throwable t) {
 ExceptionUtils.handleThrowable(t);
+// Allow the error handling to write to the response
+response.setSuspended(false);
 // Need to trigger the call to 
AbstractProcessor.setErrorState()
 // before the listener is called so the listener can 
call complete
 // Therefore no need to set success=false as that 
would trigger a
@@ -210,6 +212,8 @@ public class CoyoteAdapter implements Adapter {
 }
 } catch (Throwable t) {
 ExceptionUtils.handleThrowable(t);
+// Allow the error handling to write to the response
+response.setSuspended(false);
 // Need to trigger the call to 
AbstractProcessor.setErrorState()
 // before the listener is called so the listener can 
call complete
 // Therefore no need to set success=false as that 
would trigger a
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index c9c87206cd..01a21ef39a 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -126,6 +126,10 @@
 Review usage of debug logging and downgrade trace or data dumping
 operations from debug level to trace. (remm)
   
+  
+68559: Allow asynchronous error handling to write to the
+response after an error during asynchronous processing. (markt)
+  
 
   
   


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) 02/02: File name updates for Tomcat Native 2.0.7

2024-02-08 Thread markt
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

commit 5d0108a4831b5d2eec06f1a128874102997c8696
Author: Mark Thomas 
AuthorDate: Thu Feb 8 12:50:30 2024 +

File name updates for Tomcat Native 2.0.7
---
 BUILDING.txt   | 2 +-
 RUNNING.txt| 4 ++--
 res/install-win/tomcat.nsi | 4 ++--
 webapps/docs/apr.xml   | 8 
 4 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/BUILDING.txt b/BUILDING.txt
index d4e248b7b0..fc440f237b 100644
--- a/BUILDING.txt
+++ b/BUILDING.txt
@@ -374,7 +374,7 @@ By default the "test.apr.loc" property specifies the 
following location:
 output/build/bin/
 
 If you are on Windows and want to test the OpenSSL TLS implementation you can
-put the tcnative-1.dll file into ${tomcat.source}/bin/ and it will be
+put the tcnative-2.dll file into ${tomcat.source}/bin/ and it will be
 copied into the above directory when the build runs.
 
 The unit tests include tests of the clustering functionality which require
diff --git a/RUNNING.txt b/RUNNING.txt
index 0adb82c6da..1e250526ff 100644
--- a/RUNNING.txt
+++ b/RUNNING.txt
@@ -422,8 +422,8 @@ To deactivate Apache Tomcat Native library:
 
 The binary file of Apache Tomcat Native library is usually named
 
-  - "tcnative-1.dll" on Windows
-  - "libtcnative-1.so" on *nix systems
+  - "tcnative-2.dll" on Windows
+  - "libtcnative-2.so" on *nix systems
 
 
 Apache Commons Daemon
diff --git a/res/install-win/tomcat.nsi b/res/install-win/tomcat.nsi
index fe16505799..905472bf30 100644
--- a/res/install-win/tomcat.nsi
+++ b/res/install-win/tomcat.nsi
@@ -265,9 +265,9 @@ Section "Native" SecTomcatNative
   SetOutPath $INSTDIR\bin
 
   ${If} $Arch == "x86"
-File bin\tcnative-1.dll
+File bin\tcnative-2.dll
   ${ElseIf} $Arch == "x64"
-File /oname=tcnative-1.dll bin\x64\tcnative-1.dll
+File /oname=tcnative-2.dll bin\x64\tcnative-2.dll
   ${EndIf}
 
   ClearErrors
diff --git a/webapps/docs/apr.xml b/webapps/docs/apr.xml
index ba84ee87a1..1987d39078 100644
--- a/webapps/docs/apr.xml
+++ b/webapps/docs/apr.xml
@@ -62,11 +62,11 @@
 
 
 
-  Windows binaries are provided for tcnative-1, which is a statically 
compiled .dll which includes
+  Windows binaries are provided for tcnative-2, which is a statically 
compiled .dll which includes
   OpenSSL and APR. It can be downloaded from https://tomcat.apache.org/download-native.cgi";>here
   as 32bit or AMD x86-64 binaries.
   In security conscious production environments, it is recommended to use 
separate shared dlls
-  for OpenSSL, APR, and libtcnative-1, and update them as needed according 
to security bulletins.
+  for OpenSSL, APR, and libtcnative-2, and update them as needed according 
to security bulletins.
   Windows OpenSSL binaries are linked from the https://www.openssl.org";>Official OpenSSL
   website (see related/binaries).
 
@@ -84,8 +84,8 @@
   Requirements:
 
 
-  APR 1.2+ development headers (libapr1-dev package)
-  OpenSSL 1.0.2+ development headers (libssl-dev package)
+  APR 1.6.3+ development headers (libapr1-dev package)
+  OpenSSL 1.1.1+ development headers (libssl-dev package)
   JNI headers from Java compatible JDK 1.4+
   GNU development environment (gcc, make)
 


-
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: Fix BZ 68559 - allow async error handling to write to response

2024-02-08 Thread markt
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 889466af8a Fix BZ 68559 - allow async error handling to write to 
response
889466af8a is described below

commit 889466af8af224db30c73f4c886f0e15612f38b9
Author: Mark Thomas 
AuthorDate: Thu Feb 8 11:32:48 2024 +

Fix BZ 68559 - allow async error handling to write to response

https://bz.apache.org/bugzilla/show_bug.cgi?id=68559
---
 java/org/apache/catalina/connector/CoyoteAdapter.java | 4 
 webapps/docs/changelog.xml| 4 
 2 files changed, 8 insertions(+)

diff --git a/java/org/apache/catalina/connector/CoyoteAdapter.java 
b/java/org/apache/catalina/connector/CoyoteAdapter.java
index a64563425d..157b88f9e7 100644
--- a/java/org/apache/catalina/connector/CoyoteAdapter.java
+++ b/java/org/apache/catalina/connector/CoyoteAdapter.java
@@ -179,6 +179,8 @@ public class CoyoteAdapter implements Adapter {
 }
 } catch (Throwable t) {
 ExceptionUtils.handleThrowable(t);
+// Allow the error handling to write to the response
+response.setSuspended(false);
 // Need to trigger the call to 
AbstractProcessor.setErrorState()
 // before the listener is called so the listener can 
call complete
 // Therefore no need to set success=false as that 
would trigger a
@@ -212,6 +214,8 @@ public class CoyoteAdapter implements Adapter {
 }
 } catch (Throwable t) {
 ExceptionUtils.handleThrowable(t);
+// Allow the error handling to write to the response
+response.setSuspended(false);
 // Need to trigger the call to 
AbstractProcessor.setErrorState()
 // before the listener is called so the listener can 
call complete
 // Therefore no need to set success=false as that 
would trigger a
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 2a6b38f9d5..1578011215 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -126,6 +126,10 @@
 Review usage of debug logging and downgrade trace or data dumping
 operations from debug level to trace. (remm)
   
+  
+68559: Allow asynchronous error handling to write to the
+response after an error during asynchronous processing. (markt)
+  
 
   
   


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) branch 8.5.x updated: Fix BZ 68559 - allow async error handling to write to response

2024-02-08 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new 9670865dac Fix BZ 68559 - allow async error handling to write to 
response
9670865dac is described below

commit 9670865dac0b39a350ccd266332712cdf70ede34
Author: Mark Thomas 
AuthorDate: Thu Feb 8 11:32:48 2024 +

Fix BZ 68559 - allow async error handling to write to response

https://bz.apache.org/bugzilla/show_bug.cgi?id=68559
---
 java/org/apache/catalina/connector/CoyoteAdapter.java | 4 
 webapps/docs/changelog.xml| 4 
 2 files changed, 8 insertions(+)

diff --git a/java/org/apache/catalina/connector/CoyoteAdapter.java 
b/java/org/apache/catalina/connector/CoyoteAdapter.java
index c88bdce317..49ddf7c8c1 100644
--- a/java/org/apache/catalina/connector/CoyoteAdapter.java
+++ b/java/org/apache/catalina/connector/CoyoteAdapter.java
@@ -179,6 +179,8 @@ public class CoyoteAdapter implements Adapter {
 }
 } catch (Throwable t) {
 ExceptionUtils.handleThrowable(t);
+// Allow the error handling to write to the response
+response.setSuspended(false);
 // Need to trigger the call to 
AbstractProcessor.setErrorState()
 // before the listener is called so the listener can 
call complete
 // Therefore no need to set success=false as that 
would trigger a
@@ -212,6 +214,8 @@ public class CoyoteAdapter implements Adapter {
 }
 } catch (Throwable t) {
 ExceptionUtils.handleThrowable(t);
+// Allow the error handling to write to the response
+response.setSuspended(false);
 // Need to trigger the call to 
AbstractProcessor.setErrorState()
 // before the listener is called so the listener can 
call complete
 // Therefore no need to set success=false as that 
would trigger a
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 8e2522ef5b..1390508baf 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -120,6 +120,10 @@
 Review usage of debug logging and downgrade trace or data dumping
 operations from debug level to trace. (remm)
   
+  
+68559: Allow asynchronous error handling to write to the
+response after an error during asynchronous processing. (markt)
+  
 
   
   


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 68599] New: migration tool jakartaee-migration-1.0.7 does not convert xmlrpc-server-3.1.3.jar

2024-02-08 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=68599

Bug ID: 68599
   Summary: migration tool  jakartaee-migration-1.0.7 does not
convert xmlrpc-server-3.1.3.jar
   Product: Tomcat 10
   Version: 10.1.18
  Hardware: PC
Status: NEW
  Severity: normal
  Priority: P2
 Component: Servlet
  Assignee: dev@tomcat.apache.org
  Reporter: rn...@westwoodone.com
  Target Milestone: --

Our company uses  xmlrpc-server3.1.3.jar 
which contains this package (org.apache.xmlrpc.)
We are trying to migrate to Tomcat 10 but that  jar uses the   javax.server.
package classes instead of the needed  jakarta.server. package.

I have tried running this jar trough your latest Tomcat 10 migration tool
(akartaee-migration-1.0.7) which is suppose to alter the jar to make all
classes use  jakarta.server.  classes
but the tool is not fully converting all the classes,  since I still get
compile errors at run time.

I think in addition to not using  javax.server.  the jar should use this class  
java.net.URI  instead of   java.net.URL

Can you guys look into this bug in your migration tool?

Thanks Rick

-- 
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



[Bug 68599] migration tool jakartaee-migration-1.0.7 does not convert xmlrpc-server-3.1.3.jar

2024-02-08 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=68599

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE
 OS||All

--- Comment #1 from Mark Thomas  ---


*** This bug has been marked as a duplicate of bug 68572 ***

-- 
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



[Bug 68572] migration tool does not conver xmlrpc-server3.0.jar to be jakarta compliant

2024-02-08 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=68572

--- Comment #2 from Mark Thomas  ---
*** Bug 68599 has been marked as a duplicate of this bug. ***

-- 
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



[Bug 68559] BadRequestException doesn't send back a 400 when using Async servlets

2024-02-08 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=68559

Mark Thomas  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|REOPENED|RESOLVED

--- Comment #9 from Mark Thomas  ---
I've made a modification that should allow async error handling to write to the
response. The provided test case now passes.

-- 
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 success in on tomcat-11.0.x

2024-02-08 Thread buildbot
Build status: Build succeeded!
Worker used: bb_worker2_ubuntu
URL: https://ci2.apache.org/#builders/112/builds/913
Blamelist: Mark Thomas , remm 
Build Text: build successful
Status Detected: restored build
Build Source Stamp: [branch main] a26a5fdbedd8a74fd57f784f60de60d7dbe75573


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: 1

  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



(tomcat) branch main updated: Remove deprecated code

2024-02-08 Thread markt
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 0b0c786df1 Remove deprecated code
0b0c786df1 is described below

commit 0b0c786df13ad13ab77cce8cb499500432d94858
Author: Mark Thomas 
AuthorDate: Thu Feb 8 13:46:42 2024 +

Remove deprecated code
---
 .../apache/catalina/core/ApplicationRequest.java   | 35 --
 java/org/apache/tomcat/util/buf/ByteChunk.java | 18 ---
 java/org/apache/tomcat/util/buf/StringCache.java   | 16 --
 java/org/apache/tomcat/util/http/MimeHeaders.java  |  5 
 4 files changed, 5 insertions(+), 69 deletions(-)

diff --git a/java/org/apache/catalina/core/ApplicationRequest.java 
b/java/org/apache/catalina/core/ApplicationRequest.java
index 8e0ec4576d..330e3da575 100644
--- a/java/org/apache/catalina/core/ApplicationRequest.java
+++ b/java/org/apache/catalina/core/ApplicationRequest.java
@@ -41,23 +41,13 @@ import jakarta.servlet.ServletRequestWrapper;
  */
 class ApplicationRequest extends ServletRequestWrapper {
 
-/**
- * The set of attribute names that are special for request dispatchers.
- *
- * @deprecated Will be removed without replacement in Tomcat 11 onwards.
- */
-@Deprecated
-protected static final String specials[] =
-{ RequestDispatcher.INCLUDE_REQUEST_URI, 
RequestDispatcher.INCLUDE_CONTEXT_PATH,
+private static final Set specialsSet =
+new HashSet<>(Arrays.asList(RequestDispatcher.INCLUDE_REQUEST_URI, 
RequestDispatcher.INCLUDE_CONTEXT_PATH,
 RequestDispatcher.INCLUDE_SERVLET_PATH, 
RequestDispatcher.INCLUDE_PATH_INFO,
 RequestDispatcher.INCLUDE_QUERY_STRING, 
RequestDispatcher.INCLUDE_MAPPING,
 RequestDispatcher.FORWARD_REQUEST_URI, 
RequestDispatcher.FORWARD_CONTEXT_PATH,
 RequestDispatcher.FORWARD_SERVLET_PATH, 
RequestDispatcher.FORWARD_PATH_INFO,
-RequestDispatcher.FORWARD_QUERY_STRING, 
RequestDispatcher.FORWARD_MAPPING };
-/*
- * This duplicates specials but has been added to improve the performance 
of isSpecial().
- */
-private static final Set specialsSet = new 
HashSet<>(Arrays.asList(specials));
+RequestDispatcher.FORWARD_QUERY_STRING, 
RequestDispatcher.FORWARD_MAPPING));
 
 
 /**
@@ -111,7 +101,7 @@ class ApplicationRequest extends ServletRequestWrapper {
 public void removeAttribute(String name) {
 synchronized (attributes) {
 attributes.remove(name);
-if (!isSpecial(name)) {
+if (!specialsSet.contains(name)) {
 getRequest().removeAttribute(name);
 }
 }
@@ -128,7 +118,7 @@ class ApplicationRequest extends ServletRequestWrapper {
 public void setAttribute(String name, Object value) {
 synchronized (attributes) {
 attributes.put(name, value);
-if (!isSpecial(name)) {
+if (!specialsSet.contains(name)) {
 getRequest().setAttribute(name, value);
 }
 }
@@ -157,19 +147,4 @@ class ApplicationRequest extends ServletRequestWrapper {
 }
 }
 }
-
-
-// -- Protected Methods
-
-/**
- * Is this attribute name one of the special ones that is added only for 
included servlets?
- *
- * @param name Attribute name to be tested
- *
- * @deprecated Will be removed without replacement in Tomcat 11 onwards.
- */
-@Deprecated
-protected boolean isSpecial(String name) {
-return specialsSet.contains(name);
-}
 }
diff --git a/java/org/apache/tomcat/util/buf/ByteChunk.java 
b/java/org/apache/tomcat/util/buf/ByteChunk.java
index e297121e65..04b2e5a935 100644
--- a/java/org/apache/tomcat/util/buf/ByteChunk.java
+++ b/java/org/apache/tomcat/util/buf/ByteChunk.java
@@ -538,24 +538,6 @@ public final class ByteChunk extends AbstractChunk {
 }
 
 
-/**
- * Converts the current content of the byte buffer to a String using the 
configured character set.
- *
- * @return The result of converting the bytes to a String
- *
- * @deprecated Unused. This method will be removed in Tomcat 11 onwards.
- */
-@Deprecated
-public String toStringInternal() {
-try {
-return toStringInternal(CodingErrorAction.REPLACE, 
CodingErrorAction.REPLACE);
-} catch (CharacterCodingException e) {
-// Unreachable code. Use of REPLACE above means the exception will 
never be thrown.
-throw new IllegalStateException(e);
-}
-}
-
-
 /**
  * Converts the current content of the byte buffer to a String using the 
configured character set.
  *
diff --git a/java/org/apache/tomcat/util/buf/Stri

[Bug 68089] ApplicationHttpRequest.getSpecial() and removeSpecial() use linear scans

2024-02-08 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=68089

--- Comment #9 from Mark Thomas  ---
I did look at using !startsWith("jakarta") but that is ~2x slower than a length
check.

I've coded up the length check and am just running some tests locally.

-- 
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: Jextract library load refinements

2024-02-08 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm 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 830771823e Jextract library load refinements
830771823e is described below

commit 830771823edbb79d2884eb1c6f5122e81df4df78
Author: remm 
AuthorDate: Thu Feb 8 16:30:07 2024 +0100

Jextract library load refinements
---
 java/org/apache/tomcat/util/openssl/openssl_h.java | 10 +++---
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/java/org/apache/tomcat/util/openssl/openssl_h.java 
b/java/org/apache/tomcat/util/openssl/openssl_h.java
index f006407e23..25ba1ae96f 100644
--- a/java/org/apache/tomcat/util/openssl/openssl_h.java
+++ b/java/org/apache/tomcat/util/openssl/openssl_h.java
@@ -29,13 +29,6 @@ import static java.lang.foreign.ValueLayout.*;
 @SuppressWarnings({"javadoc", "boxing"})
 public class openssl_h {
 
-static final SymbolLookup SYMBOL_LOOKUP
-= 
SymbolLookup.loaderLookup().or(Linker.nativeLinker().defaultLookup());
-
-static {
-System.loadLibrary("ssl");
-}
-
 openssl_h() {
 // Suppresses public default constructor, ensuring non-instantiability,
 // but allows generated subclasses in same package.
@@ -54,6 +47,9 @@ public class openssl_h {
 
 static final Arena LIBRARY_ARENA = Arena.ofAuto();
 static final boolean TRACE_DOWNCALLS = 
Boolean.getBoolean("jextract.trace.downcalls");
+static final SymbolLookup SYMBOL_LOOKUP = 
SymbolLookup.libraryLookup(System.mapLibraryName("ssl"), LIBRARY_ARENA)
+.or(SymbolLookup.loaderLookup())
+.or(Linker.nativeLinker().defaultLookup());
 
 static void traceDowncall(String name, Object... args) {
  String traceArgs = Arrays.stream(args)


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 68603] New: Request Context path and Query param gets replaced

2024-02-08 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=68603

Bug ID: 68603
   Summary: Request Context path and Query param gets replaced
   Product: Tomcat 9
   Version: 9.0.83
  Hardware: PC
Status: NEW
  Severity: major
  Priority: P2
 Component: Connectors
  Assignee: dev@tomcat.apache.org
  Reporter: nareshnk1...@gmail.com
  Target Milestone: -

Context path and the query param gets replaced with the saved request body when
request parameter is parsed. So, getting error that the request context Path
and the canonical path doesn't match when request context Path is obtained.

The Flow goes like this...
After login(Form Authentication) the saved body of the request before login is
restored in the current request where internal buffer is changed over in
org.apache.coyote.http11.Http11Processor#setRequestBody and after that when the
request param is parsed at
org.apache.coyote.http11.filters.SavedRequestInputFilter#doRead the current
request URI and Query param are altered. When request context Path is got after
parsing the request params getting error that the request context Path and the
canonical path doesn't match.

-- 
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



Test stability and tagging delayed

2024-02-08 Thread Mark Thomas

Hi all,

TL;DR tagging likely delayed while APR/native stability issue is addressed

We have had a couple of issues with test stability in the last few days.

The issues with 11.0.x and 10.1.x were caused by the incomplete 
convenience binary for Tomcat Native 2.0.7. That should be resolved now. 
The 11.0.x tests are already green and I am expecting 10.1.x to be green 
for the next run.


9.0.x and 8.5.x are a little more interesting. The instability was 
triggered by the change to allow users to provide an SSLContext directly 
to SSLHostConfigCertificate. This changed the timing of endpoint 
destruction enough to make the intermittent APR crashes much more 
frequent - almost on every run.


The good news is that the more frequent crashes made it easier to 
investigate. My current theory is related to the cleanup of 
OpenSSLContext. In 9.0.x and 8.5.x clean-up of this object is performed 
by a finalizer. This is to support runtime replacement of the 
SSLHostContext.


What I think happens is:
- Tomcat starts shutdown
- Endpoint is destroyed
- AprLifecycleListener shuts down Native library
- finalizer runs and tries to reference native code leading to a crash

I have some initial ideas on how we might handle this better. The quick 
and dirty fix was to force GC and add a delay in 
AprLifecycleListener.terminateAPR() but that was just a hack to test the 
theory.


Back to working out a more robust fix...

Mark


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 68603] Request Context path and Query param gets replaced

2024-02-08 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=68603

Mark Thomas  changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
 Status|NEW |RESOLVED
 OS||All

--- Comment #1 from Mark Thomas  ---
FORM authentication is REQUIRED to restore the original request after a
successful authentication.

Please use the users mailing if you require assistance with using FORM
authentication.

*** This bug has been marked as a duplicate of bug 68593 ***

-- 
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



[Bug 68593] Request Context is replaced after restoreRequest()

2024-02-08 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=68593

--- Comment #3 from Mark Thomas  ---
*** Bug 68603 has been marked as a duplicate of this bug. ***

-- 
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: No need for reflection here

2024-02-08 Thread markt
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 97234281ee No need for reflection here
97234281ee is described below

commit 97234281eedc6695e3fac143050f9cd69d1b20c1
Author: Mark Thomas 
AuthorDate: Thu Feb 8 18:22:35 2024 +

No need for reflection here
---
 java/org/apache/catalina/core/AprLifecycleListener.java | 8 ++--
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/java/org/apache/catalina/core/AprLifecycleListener.java 
b/java/org/apache/catalina/core/AprLifecycleListener.java
index e35538bf36..8a6184438d 100644
--- a/java/org/apache/catalina/core/AprLifecycleListener.java
+++ b/java/org/apache/catalina/core/AprLifecycleListener.java
@@ -16,7 +16,6 @@
  */
 package org.apache.catalina.core;
 
-import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.List;
@@ -169,11 +168,8 @@ public class AprLifecycleListener implements 
LifecycleListener {
 
 }
 
-private static void terminateAPR()
-throws ClassNotFoundException, NoSuchMethodException, 
IllegalAccessException, InvocationTargetException {
-String methodName = "terminate";
-Method method = 
Class.forName("org.apache.tomcat.jni.Library").getMethod(methodName, (Class[]) 
null);
-method.invoke(null, (Object[]) null);
+private static void terminateAPR() {
+Library.terminate();
 AprStatus.setAprAvailable(false);
 AprStatus.setAprInitialized(false);
 sslInitialized = false; // Well we cleaned the pool in terminate.


-
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: No need for reflection here

2024-02-08 Thread markt
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 6616d84ddf No need for reflection here
6616d84ddf is described below

commit 6616d84ddf978293b5bdfb6bd83eefb137b03d80
Author: Mark Thomas 
AuthorDate: Thu Feb 8 18:22:35 2024 +

No need for reflection here
---
 java/org/apache/catalina/core/AprLifecycleListener.java | 8 ++--
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/java/org/apache/catalina/core/AprLifecycleListener.java 
b/java/org/apache/catalina/core/AprLifecycleListener.java
index e35538bf36..8a6184438d 100644
--- a/java/org/apache/catalina/core/AprLifecycleListener.java
+++ b/java/org/apache/catalina/core/AprLifecycleListener.java
@@ -16,7 +16,6 @@
  */
 package org.apache.catalina.core;
 
-import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.List;
@@ -169,11 +168,8 @@ public class AprLifecycleListener implements 
LifecycleListener {
 
 }
 
-private static void terminateAPR()
-throws ClassNotFoundException, NoSuchMethodException, 
IllegalAccessException, InvocationTargetException {
-String methodName = "terminate";
-Method method = 
Class.forName("org.apache.tomcat.jni.Library").getMethod(methodName, (Class[]) 
null);
-method.invoke(null, (Object[]) null);
+private static void terminateAPR() {
+Library.terminate();
 AprStatus.setAprAvailable(false);
 AprStatus.setAprInitialized(false);
 sslInitialized = false; // Well we cleaned the pool in terminate.


-
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: No need for reflection here

2024-02-08 Thread markt
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 552cf5e5f4 No need for reflection here
552cf5e5f4 is described below

commit 552cf5e5f4353911341407a3d2ca5b255d705648
Author: Mark Thomas 
AuthorDate: Thu Feb 8 18:22:35 2024 +

No need for reflection here
---
 java/org/apache/catalina/core/AprLifecycleListener.java | 8 ++--
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/java/org/apache/catalina/core/AprLifecycleListener.java 
b/java/org/apache/catalina/core/AprLifecycleListener.java
index 5543194084..fb93d96b5a 100644
--- a/java/org/apache/catalina/core/AprLifecycleListener.java
+++ b/java/org/apache/catalina/core/AprLifecycleListener.java
@@ -16,7 +16,6 @@
  */
 package org.apache.catalina.core;
 
-import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.List;
@@ -169,11 +168,8 @@ public class AprLifecycleListener implements 
LifecycleListener {
 
 }
 
-private static void terminateAPR()
-throws ClassNotFoundException, NoSuchMethodException, 
IllegalAccessException, InvocationTargetException {
-String methodName = "terminate";
-Method method = 
Class.forName("org.apache.tomcat.jni.Library").getMethod(methodName, (Class[]) 
null);
-method.invoke(null, (Object[]) null);
+private static void terminateAPR() {
+Library.terminate();
 AprStatus.setAprAvailable(false);
 AprStatus.setAprInitialized(false);
 sslInitialized = false; // Well we cleaned the pool in terminate.


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) branch 8.5.x updated: No need for reflection here

2024-02-08 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new 06c434f327 No need for reflection here
06c434f327 is described below

commit 06c434f327ea08fd87aa85aab6b50c865af5b6fd
Author: Mark Thomas 
AuthorDate: Thu Feb 8 18:22:35 2024 +

No need for reflection here
---
 java/org/apache/catalina/core/AprLifecycleListener.java | 8 ++--
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/java/org/apache/catalina/core/AprLifecycleListener.java 
b/java/org/apache/catalina/core/AprLifecycleListener.java
index 5a0882fa18..42a5bf432b 100644
--- a/java/org/apache/catalina/core/AprLifecycleListener.java
+++ b/java/org/apache/catalina/core/AprLifecycleListener.java
@@ -16,7 +16,6 @@
  */
 package org.apache.catalina.core;
 
-import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.List;
@@ -175,11 +174,8 @@ public class AprLifecycleListener implements 
LifecycleListener {
 
 }
 
-private static void terminateAPR()
-throws ClassNotFoundException, NoSuchMethodException, 
IllegalAccessException, InvocationTargetException {
-String methodName = "terminate";
-Method method = 
Class.forName("org.apache.tomcat.jni.Library").getMethod(methodName, (Class[]) 
null);
-method.invoke(null, (Object[]) null);
+private static void terminateAPR() {
+Library.terminate();
 aprAvailable = false;
 aprInitialized = false;
 sslInitialized = false; // Well we cleaned the pool in terminate.


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) branch main updated: Preparatory work for APR/Native shutdown stability fix

2024-02-08 Thread markt
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 72db699456 Preparatory work for APR/Native shutdown stability fix
72db699456 is described below

commit 72db699456ef24d2cc50e9020634a628452bdcfb
Author: Mark Thomas 
AuthorDate: Thu Feb 8 18:47:07 2024 +

Preparatory work for APR/Native shutdown stability fix
---
 .../apache/catalina/core/AprLifecycleListener.java |  1 +
 java/org/apache/tomcat/jni/Library.java| 32 ++
 test/org/apache/tomcat/util/net/TesterSupport.java |  1 +
 3 files changed, 29 insertions(+), 5 deletions(-)

diff --git a/java/org/apache/catalina/core/AprLifecycleListener.java 
b/java/org/apache/catalina/core/AprLifecycleListener.java
index 8a6184438d..4ed37531fa 100644
--- a/java/org/apache/catalina/core/AprLifecycleListener.java
+++ b/java/org/apache/catalina/core/AprLifecycleListener.java
@@ -169,6 +169,7 @@ public class AprLifecycleListener implements 
LifecycleListener {
 }
 
 private static void terminateAPR() {
+Library.terminatePrepare();
 Library.terminate();
 AprStatus.setAprAvailable(false);
 AprStatus.setAprInitialized(false);
diff --git a/java/org/apache/tomcat/jni/Library.java 
b/java/org/apache/tomcat/jni/Library.java
index c0256eacff..8354406450 100644
--- a/java/org/apache/tomcat/jni/Library.java
+++ b/java/org/apache/tomcat/jni/Library.java
@@ -29,6 +29,8 @@ public final class Library {
  */
 private static Library _instance = null;
 
+private static boolean initialized = false;
+
 private Library() throws Exception {
 boolean loaded = false;
 StringBuilder err = new StringBuilder();
@@ -97,12 +99,26 @@ public final class Library {
 System.loadLibrary(libraryName);
 }
 
-/* create global TCN's APR pool
- * This has to be the first call to TCN library.
+/**
+ * Create Tomcat Native's global APR pool. This has to be the first call 
to TCN library.
  */
 private static native boolean initialize();
-/* destroy global TCN's APR pool
- * This has to be the last call to TCN library.
+/**
+ * Signal that Tomcat Native is about to be shutdown.
+ * 
+ * The main purpose of this flag is to allow instances that manage their 
own APR root pools to determine if those
+ * pools need to be explicitly cleaned up or if they will be / have been 
cleaned up by the call to
+ * {@link #terminate()}. The code needs to avoid multiple attempts to 
clean up these pools else the Native code may
+ * crash.
+ */
+public static void terminatePrepare() {
+initialized = false;
+}
+/**
+ * Destroys Tomcat Native's global APR pool. This has to be the last call 
to TCN library. This will destroy any APR
+ * root pools that have not been explicitly destroyed.
+ * 
+ * Callers of this method should call {@link #terminatePrepare()} before 
calling this method.
  */
 public static native void terminate();
 /* Internal function for loading APR Features */
@@ -161,6 +177,12 @@ public final class Library {
aprVersionString() + ")");
 }
 }
-return initialize();
+initialized = initialize();
+return initialized;
+}
+
+
+public static boolean isInitialized() {
+return initialized;
 }
 }
diff --git a/test/org/apache/tomcat/util/net/TesterSupport.java 
b/test/org/apache/tomcat/util/net/TesterSupport.java
index 5d56e49989..a9b32fdc50 100644
--- a/test/org/apache/tomcat/util/net/TesterSupport.java
+++ b/test/org/apache/tomcat/util/net/TesterSupport.java
@@ -108,6 +108,7 @@ public final class TesterSupport {
 Library.initialize(null);
 available = true;
 version = SSL.version();
+Library.terminatePrepare();
 Library.terminate();
 } catch (Exception | LibraryNotFoundError ex) {
 err = ex.getMessage();


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org