Re: BUILDING.txt

2022-08-18 Thread Han Li


> 2022年8月19日 00:18,Christopher Schultz  写道:
> 
> Han,
> 
> On 8/17/22 22:35, Han Li wrote:
>> I found that BUILDING.txt in the source distribution of all version hasn’t 
>> been merged as expected.
>> I think this is a source distribution, BUILDING.txt is part of the source, 
>> so it’s normal for this file not to be processed.
> 
> Well, I know that if I had downloaded the source and intended to build it, I 
> would be surprised to find that the documentation says "Get yourself a copy 
> of Java @REQUIRED_JAVA_VERSION@" because I wouldn't know where to look.
Indeed, I would be confused by this too, if I were a new user of Tomcat.

If we follow what you say, it does help new users who want to build Tomcat by 
themselves.

Han
> 
> If it comes out of git looking like that, it's fine. But the official source 
> distribution should really have easy-to-read documentation.
> 
> -chris
> 
>>> 2022年8月18日 09:36,Christopher Schultz  写道:
>>> 
>>> All,
>>> 
>>> On 8/17/22 21:23, Christopher Schultz wrote:
 I just noticed that BUILDING.txt in the source distribution of Tomcat 
 8.5.82 hasn't been merged as expected:
 "
 
 Building The Apache Tomcat @VERSION_MAJOR_MINOR@ Servlet/JSP Container
 
 This project contains the source code for Tomcat @VERSION_MAJOR_MINOR@, a 
 container that
 implements the Servlet @SERVLET_SPEC_VERSION@, JSP @JSP_SPEC_VERSION@, EL 
 @EL_SPEC_VERSION@, WebSocket @WEBSOCKET_SPEC_VERSION@ and JASPIC 
 @JASPIC_SPEC_VERSION@
 specifications from the Java Community Process .
 "
 I think we might need to enable token-replacement during copy. Or 
 something else. I'll have a look.
 I'd also like to add some information about the repeatable build process.
>>> 
>>> FWIW, the copy of BUILDING.txt that goes into 
>>> output/build/webapps/docs/BUILDING.txt is properly-merged. I think when 
>>> performing a "release" build, that file, once merged, need to be copied 
>>> over the BUILDING.txt that is at the root of the source archive.
>>> 
>>> -chris
>>> 
>>> -
>>> 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 
> 


[GitHub] [tomcat] ppkarwasz commented on pull request #544: Avoid errors from shutting down `LoggerThread`

2022-08-18 Thread GitBox


ppkarwasz commented on PR #544:
URL: https://github.com/apache/tomcat/pull/544#issuecomment-1220013953

   @markt-asf,
   
   As far as I can see, the `LoggerThread` is the only part of JULI that needs 
to be concerned with `Throwable`s. I inline the relevant part of 
`ExceptionUtils#handleException`. A stack overflow is not a problem in this 
case, since we are in a thread's `run` method.
   
On the other hand I would be tempted to replace `LoggerThread` entirely 
with a single threaded `ExecutorService` as in 
[new-async-file-handler](https://github.com/ppkarwasz/tomcat/tree/new-async-file-handler).
 That solution will require much more testing, but will solve another potential 
problem: the `LoggerThread` can have as context classloader the classloader of 
a web application.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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



[tomcat] branch 8.5.x updated: Make parsing of Content-Disposition headers more robust

2022-08-18 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 9595fcdecb Make parsing of Content-Disposition headers more robust
9595fcdecb is described below

commit 9595fcdecbbe7ce3a8065fc8959250722b6fec95
Author: Mark Thomas 
AuthorDate: Thu Aug 18 21:04:06 2022 +0100

Make parsing of Content-Disposition headers more robust

Invalid filename directives will now be ignored rather than triggering a
500 response.
---
 java/org/apache/tomcat/util/http/parser/HttpParser.java |  5 +
 test/org/apache/tomcat/util/http/parser/TestHttpParser.java |  8 
 webapps/docs/changelog.xml  | 10 ++
 3 files changed, 23 insertions(+)

diff --git a/java/org/apache/tomcat/util/http/parser/HttpParser.java 
b/java/org/apache/tomcat/util/http/parser/HttpParser.java
index 3dbd935d2a..2b6dae5264 100644
--- a/java/org/apache/tomcat/util/http/parser/HttpParser.java
+++ b/java/org/apache/tomcat/util/http/parser/HttpParser.java
@@ -238,6 +238,11 @@ public class HttpParser {
 char c = input.charAt(i);
 if (input.charAt(i) == '\\') {
 i++;
+if (i == end) {
+// Input (less surrounding quotes) ended with '\'. That is
+// invalid so return null.
+return null;
+}
 result.append(input.charAt(i));
 } else {
 result.append(c);
diff --git a/test/org/apache/tomcat/util/http/parser/TestHttpParser.java 
b/test/org/apache/tomcat/util/http/parser/TestHttpParser.java
index d157014339..c56022424a 100644
--- a/test/org/apache/tomcat/util/http/parser/TestHttpParser.java
+++ b/test/org/apache/tomcat/util/http/parser/TestHttpParser.java
@@ -25,6 +25,14 @@ public class TestHttpParser {
 public void testTokenDel() {
 Assert.assertFalse("DEL is not a token", HttpParser.isToken(127));
 }
+@Test
+public void testUnquoteInvalid01() {
+// Note: Test string is also Java escaped
+String shortText = "aaa\\";
+Assert.assertNull(shortText, HttpParser.unquote(shortText));
+}
+
+
 @Test
 public void testTokenStringNull() {
 Assert.assertFalse(HttpParser.isToken(null));
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 4cdaf869cc..b97009f8f3 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -118,6 +118,16 @@
   
 
   
+  
+
+  
+Make parsing of invalid filename directives in
+Content-Disposition headers more robust. Invalid filename
+directives will now be ignored rather than triggering a 500 response.
+(markt)
+  
+
+  
   
 
   


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



[tomcat] branch 10.0.x updated: Make parsing of Content-Disposition headers more robust

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

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


The following commit(s) were added to refs/heads/10.0.x by this push:
 new cf3b9fd545 Make parsing of Content-Disposition headers more robust
cf3b9fd545 is described below

commit cf3b9fd54546cded143e2acdc79ee1991977a41d
Author: Mark Thomas 
AuthorDate: Thu Aug 18 21:04:06 2022 +0100

Make parsing of Content-Disposition headers more robust

Invalid filename directives will now be ignored rather than triggering a
500 response.
---
 java/org/apache/tomcat/util/http/parser/HttpParser.java | 5 +
 test/org/apache/tomcat/util/http/parser/TestHttpParser.java | 8 
 webapps/docs/changelog.xml  | 6 ++
 3 files changed, 19 insertions(+)

diff --git a/java/org/apache/tomcat/util/http/parser/HttpParser.java 
b/java/org/apache/tomcat/util/http/parser/HttpParser.java
index 2d21f02e68..4df0467194 100644
--- a/java/org/apache/tomcat/util/http/parser/HttpParser.java
+++ b/java/org/apache/tomcat/util/http/parser/HttpParser.java
@@ -218,6 +218,11 @@ public class HttpParser {
 char c = input.charAt(i);
 if (input.charAt(i) == '\\') {
 i++;
+if (i == end) {
+// Input (less surrounding quotes) ended with '\'. That is
+// invalid so return null.
+return null;
+}
 result.append(input.charAt(i));
 } else {
 result.append(c);
diff --git a/test/org/apache/tomcat/util/http/parser/TestHttpParser.java 
b/test/org/apache/tomcat/util/http/parser/TestHttpParser.java
index eda10e3fa6..618b52010f 100644
--- a/test/org/apache/tomcat/util/http/parser/TestHttpParser.java
+++ b/test/org/apache/tomcat/util/http/parser/TestHttpParser.java
@@ -144,6 +144,14 @@ public class TestHttpParser {
 }
 
 
+@Test
+public void testUnquoteInvalid01() {
+// Note: Test string is also Java escaped
+String shortText = "aaa\\";
+Assert.assertNull(shortText, HttpParser.unquote(shortText));
+}
+
+
 @Test
 public void testTokenStringNull() {
 Assert.assertFalse(HttpParser.isToken(null));
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 169146175a..27027109ba 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -166,6 +166,12 @@
 When processing HTTP/2 requests, reject requests containing multiple
 host headers. (markt)
   
+  
+Make parsing of invalid filename directives in
+Content-Disposition headers more robust. Invalid filename
+directives will now be ignored rather than triggering a 500 response.
+(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: Make parsing of Content-Disposition headers more robust

2022-08-18 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 f775e1c482 Make parsing of Content-Disposition headers more robust
f775e1c482 is described below

commit f775e1c482f55c3b13062607ef0a102afe397903
Author: Mark Thomas 
AuthorDate: Thu Aug 18 21:04:06 2022 +0100

Make parsing of Content-Disposition headers more robust

Invalid filename directives will now be ignored rather than triggering a
500 response.
---
 java/org/apache/tomcat/util/http/parser/HttpParser.java | 5 +
 test/org/apache/tomcat/util/http/parser/TestHttpParser.java | 8 
 webapps/docs/changelog.xml  | 6 ++
 3 files changed, 19 insertions(+)

diff --git a/java/org/apache/tomcat/util/http/parser/HttpParser.java 
b/java/org/apache/tomcat/util/http/parser/HttpParser.java
index 2d21f02e68..4df0467194 100644
--- a/java/org/apache/tomcat/util/http/parser/HttpParser.java
+++ b/java/org/apache/tomcat/util/http/parser/HttpParser.java
@@ -218,6 +218,11 @@ public class HttpParser {
 char c = input.charAt(i);
 if (input.charAt(i) == '\\') {
 i++;
+if (i == end) {
+// Input (less surrounding quotes) ended with '\'. That is
+// invalid so return null.
+return null;
+}
 result.append(input.charAt(i));
 } else {
 result.append(c);
diff --git a/test/org/apache/tomcat/util/http/parser/TestHttpParser.java 
b/test/org/apache/tomcat/util/http/parser/TestHttpParser.java
index eda10e3fa6..618b52010f 100644
--- a/test/org/apache/tomcat/util/http/parser/TestHttpParser.java
+++ b/test/org/apache/tomcat/util/http/parser/TestHttpParser.java
@@ -144,6 +144,14 @@ public class TestHttpParser {
 }
 
 
+@Test
+public void testUnquoteInvalid01() {
+// Note: Test string is also Java escaped
+String shortText = "aaa\\";
+Assert.assertNull(shortText, HttpParser.unquote(shortText));
+}
+
+
 @Test
 public void testTokenStringNull() {
 Assert.assertFalse(HttpParser.isToken(null));
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index b19c23fd7c..20f2898afe 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -166,6 +166,12 @@
 When processing HTTP/2 requests, reject requests containing multiple
 host headers. (markt)
   
+  
+Make parsing of invalid filename directives in
+Content-Disposition headers more robust. Invalid filename
+directives will now be ignored rather than triggering a 500 response.
+(markt)
+  
 
   
   


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



[tomcat] branch main updated: Make parsing of Content-Disposition headers more robust

2022-08-18 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 1902252416 Make parsing of Content-Disposition headers more robust
1902252416 is described below

commit 1902252416f63391461a4481bbd80360e1963ce7
Author: Mark Thomas 
AuthorDate: Thu Aug 18 21:04:06 2022 +0100

Make parsing of Content-Disposition headers more robust

Invalid filename directives will now be ignored rather than triggering a
500 response.
---
 java/org/apache/tomcat/util/http/parser/HttpParser.java | 5 +
 test/org/apache/tomcat/util/http/parser/TestHttpParser.java | 8 
 webapps/docs/changelog.xml  | 6 ++
 3 files changed, 19 insertions(+)

diff --git a/java/org/apache/tomcat/util/http/parser/HttpParser.java 
b/java/org/apache/tomcat/util/http/parser/HttpParser.java
index 2d21f02e68..4df0467194 100644
--- a/java/org/apache/tomcat/util/http/parser/HttpParser.java
+++ b/java/org/apache/tomcat/util/http/parser/HttpParser.java
@@ -218,6 +218,11 @@ public class HttpParser {
 char c = input.charAt(i);
 if (input.charAt(i) == '\\') {
 i++;
+if (i == end) {
+// Input (less surrounding quotes) ended with '\'. That is
+// invalid so return null.
+return null;
+}
 result.append(input.charAt(i));
 } else {
 result.append(c);
diff --git a/test/org/apache/tomcat/util/http/parser/TestHttpParser.java 
b/test/org/apache/tomcat/util/http/parser/TestHttpParser.java
index eda10e3fa6..618b52010f 100644
--- a/test/org/apache/tomcat/util/http/parser/TestHttpParser.java
+++ b/test/org/apache/tomcat/util/http/parser/TestHttpParser.java
@@ -144,6 +144,14 @@ public class TestHttpParser {
 }
 
 
+@Test
+public void testUnquoteInvalid01() {
+// Note: Test string is also Java escaped
+String shortText = "aaa\\";
+Assert.assertNull(shortText, HttpParser.unquote(shortText));
+}
+
+
 @Test
 public void testTokenStringNull() {
 Assert.assertFalse(HttpParser.isToken(null));
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 2f247fdb66..84362426a0 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -166,6 +166,12 @@
 When processing HTTP/2 requests, reject requests containing multiple
 host headers. (markt)
   
+  
+Make parsing of invalid filename directives in
+Content-Disposition headers more robust. Invalid filename
+directives will now be ignored rather than triggering a 500 response.
+(markt)
+  
 
   
   


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



Re: Migrate from Bugzilla to GitHub Issues

2022-08-18 Thread Emmanuel Bourg

On 18/08/2022 10:51, Konstantin Kolinko wrote:



Have you considered migrating from Bugzilla to GitHub Issues?



I am -1.

1. It is better to stay with a solution owned by ASF as much as possible.


Same feeling here, I like how GitHub ties the code hosting and the issue 
tracker, but I think it's important the ASF keeps the control of its 
tools. If ever the ASF replaces GitBox with GitLab or Gitea I'd support 
moving the issue tracker.


Emmanuel Bourg

-
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: Improve handling of stack overflow errors when parsing SSI expressions.

2022-08-18 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 4d207d165e Improve handling of stack overflow errors when parsing SSI 
expressions.
4d207d165e is described below

commit 4d207d165e824f04209eef1de30a3fa46cbeec59
Author: Mark Thomas 
AuthorDate: Thu Aug 18 19:20:07 2022 +0100

Improve handling of stack overflow errors when parsing SSI expressions.
---
 java/org/apache/catalina/ssi/ExpressionParseTree.java | 15 +--
 .../apache/catalina/ssi/SSIStopProcessingException.java   |  8 
 webapps/docs/changelog.xml|  4 
 3 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/ssi/ExpressionParseTree.java 
b/java/org/apache/catalina/ssi/ExpressionParseTree.java
index 1d58f70530..514d13df95 100644
--- a/java/org/apache/catalina/ssi/ExpressionParseTree.java
+++ b/java/org/apache/catalina/ssi/ExpressionParseTree.java
@@ -22,6 +22,9 @@ import java.util.LinkedList;
 import java.util.List;
 import java.util.regex.Pattern;
 import java.util.regex.PatternSyntaxException;
+
+import org.apache.tomcat.util.ExceptionUtils;
+
 /**
  * Represents a parsed expression.
  *
@@ -64,10 +67,18 @@ public class ExpressionParseTree {
 /**
  * Evaluates the tree and returns true or false. The specified SSIMediator
  * is used to resolve variable references.
+ *
  * @return the evaluation result
+ *
+ * @throws SSIStopProcessingException If an error occurs evaluating the 
tree
  */
-public boolean evaluateTree() {
-return root.evaluate();
+public boolean evaluateTree() throws SSIStopProcessingException {
+try {
+return root.evaluate();
+} catch (Throwable t) {
+ExceptionUtils.handleThrowable(t);
+throw new SSIStopProcessingException(t);
+}
 }
 
 
diff --git a/java/org/apache/catalina/ssi/SSIStopProcessingException.java 
b/java/org/apache/catalina/ssi/SSIStopProcessingException.java
index e967785e8a..c31bd7baf7 100644
--- a/java/org/apache/catalina/ssi/SSIStopProcessingException.java
+++ b/java/org/apache/catalina/ssi/SSIStopProcessingException.java
@@ -27,6 +27,14 @@ package org.apache.catalina.ssi;
  */
 public class SSIStopProcessingException extends Exception {
 
+public SSIStopProcessingException() {
+super();
+}
+
+public SSIStopProcessingException(Throwable cause) {
+super(cause);
+}
+
 private static final long serialVersionUID = 1L;
 // No specific functionality for this class
 }
\ No newline at end of file
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 6b624b08c3..4cdaf869cc 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -112,6 +112,10 @@
 INFO. Pull request 533 provided by Piotr P.
 Karwasz. (markt)
   
+  
+Improve handling of stack overflow errors when parsing SSI expressions.
+(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: Improve handling of stack overflow errors when parsing SSI expressions.

2022-08-18 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 43dc48bde7 Improve handling of stack overflow errors when parsing SSI 
expressions.
43dc48bde7 is described below

commit 43dc48bde7fa08e3dbc3d70dad615da48ad6f12f
Author: Mark Thomas 
AuthorDate: Thu Aug 18 19:20:07 2022 +0100

Improve handling of stack overflow errors when parsing SSI expressions.
---
 java/org/apache/catalina/ssi/ExpressionParseTree.java   | 13 +++--
 .../org/apache/catalina/ssi/SSIStopProcessingException.java |  8 
 webapps/docs/changelog.xml  |  4 
 3 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/ssi/ExpressionParseTree.java 
b/java/org/apache/catalina/ssi/ExpressionParseTree.java
index 0052d27c87..a6b7afc9e7 100644
--- a/java/org/apache/catalina/ssi/ExpressionParseTree.java
+++ b/java/org/apache/catalina/ssi/ExpressionParseTree.java
@@ -24,6 +24,7 @@ import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import java.util.regex.PatternSyntaxException;
 
+import org.apache.tomcat.util.ExceptionUtils;
 import org.apache.tomcat.util.res.StringManager;
 /**
  * Represents a parsed expression.
@@ -68,10 +69,18 @@ public class ExpressionParseTree {
 /**
  * Evaluates the tree and returns true or false. The specified SSIMediator
  * is used to resolve variable references.
+ *
  * @return the evaluation result
+ *
+ * @throws SSIStopProcessingException If an error occurs evaluating the 
tree
  */
-public boolean evaluateTree() {
-return root.evaluate();
+public boolean evaluateTree() throws SSIStopProcessingException {
+try {
+return root.evaluate();
+} catch (Throwable t) {
+ExceptionUtils.handleThrowable(t);
+throw new SSIStopProcessingException(t);
+}
 }
 
 
diff --git a/java/org/apache/catalina/ssi/SSIStopProcessingException.java 
b/java/org/apache/catalina/ssi/SSIStopProcessingException.java
index e967785e8a..c31bd7baf7 100644
--- a/java/org/apache/catalina/ssi/SSIStopProcessingException.java
+++ b/java/org/apache/catalina/ssi/SSIStopProcessingException.java
@@ -27,6 +27,14 @@ package org.apache.catalina.ssi;
  */
 public class SSIStopProcessingException extends Exception {
 
+public SSIStopProcessingException() {
+super();
+}
+
+public SSIStopProcessingException(Throwable cause) {
+super(cause);
+}
+
 private static final long serialVersionUID = 1L;
 // No specific functionality for this class
 }
\ No newline at end of file
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 747fd2971f..b19c23fd7c 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -133,6 +133,10 @@
 INFO. Pull request 533 provided by Piotr P.
 Karwasz. (markt)
   
+  
+Improve handling of stack overflow errors when parsing SSI expressions.
+(markt)
+  
 
   
   


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



[tomcat] branch main updated: Improve handling of stack overflow errors when parsing SSI expressions.

2022-08-18 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 2bce102b0a Improve handling of stack overflow errors when parsing SSI 
expressions.
2bce102b0a is described below

commit 2bce102b0a5e6767d35f33c6912f8bafadbfe07b
Author: Mark Thomas 
AuthorDate: Thu Aug 18 19:20:07 2022 +0100

Improve handling of stack overflow errors when parsing SSI expressions.
---
 java/org/apache/catalina/ssi/ExpressionParseTree.java   | 13 +++--
 .../org/apache/catalina/ssi/SSIStopProcessingException.java |  8 
 webapps/docs/changelog.xml  |  4 
 3 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/ssi/ExpressionParseTree.java 
b/java/org/apache/catalina/ssi/ExpressionParseTree.java
index 0052d27c87..a6b7afc9e7 100644
--- a/java/org/apache/catalina/ssi/ExpressionParseTree.java
+++ b/java/org/apache/catalina/ssi/ExpressionParseTree.java
@@ -24,6 +24,7 @@ import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import java.util.regex.PatternSyntaxException;
 
+import org.apache.tomcat.util.ExceptionUtils;
 import org.apache.tomcat.util.res.StringManager;
 /**
  * Represents a parsed expression.
@@ -68,10 +69,18 @@ public class ExpressionParseTree {
 /**
  * Evaluates the tree and returns true or false. The specified SSIMediator
  * is used to resolve variable references.
+ *
  * @return the evaluation result
+ *
+ * @throws SSIStopProcessingException If an error occurs evaluating the 
tree
  */
-public boolean evaluateTree() {
-return root.evaluate();
+public boolean evaluateTree() throws SSIStopProcessingException {
+try {
+return root.evaluate();
+} catch (Throwable t) {
+ExceptionUtils.handleThrowable(t);
+throw new SSIStopProcessingException(t);
+}
 }
 
 
diff --git a/java/org/apache/catalina/ssi/SSIStopProcessingException.java 
b/java/org/apache/catalina/ssi/SSIStopProcessingException.java
index e967785e8a..c31bd7baf7 100644
--- a/java/org/apache/catalina/ssi/SSIStopProcessingException.java
+++ b/java/org/apache/catalina/ssi/SSIStopProcessingException.java
@@ -27,6 +27,14 @@ package org.apache.catalina.ssi;
  */
 public class SSIStopProcessingException extends Exception {
 
+public SSIStopProcessingException() {
+super();
+}
+
+public SSIStopProcessingException(Throwable cause) {
+super(cause);
+}
+
 private static final long serialVersionUID = 1L;
 // No specific functionality for this class
 }
\ No newline at end of file
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index cf06746507..2f247fdb66 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -133,6 +133,10 @@
 INFO. Pull request 533 provided by Piotr P.
 Karwasz. (markt)
   
+  
+Improve handling of stack overflow errors when parsing SSI expressions.
+(markt)
+  
 
   
   


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



[tomcat] branch 10.0.x updated: Improve handling of stack overflow errors when parsing SSI expressions.

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

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


The following commit(s) were added to refs/heads/10.0.x by this push:
 new 912ed70f75 Improve handling of stack overflow errors when parsing SSI 
expressions.
912ed70f75 is described below

commit 912ed70f7548c4176e117e5aafd8d31a8eee181e
Author: Mark Thomas 
AuthorDate: Thu Aug 18 19:20:07 2022 +0100

Improve handling of stack overflow errors when parsing SSI expressions.
---
 java/org/apache/catalina/ssi/ExpressionParseTree.java   | 13 +++--
 .../org/apache/catalina/ssi/SSIStopProcessingException.java |  8 
 webapps/docs/changelog.xml  |  4 
 3 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/ssi/ExpressionParseTree.java 
b/java/org/apache/catalina/ssi/ExpressionParseTree.java
index 0052d27c87..a6b7afc9e7 100644
--- a/java/org/apache/catalina/ssi/ExpressionParseTree.java
+++ b/java/org/apache/catalina/ssi/ExpressionParseTree.java
@@ -24,6 +24,7 @@ import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import java.util.regex.PatternSyntaxException;
 
+import org.apache.tomcat.util.ExceptionUtils;
 import org.apache.tomcat.util.res.StringManager;
 /**
  * Represents a parsed expression.
@@ -68,10 +69,18 @@ public class ExpressionParseTree {
 /**
  * Evaluates the tree and returns true or false. The specified SSIMediator
  * is used to resolve variable references.
+ *
  * @return the evaluation result
+ *
+ * @throws SSIStopProcessingException If an error occurs evaluating the 
tree
  */
-public boolean evaluateTree() {
-return root.evaluate();
+public boolean evaluateTree() throws SSIStopProcessingException {
+try {
+return root.evaluate();
+} catch (Throwable t) {
+ExceptionUtils.handleThrowable(t);
+throw new SSIStopProcessingException(t);
+}
 }
 
 
diff --git a/java/org/apache/catalina/ssi/SSIStopProcessingException.java 
b/java/org/apache/catalina/ssi/SSIStopProcessingException.java
index e967785e8a..c31bd7baf7 100644
--- a/java/org/apache/catalina/ssi/SSIStopProcessingException.java
+++ b/java/org/apache/catalina/ssi/SSIStopProcessingException.java
@@ -27,6 +27,14 @@ package org.apache.catalina.ssi;
  */
 public class SSIStopProcessingException extends Exception {
 
+public SSIStopProcessingException() {
+super();
+}
+
+public SSIStopProcessingException(Throwable cause) {
+super(cause);
+}
+
 private static final long serialVersionUID = 1L;
 // No specific functionality for this class
 }
\ No newline at end of file
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index fb028a47dc..169146175a 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -133,6 +133,10 @@
 INFO. Pull request 533 provided by Piotr P.
 Karwasz. (markt)
   
+  
+Improve handling of stack overflow errors when parsing SSI expressions.
+(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: Improve handling of stack overflow errors when parsing EL expressions.

2022-08-18 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 482edcffcc Improve handling of stack overflow errors when parsing EL 
expressions.
482edcffcc is described below

commit 482edcffcc0f7f18cc1d00a86c40f8d0b942faf0
Author: Mark Thomas 
AuthorDate: Thu Aug 18 17:33:01 2022 +0100

Improve handling of stack overflow errors when parsing EL expressions.
---
 java/org/apache/el/ExpressionFactoryImpl.java  |  5 +++
 java/org/apache/el/lang/ExpressionBuilder.java |  6 ++-
 java/org/apache/el/util/ExceptionUtils.java| 56 ++
 webapps/docs/changelog.xml |  8 
 4 files changed, 73 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/el/ExpressionFactoryImpl.java 
b/java/org/apache/el/ExpressionFactoryImpl.java
index 4bd8fc374e..6ab309e374 100644
--- a/java/org/apache/el/ExpressionFactoryImpl.java
+++ b/java/org/apache/el/ExpressionFactoryImpl.java
@@ -25,6 +25,7 @@ import javax.el.ValueExpression;
 import org.apache.el.lang.ELSupport;
 import org.apache.el.lang.ExpressionBuilder;
 import org.apache.el.stream.StreamELResolverImpl;
+import org.apache.el.util.ExceptionUtils;
 import org.apache.el.util.MessageFactory;
 
 
@@ -35,6 +36,10 @@ import org.apache.el.util.MessageFactory;
  */
 public class ExpressionFactoryImpl extends ExpressionFactory {
 
+static {
+ExceptionUtils.preload();
+}
+
 @Override
 public Object coerceToType(Object obj, Class type) {
 return ELSupport.coerceToType(null, obj, type);
diff --git a/java/org/apache/el/lang/ExpressionBuilder.java 
b/java/org/apache/el/lang/ExpressionBuilder.java
index f383bccd41..bcd745e530 100644
--- a/java/org/apache/el/lang/ExpressionBuilder.java
+++ b/java/org/apache/el/lang/ExpressionBuilder.java
@@ -41,6 +41,7 @@ import org.apache.el.parser.ELParser;
 import org.apache.el.parser.Node;
 import org.apache.el.parser.NodeVisitor;
 import org.apache.el.util.ConcurrentCache;
+import org.apache.el.util.ExceptionUtils;
 import org.apache.el.util.MessageFactory;
 
 /**
@@ -145,9 +146,10 @@ public final class ExpressionBuilder implements 
NodeVisitor {
 n = n.jjtGetChild(0);
 }
 expressionCache.put(expr, n);
-} catch (Exception e) {
+} catch (Throwable t) {
+ExceptionUtils.handleThrowable(t);
 throw new ELException(
-MessageFactory.get("error.parseFail", expr), e);
+MessageFactory.get("error.parseFail", expr), t);
 } finally {
 if (parser != null) {
 parserCache.push(parser);
diff --git a/java/org/apache/el/util/ExceptionUtils.java 
b/java/org/apache/el/util/ExceptionUtils.java
new file mode 100644
index 00..d8a76ff184
--- /dev/null
+++ b/java/org/apache/el/util/ExceptionUtils.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.el.util;
+
+/**
+ * Utilities for handling Throwables and Exceptions.
+ */
+/*
+ * Copied from o.a.t.u.ExceptionUtils
+ */
+public class ExceptionUtils {
+
+/**
+ * Checks whether the supplied Throwable is one that needs to be
+ * rethrown and swallows all others.
+ * @param t the Throwable to check
+ */
+public static void handleThrowable(Throwable t) {
+if (t instanceof ThreadDeath) {
+throw (ThreadDeath) t;
+}
+if (t instanceof StackOverflowError) {
+// Swallow silently - it should be recoverable
+return;
+}
+if (t instanceof VirtualMachineError) {
+throw (VirtualMachineError) t;
+}
+// All other instances of Throwable will be silently swallowed
+}
+
+
+/**
+ * NO-OP method provided to enable simple pre-loading of this class. Since
+ * the class is used extensively in error handling, it is prudent to
+ * pre-load it to avoid any failure to load this class masking the true
+ * problem during error handling.
+ 

[tomcat] branch 9.0.x updated: Improve handling of stack overflow errors when parsing EL expressions.

2022-08-18 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 fae52996e1 Improve handling of stack overflow errors when parsing EL 
expressions.
fae52996e1 is described below

commit fae52996e1c61d8f3315973d7b08307004f03f74
Author: Mark Thomas 
AuthorDate: Thu Aug 18 17:33:01 2022 +0100

Improve handling of stack overflow errors when parsing EL expressions.
---
 java/org/apache/el/ExpressionFactoryImpl.java  |  5 +++
 java/org/apache/el/lang/ExpressionBuilder.java |  6 ++-
 java/org/apache/el/util/ExceptionUtils.java| 56 ++
 webapps/docs/changelog.xml |  8 
 4 files changed, 73 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/el/ExpressionFactoryImpl.java 
b/java/org/apache/el/ExpressionFactoryImpl.java
index a6faeb63c9..3a6690a7ab 100644
--- a/java/org/apache/el/ExpressionFactoryImpl.java
+++ b/java/org/apache/el/ExpressionFactoryImpl.java
@@ -25,6 +25,7 @@ import javax.el.ValueExpression;
 import org.apache.el.lang.ELSupport;
 import org.apache.el.lang.ExpressionBuilder;
 import org.apache.el.stream.StreamELResolverImpl;
+import org.apache.el.util.ExceptionUtils;
 import org.apache.el.util.MessageFactory;
 
 
@@ -36,6 +37,10 @@ import org.apache.el.util.MessageFactory;
 @aQute.bnd.annotation.spi.ServiceProvider(value=ExpressionFactory.class)
 public class ExpressionFactoryImpl extends ExpressionFactory {
 
+static {
+ExceptionUtils.preload();
+}
+
 @Override
 public Object coerceToType(Object obj, Class type) {
 return ELSupport.coerceToType(null, obj, type);
diff --git a/java/org/apache/el/lang/ExpressionBuilder.java 
b/java/org/apache/el/lang/ExpressionBuilder.java
index 20dec6b28d..cd170abff7 100644
--- a/java/org/apache/el/lang/ExpressionBuilder.java
+++ b/java/org/apache/el/lang/ExpressionBuilder.java
@@ -41,6 +41,7 @@ import org.apache.el.parser.ELParser;
 import org.apache.el.parser.Node;
 import org.apache.el.parser.NodeVisitor;
 import org.apache.el.util.ConcurrentCache;
+import org.apache.el.util.ExceptionUtils;
 import org.apache.el.util.MessageFactory;
 
 /**
@@ -139,9 +140,10 @@ public final class ExpressionBuilder implements 
NodeVisitor {
 n = n.jjtGetChild(0);
 }
 expressionCache.put(expr, n);
-} catch (Exception e) {
+} catch (Throwable t) {
+ExceptionUtils.handleThrowable(t);
 throw new ELException(
-MessageFactory.get("error.parseFail", expr), e);
+MessageFactory.get("error.parseFail", expr), t);
 } finally {
 if (parser != null) {
 parserCache.push(parser);
diff --git a/java/org/apache/el/util/ExceptionUtils.java 
b/java/org/apache/el/util/ExceptionUtils.java
new file mode 100644
index 00..d8a76ff184
--- /dev/null
+++ b/java/org/apache/el/util/ExceptionUtils.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.el.util;
+
+/**
+ * Utilities for handling Throwables and Exceptions.
+ */
+/*
+ * Copied from o.a.t.u.ExceptionUtils
+ */
+public class ExceptionUtils {
+
+/**
+ * Checks whether the supplied Throwable is one that needs to be
+ * rethrown and swallows all others.
+ * @param t the Throwable to check
+ */
+public static void handleThrowable(Throwable t) {
+if (t instanceof ThreadDeath) {
+throw (ThreadDeath) t;
+}
+if (t instanceof StackOverflowError) {
+// Swallow silently - it should be recoverable
+return;
+}
+if (t instanceof VirtualMachineError) {
+throw (VirtualMachineError) t;
+}
+// All other instances of Throwable will be silently swallowed
+}
+
+
+/**
+ * NO-OP method provided to enable simple pre-loading of this class. Since
+ * the class is used extensively in error handling, it is prudent to
+ * pre-load it to avoid any failure to load this 

[tomcat] branch 10.0.x updated: Improve handling of stack overflow errors when parsing EL expressions.

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

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


The following commit(s) were added to refs/heads/10.0.x by this push:
 new b61eab57db Improve handling of stack overflow errors when parsing EL 
expressions.
b61eab57db is described below

commit b61eab57db83853b7b7a666dc92b475716df6e3c
Author: Mark Thomas 
AuthorDate: Thu Aug 18 17:33:01 2022 +0100

Improve handling of stack overflow errors when parsing EL expressions.
---
 java/org/apache/el/ExpressionFactoryImpl.java  |  5 +++
 java/org/apache/el/lang/ExpressionBuilder.java |  6 ++-
 java/org/apache/el/util/ExceptionUtils.java| 56 ++
 webapps/docs/changelog.xml |  8 
 4 files changed, 73 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/el/ExpressionFactoryImpl.java 
b/java/org/apache/el/ExpressionFactoryImpl.java
index d85ed93c7d..4f50b0d895 100644
--- a/java/org/apache/el/ExpressionFactoryImpl.java
+++ b/java/org/apache/el/ExpressionFactoryImpl.java
@@ -25,6 +25,7 @@ import jakarta.el.ValueExpression;
 import org.apache.el.lang.ELSupport;
 import org.apache.el.lang.ExpressionBuilder;
 import org.apache.el.stream.StreamELResolverImpl;
+import org.apache.el.util.ExceptionUtils;
 import org.apache.el.util.MessageFactory;
 
 
@@ -36,6 +37,10 @@ import org.apache.el.util.MessageFactory;
 @aQute.bnd.annotation.spi.ServiceProvider(value=ExpressionFactory.class)
 public class ExpressionFactoryImpl extends ExpressionFactory {
 
+static {
+ExceptionUtils.preload();
+}
+
 @Override
 public Object coerceToType(Object obj, Class type) {
 return ELSupport.coerceToType(null, obj, type);
diff --git a/java/org/apache/el/lang/ExpressionBuilder.java 
b/java/org/apache/el/lang/ExpressionBuilder.java
index a98daac78a..b03b78cbf3 100644
--- a/java/org/apache/el/lang/ExpressionBuilder.java
+++ b/java/org/apache/el/lang/ExpressionBuilder.java
@@ -41,6 +41,7 @@ import org.apache.el.parser.ELParser;
 import org.apache.el.parser.Node;
 import org.apache.el.parser.NodeVisitor;
 import org.apache.el.util.ConcurrentCache;
+import org.apache.el.util.ExceptionUtils;
 import org.apache.el.util.MessageFactory;
 
 /**
@@ -139,9 +140,10 @@ public final class ExpressionBuilder implements 
NodeVisitor {
 n = n.jjtGetChild(0);
 }
 expressionCache.put(expr, n);
-} catch (Exception e) {
+} catch (Throwable t) {
+ExceptionUtils.handleThrowable(t);
 throw new ELException(
-MessageFactory.get("error.parseFail", expr), e);
+MessageFactory.get("error.parseFail", expr), t);
 } finally {
 if (parser != null) {
 parserCache.push(parser);
diff --git a/java/org/apache/el/util/ExceptionUtils.java 
b/java/org/apache/el/util/ExceptionUtils.java
new file mode 100644
index 00..d8a76ff184
--- /dev/null
+++ b/java/org/apache/el/util/ExceptionUtils.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.el.util;
+
+/**
+ * Utilities for handling Throwables and Exceptions.
+ */
+/*
+ * Copied from o.a.t.u.ExceptionUtils
+ */
+public class ExceptionUtils {
+
+/**
+ * Checks whether the supplied Throwable is one that needs to be
+ * rethrown and swallows all others.
+ * @param t the Throwable to check
+ */
+public static void handleThrowable(Throwable t) {
+if (t instanceof ThreadDeath) {
+throw (ThreadDeath) t;
+}
+if (t instanceof StackOverflowError) {
+// Swallow silently - it should be recoverable
+return;
+}
+if (t instanceof VirtualMachineError) {
+throw (VirtualMachineError) t;
+}
+// All other instances of Throwable will be silently swallowed
+}
+
+
+/**
+ * NO-OP method provided to enable simple pre-loading of this class. Since
+ * the class is used extensively in error handling, it is prudent to
+ * pre-load it to avoid any failure to load 

[tomcat] branch main updated: Improve handling of stack overflow errors when parsing EL expressions.

2022-08-18 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 05c2829fb9 Improve handling of stack overflow errors when parsing EL 
expressions.
05c2829fb9 is described below

commit 05c2829fb9c49475cb48f5e14ff400e65e2974da
Author: Mark Thomas 
AuthorDate: Thu Aug 18 17:33:01 2022 +0100

Improve handling of stack overflow errors when parsing EL expressions.
---
 java/org/apache/el/ExpressionFactoryImpl.java  |  5 +++
 java/org/apache/el/lang/ExpressionBuilder.java |  6 ++-
 java/org/apache/el/util/ExceptionUtils.java| 56 ++
 webapps/docs/changelog.xml |  8 
 4 files changed, 73 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/el/ExpressionFactoryImpl.java 
b/java/org/apache/el/ExpressionFactoryImpl.java
index 7f41d8c9d0..82f5cf123b 100644
--- a/java/org/apache/el/ExpressionFactoryImpl.java
+++ b/java/org/apache/el/ExpressionFactoryImpl.java
@@ -25,6 +25,7 @@ import jakarta.el.ValueExpression;
 import org.apache.el.lang.ELSupport;
 import org.apache.el.lang.ExpressionBuilder;
 import org.apache.el.stream.StreamELResolverImpl;
+import org.apache.el.util.ExceptionUtils;
 import org.apache.el.util.MessageFactory;
 
 
@@ -36,6 +37,10 @@ import org.apache.el.util.MessageFactory;
 @aQute.bnd.annotation.spi.ServiceProvider(value=ExpressionFactory.class)
 public class ExpressionFactoryImpl extends ExpressionFactory {
 
+static {
+ExceptionUtils.preload();
+}
+
 @Override
 public  T coerceToType(Object obj, Class type) {
 return ELSupport.coerceToType(null, obj, type);
diff --git a/java/org/apache/el/lang/ExpressionBuilder.java 
b/java/org/apache/el/lang/ExpressionBuilder.java
index a98daac78a..b03b78cbf3 100644
--- a/java/org/apache/el/lang/ExpressionBuilder.java
+++ b/java/org/apache/el/lang/ExpressionBuilder.java
@@ -41,6 +41,7 @@ import org.apache.el.parser.ELParser;
 import org.apache.el.parser.Node;
 import org.apache.el.parser.NodeVisitor;
 import org.apache.el.util.ConcurrentCache;
+import org.apache.el.util.ExceptionUtils;
 import org.apache.el.util.MessageFactory;
 
 /**
@@ -139,9 +140,10 @@ public final class ExpressionBuilder implements 
NodeVisitor {
 n = n.jjtGetChild(0);
 }
 expressionCache.put(expr, n);
-} catch (Exception e) {
+} catch (Throwable t) {
+ExceptionUtils.handleThrowable(t);
 throw new ELException(
-MessageFactory.get("error.parseFail", expr), e);
+MessageFactory.get("error.parseFail", expr), t);
 } finally {
 if (parser != null) {
 parserCache.push(parser);
diff --git a/java/org/apache/el/util/ExceptionUtils.java 
b/java/org/apache/el/util/ExceptionUtils.java
new file mode 100644
index 00..d8a76ff184
--- /dev/null
+++ b/java/org/apache/el/util/ExceptionUtils.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.el.util;
+
+/**
+ * Utilities for handling Throwables and Exceptions.
+ */
+/*
+ * Copied from o.a.t.u.ExceptionUtils
+ */
+public class ExceptionUtils {
+
+/**
+ * Checks whether the supplied Throwable is one that needs to be
+ * rethrown and swallows all others.
+ * @param t the Throwable to check
+ */
+public static void handleThrowable(Throwable t) {
+if (t instanceof ThreadDeath) {
+throw (ThreadDeath) t;
+}
+if (t instanceof StackOverflowError) {
+// Swallow silently - it should be recoverable
+return;
+}
+if (t instanceof VirtualMachineError) {
+throw (VirtualMachineError) t;
+}
+// All other instances of Throwable will be silently swallowed
+}
+
+
+/**
+ * NO-OP method provided to enable simple pre-loading of this class. Since
+ * the class is used extensively in error handling, it is prudent to
+ * pre-load it to avoid any failure to load this 

Re: Migrate from Bugzilla to GitHub Issues

2022-08-18 Thread Christopher Schultz

All,

On 8/18/22 08:30, Mark Thomas wrote:



On 18/08/2022 13:21, Graham Leggett wrote:
On 18 Aug 2022, at 06:57, Vladimir Sitnikov 
 wrote:



Have you considered migrating from Bugzilla to GitHub Issues?

I think co-locating issues, code, and PRs at GitHub would make it 
easier to

browse both issues and code.


-1.

GitHub as a service is hosted by someone else, who are in no way 
obligated to keep the service running for our benefit. Hosted services 
come and go regularly, and it is an enormous waste of time and effort 
for people to perform avoidable migrations each time this happens.


We mirror to Github because Github did the work to make that happen. 
It’s great that they did that, but support could be withdrawn at any 
time and without warning.


The ASF wrote the GitBox <-> GitHub synchronization code as there wasn't 
anything available that would allow us to keep an independent ASF repo 
in sync with a GitHub repo and allow commits to either. It was that sync 
code that opened up the possibility of commits to AS projects via GitHub.


There is also the problem that hosting issue tracking at GitHub requires 
users to sign up for a GitHub account and agree to GitHub's Ts in 
order to report an issue. There are a small number of users that are not 
prepared to do that.


There are benefits and risks associated with switching to issue tracking 
at GitHub. We need to weigh the one against the other.


As an experiment, we are tracking Migration Tool issues on GitHub. It is 
a small tool so there are only a few issues and limited data. I haven't 
seen anything yet that convinces me that there is a strong argument for 
or against using GitHub issues. If the Tomcat Maven plugin project 
starts to show signs of life, we could try migrating its issues to 
GitHub as a larger experiment.


I am also -1 on migrating from Bugzilla -> GitHub precisely for all the 
reasons already mentioned.


While you can't create a GH issue, you can always create a PR that 
includes an explanation of the bug. It's not a format Issue, but it does 
get the job done.


-chris

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



Re: BUILDING.txt

2022-08-18 Thread Christopher Schultz

Han,

On 8/17/22 22:35, Han Li wrote:

I found that BUILDING.txt in the source distribution of all version hasn’t been 
merged as expected.
I think this is a source distribution, BUILDING.txt is part of the source, so 
it’s normal for this file not to be processed.


Well, I know that if I had downloaded the source and intended to build 
it, I would be surprised to find that the documentation says "Get 
yourself a copy of Java @REQUIRED_JAVA_VERSION@" because I wouldn't know 
where to look.


If it comes out of git looking like that, it's fine. But the official 
source distribution should really have easy-to-read documentation.


-chris


2022年8月18日 09:36,Christopher Schultz  写道:

All,

On 8/17/22 21:23, Christopher Schultz wrote:

I just noticed that BUILDING.txt in the source distribution of Tomcat 8.5.82 
hasn't been merged as expected:
"

Building The Apache Tomcat @VERSION_MAJOR_MINOR@ Servlet/JSP Container

This project contains the source code for Tomcat @VERSION_MAJOR_MINOR@, a 
container that
implements the Servlet @SERVLET_SPEC_VERSION@, JSP @JSP_SPEC_VERSION@, EL 
@EL_SPEC_VERSION@, WebSocket @WEBSOCKET_SPEC_VERSION@ and JASPIC 
@JASPIC_SPEC_VERSION@
specifications from the Java Community Process .
"
I think we might need to enable token-replacement during copy. Or something 
else. I'll have a look.
I'd also like to add some information about the repeatable build process.


FWIW, the copy of BUILDING.txt that goes into output/build/webapps/docs/BUILDING.txt is 
properly-merged. I think when performing a "release" build, that file, once 
merged, need to be copied over the BUILDING.txt that is at the root of the source archive.

-chris

-
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: Migrate from Bugzilla to GitHub Issues

2022-08-18 Thread Vladimir Sitnikov
>GitLab is certainly there and is well-known,
>and anyone can create their own. It is not that hard.

For reference, it would be hard to integrate Gitlab with ASF infra.

>The result is that they are scattered all over my GMail Inbox

Great. Thank you for the suggestion.
I knew something was wrong with GitBox notifications, however, I was not
sure what was wrong,
so I just deleted GitBox emails and used GitHub notifications instead.

I've bumped the relevant 3y.o. thread:
https://lists.apache.org/thread/1h94t08dtfr3wc86x46ogv7dbb1y64y7
Hopefully, it won't take long to remove the username, and action from the
email subject.

Vladimir


[GitHub] [tomcat] markt-asf commented on pull request #544: Avoid errors from shutting down `LoggerThread`

2022-08-18 Thread GitBox


markt-asf commented on PR #544:
URL: https://github.com/apache/tomcat/pull/544#issuecomment-1219639781

   No need for a BZ issue.
   This looks like it needs some variation of ExceptionUtils.handleThrowable(). 
JULI may need its own copy of the utility.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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



[GitHub] [tomcat] ppkarwasz opened a new pull request, #544: Avoid errors from shutting down `LoggerThread`

2022-08-18 Thread GitBox


ppkarwasz opened a new pull request, #544:
URL: https://github.com/apache/tomcat/pull/544

   A Java `Error` in the `LoggerThread` can effectively cripple Tomcat JULI, 
preventing all `AsyncFileHandler` from writing to their files.
   
   We experienced such a logging shutdown on a real Gerrit installation, when a 
`toString()` method threw a `NoClassDefFoundError` and stopped the logger 
thread used by all the applications on the server.
   
   Should I file a BZ bug?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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



[Bug 66209] CPU regression when classpath Bloom filters are active

2022-08-18 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=66209

--- Comment #8 from John Engebretson  ---
Sure - looking at the specific code in
https://github.com/FastFilter/xorfilter/blob/master/xorfilter.go vs
https://github.com/apache/tomcat/blob/9.0.x/java/org/apache/catalina/webresources/JarContents.java,
the Bloom filter uses two hashes and two bitwise lookups; the Xor filter uses
three hashes and three reduce operations.  Two hashes vs three is an
implementation detail but the extra work of the reduces, although small, may
come down to the number of instructions required.  I don't have the expertise
to address that point, but at a minimum there are more method calls and any
associated overhead.

As I reread the code though, I notice that the current JarContents code uses a
fixed-length array of bits, and the Xor filter uses a variable length array of
uint8.  Fixed vs. variable length can be addressed, but bit vs uint8 certainly
does.  For a given number of buckets, the JarContents implementation will
therefore be far smaller in memory.  I think?

However, this conversation isn't tied to the bug/feature/behavior about memory
cleanup.  Might be interesting to chase this separately as an enhancement.

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



Re: Migrate from Bugzilla to GitHub Issues

2022-08-18 Thread Konstantin Kolinko
чт, 18 авг. 2022 г. в 15:13, Vladimir Sitnikov :
>
> > 1. It is better to stay with a solution owned by ASF as much as possible.
> > For political reasons such as independence.
>
> AFAIK, the ASF is incorporated in the USA, so the organization must
> follow the USA laws.
> Are you sure the ASF provides "political independence"?

I mean that the mission of ASF is to be a vendor-neutral place where people
(employed by different companies)
can collaborate to develop free software for the public good.

The mission of Microsoft (the current owner of GitHub) is that of a
commercial entity,
and is different from ours.

What Microsoft does is governed by laws of the State of Washington, US,
maybe by laws of Ireland (where is their unit that provides marketing
and sales for the EMEA region),
and generally by their business interests.

Legally, it is expressed in their written agreements,
or in public agreements such as Terms of Service, EULA etc.

Sometimes corporations do what they feel is in their business interests,
regardless of whether there are actual laws.


ASF is governed by the laws of the State of Delaware, US,
and has a different mission, public image, etc.


> > GitHub is not the only git hosting service out there.
>
> To my best knowledge, the ASF supports only two git hosting services:
> a) GitBox (see https://git.apache.org/)
> b) GitHub (it any case it is mirrored to GitBox)

As with ASF mailing lists, that have a number of independent archives,
there can be (now or in the future) any number of git mirrors.

GitBox at ASF is the main repository.
GitHub is a mirror.

I would be happy to accept a PR from any other git hosting service.


> To my best knowledge, GitHub is the only git service that integrates
> issue tracking and code hosting.

GitLab is certainly there and is well-known,
and anyone can create their own. It is not that hard.

https://docs.gitlab.com/ee/user/project/issues/


>
> Just in case, GitHub uses markdown for the format, so the emails in
> text form are readable.

GitHub (or maybe GitBox) sends e-mails that are titled like

"[GitHub] [tomcat-jakartaee-migration] aooohan commented on issue #29: ..."

The result is that they are scattered all over my GMail Inbox,
are split by a user name (aooohan in this case) and action (commented,
created, closed).

It is hard to see the whole discussion without going to the GitHub site.

Best regards,
Konstantin Kolinko

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



[Bug 66209] CPU regression when classpath Bloom filters are active

2022-08-18 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=66209

--- Comment #7 from Vladimir Sitnikov  ---
> It appears to me that Xor has lower memory usage but increases the cost of a 
> lookup

Would you please clarify why you expect Xor filters to have a slower lookup?

See https://arxiv.org/pdf/1912.08258.pdf
Table 3. Membership-test benchmark results, 25% find. Timings are in nanosecond
per query.


Xor filters might be faster than Bloom filters.

The key tradeoff is that Bloom filter allow "adding more elements to the set",
while Xor filter does not support "add(...)" command.

-- 
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 66209] CPU regression when classpath Bloom filters are active

2022-08-18 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=66209

--- Comment #6 from John Engebretson  ---
(In reply to Vladimir Sitnikov from comment #5)
> As the set of entries in Jar is known in advance, and the entries are not
> modified, Xor Filter might be better.
> 
> See 
> http://web.stanford.edu/class/archive/cs/cs166/cs166.1216/lectures/13/
> Slides13.pdf#page=49
> 
> https://github.com/FastFilter/xorfilter

Thank you for the links!  It appears to me that Xor has lower memory usage but
increases the cost of a lookup.  For our applications, that is the wrong
tradeoff, however it may work as another value of "archiveIndexing".

-- 
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 66209] CPU regression when classpath Bloom filters are active

2022-08-18 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=66209

--- Comment #5 from Vladimir Sitnikov  ---
As the set of entries in Jar is known in advance, and the entries are not
modified, Xor Filter might be better.

See 
http://web.stanford.edu/class/archive/cs/cs166/cs166.1216/lectures/13/Slides13.pdf#page=49

https://github.com/FastFilter/xorfilter

-- 
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 66209] CPU regression when classpath Bloom filters are active

2022-08-18 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=66209

--- Comment #4 from John Engebretson  ---
> I think it makes sense to re-name/alias the current setting to something
> more clear such as "archiveIndexing" with values like "simple", "bloom" and
> now "purged-bloom" or whatever.

I like this suggestion.

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



Re: Migrate from Bugzilla to GitHub Issues

2022-08-18 Thread Mark Thomas




On 18/08/2022 13:21, Graham Leggett wrote:

On 18 Aug 2022, at 06:57, Vladimir Sitnikov  wrote:


Have you considered migrating from Bugzilla to GitHub Issues?

I think co-locating issues, code, and PRs at GitHub would make it easier to
browse both issues and code.


-1.

GitHub as a service is hosted by someone else, who are in no way obligated to 
keep the service running for our benefit. Hosted services come and go 
regularly, and it is an enormous waste of time and effort for people to perform 
avoidable migrations each time this happens.

We mirror to Github because Github did the work to make that happen. It’s great 
that they did that, but support could be withdrawn at any time and without 
warning.


The ASF wrote the GitBox <-> GitHub synchronization code as there wasn't 
anything available that would allow us to keep an independent ASF repo 
in sync with a GitHub repo and allow commits to either. It was that sync 
code that opened up the possibility of commits to AS projects via GitHub.


There is also the problem that hosting issue tracking at GitHub requires 
users to sign up for a GitHub account and agree to GitHub's Ts in 
order to report an issue. There are a small number of users that are not 
prepared to do that.


There are benefits and risks associated with switching to issue tracking 
at GitHub. We need to weigh the one against the other.


As an experiment, we are tracking Migration Tool issues on GitHub. It is 
a small tool so there are only a few issues and limited data. I haven't 
seen anything yet that convinces me that there is a strong argument for 
or against using GitHub issues. If the Tomcat Maven plugin project 
starts to show signs of life, we could try migrating its issues to 
GitHub as a larger experiment.


Mark

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



Re: Migrate from Bugzilla to GitHub Issues

2022-08-18 Thread Graham Leggett
On 18 Aug 2022, at 06:57, Vladimir Sitnikov  wrote:

> Have you considered migrating from Bugzilla to GitHub Issues?
> 
> I think co-locating issues, code, and PRs at GitHub would make it easier to
> browse both issues and code.

-1.

GitHub as a service is hosted by someone else, who are in no way obligated to 
keep the service running for our benefit. Hosted services come and go 
regularly, and it is an enormous waste of time and effort for people to perform 
avoidable migrations each time this happens.

We mirror to Github because Github did the work to make that happen. It’s great 
that they did that, but support could be withdrawn at any time and without 
warning.

Regards,
Graham
—


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



Re: Migrate from Bugzilla to GitHub Issues

2022-08-18 Thread Vladimir Sitnikov
> 1. It is better to stay with a solution owned by ASF as much as possible.
> For political reasons such as independence.

AFAIK, the ASF is incorporated in the USA, so the organization must
follow the USA laws.
Are you sure the ASF provides "political independence"?

> GitHub is not the only git hosting service out there.

To my best knowledge, the ASF supports only two git hosting services:
a) GitBox (see https://git.apache.org/)
b) GitHub (it any case it is mirrored to GitBox)

GitBox does not support issue tracking, so would you please clarify
what do you mean by
"is not the only git hosting service out there"?

To my best knowledge, GitHub is the only git service that integrates
issue tracking and code hosting.
At the same time, Tomcat hosts code at GitHub, and there's a
significant number of PR contributions via GitHub:
https://github.com/apache/tomcat/pulls, so it looks reasonable to move
issues closer to PRs and code.

> 2. E-mails allowed to the mailing lists have to be plain text.

Well, GitBox does produce text emails that look not much different
from Bugzilla emails to me.

Just in case, GitHub uses markdown for the format, so the emails in
text form are readable.
Here's a recent bug where comment already uses markdown, so the same
thing would look better in GitHub UI:
https://bz.apache.org/bugzilla/show_bug.cgi?id=66191

"issue created" mail:
https://lists.apache.org/thread/4q6vmr0qq7w3pomtx1qpyj2gy8f0576h
"issue commented" mail:
https://lists.apache.org/thread/rch13owttglnpq2gfg6xhz00kw73on71

Would you please check the above notifications and clarify why you
think Bugzilla emails are better?

Vladimir

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



[Bug 66178] Reduce garbage from strings in AbstractArchiveResourceSet.getResource

2022-08-18 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=66178

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |NEEDINFO

--- Comment #13 from Mark Thomas  ---
I have been trying to recreate these results without success.

I am not comfortable applying a performance change without being able to
reliably recreate the results.

Please provide the exact steps to recreate these results from a clean
installation of the latest release of any supported Tomcat major version
(8.5.x, 9.0.x, 10.0.x or 10.1.x).

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



[GitHub] [tomcat-jakartaee-migration] nissan4x4 commented on issue #29: Exception in thread "main" java.util.zip.ZipException: Bad CRC checksum for entry META-INF/MANIFEST.MF

2022-08-18 Thread GitBox


nissan4x4 commented on issue #29:
URL: 
https://github.com/apache/tomcat-jakartaee-migration/issues/29#issuecomment-1219283706

   Thank you very much Han. That worked perfectly.
   

   

   
   From: Han Li ***@***.***> 
   Sent: Thursday, 18 August 2022 7:17 PM
   To: apache/tomcat-jakartaee-migration ***@***.***>
   Cc: nissan4x4 ***@***.***>; Mention ***@***.***>
   Subject: Re: [apache/tomcat-jakartaee-migration] Exception in thread "main" 
java.util.zip.ZipException: Bad CRC checksum for entry META-INF/MANIFEST.MF 
(Issue #29)
   

   
   but my OS is windows not Unix.
   
   Sorry, I was careless.
   jakartaee-migration-1.0.2-SNAPSHOT-bin.zip 

 
   
   The steps are the same, first you need to unzip the package, then go to the 
lib folder and execute the jakartaee-migration-1.0.2-SNAPSHOT.jar file(the 
command is the same).
   
   JAVA_HOME/bin/java.exe -jar jakartaee-migration-1.0.2-SNAPSHOT.jar 
your-war.war target-your-war.war
   
   —
   Reply to this email directly, view it on GitHub 

 , or unsubscribe 

 .
   You are receiving this because you were mentioned.  

 Message ID: ***@***.*** ***@***.***> >
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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



[GitHub] [tomcat-jakartaee-migration] aooohan commented on issue #29: Exception in thread "main" java.util.zip.ZipException: Bad CRC checksum for entry META-INF/MANIFEST.MF

2022-08-18 Thread GitBox


aooohan commented on issue #29:
URL: 
https://github.com/apache/tomcat-jakartaee-migration/issues/29#issuecomment-1219238170

   > but my OS is windows not Unix. 
   
   Sorry, I was careless.
   
[jakartaee-migration-1.0.2-SNAPSHOT-bin.zip](https://github.com/apache/tomcat-jakartaee-migration/files/9372150/jakartaee-migration-1.0.2-SNAPSHOT-bin.zip)
   
   The steps are the same, first you need to unzip the package, then go to the 
lib folder and execute the jakartaee-migration-1.0.2-SNAPSHOT.jar file(the 
command is the same).
   
   JAVA_HOME/bin/java.exe -jar jakartaee-migration-1.0.2-SNAPSHOT.jar 
your-war.war target-your-war.war
   
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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



Re: Migrate from Bugzilla to GitHub Issues

2022-08-18 Thread Han Li



> 2022年8月18日 16:51,Konstantin Kolinko  写道:
> 
> чт, 18 авг. 2022 г. в 07:57, Vladimir Sitnikov :
>> 
>> Hi,
>> 
>> 
>> Have you considered migrating from Bugzilla to GitHub Issues?
>> 
> 
> I am -1.
> 
> 1. It is better to stay with a solution owned by ASF as much as possible.
+1

Han

> 
> For political reasons such as independence.
> As well as for redundancy etc.
> 
> GitHub is not the only git hosting service out there.
> 
> 
> Also, recently there were rumors about some developers being banned from 
> GitHub.
> I cannot verify whether those rumors were accurate,
> but overall it looked like something that may happen.
> 
> 
>> GitHub allows richer comment formatting (e.g. code highlight).
> 
> 2. E-mails allowed to the mailing lists have to be plain text.
> 
> E-mails from Bugzilla are easier to follow.
> 
> Best regards,
> Konstantin Kolinko
> 
> -
> 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



[GitHub] [tomcat-jakartaee-migration] nissan4x4 commented on issue #29: Exception in thread "main" java.util.zip.ZipException: Bad CRC checksum for entry META-INF/MANIFEST.MF

2022-08-18 Thread GitBox


nissan4x4 commented on issue #29:
URL: 
https://github.com/apache/tomcat-jakartaee-migration/issues/29#issuecomment-1219219413

   Hi Han,
   
   Thanks for that, but my OS is windows not Unix.
   

   
   From: Han Li ***@***.***> 
   Sent: Thursday, 18 August 2022 6:03 PM
   To: apache/tomcat-jakartaee-migration
   ***@***.***>
   Cc: nissan4x4 ***@***.***>; Mention
   ***@***.***>
   Subject: Re: [apache/tomcat-jakartaee-migration] Exception in thread "main"
   java.util.zip.ZipException: Bad CRC checksum for entry META-INF/MANIFEST.MF
   (Issue #29)
   

   
   Hi, @nissan4x4  
   jakartaee-migration-1.0.2-SNAPSHOT-bin.tar.gz
    
   
   You can use this temporary tool to test whether the migration of your war
   package works.
   
   *tar -zxvf jakartaee-migration-1.0.2-SNAPSHOT-bin.tar.gz
   *cd jakartaee-migration-1.0.2-SNAPSHOT/lib
   *java -jar jakartaee-migration-1.0.2-SNAPSHOT.jar your-war.war
   target-your-war.war OR java -jar your-war-dir target-dir
   
   Note: This is not a release version, it has nothing to do with tc offical,
   it is only for testing.
   
   -
   Reply to this email directly, view it on GitHub
    , or unsubscribe
    .
   You are receiving this because you were mentioned.
    Message ID:
   ***@***.***
   ***@***.***> >
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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



Re: Migrate from Bugzilla to GitHub Issues

2022-08-18 Thread Konstantin Kolinko
чт, 18 авг. 2022 г. в 07:57, Vladimir Sitnikov :
>
> Hi,
>
>
> Have you considered migrating from Bugzilla to GitHub Issues?
>

I am -1.

1. It is better to stay with a solution owned by ASF as much as possible.

For political reasons such as independence.
As well as for redundancy etc.

GitHub is not the only git hosting service out there.


Also, recently there were rumors about some developers being banned from GitHub.
I cannot verify whether those rumors were accurate,
but overall it looked like something that may happen.


> GitHub allows richer comment formatting (e.g. code highlight).

2. E-mails allowed to the mailing lists have to be plain text.

E-mails from Bugzilla are easier to follow.

Best regards,
Konstantin Kolinko

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



[GitHub] [tomcat-jakartaee-migration] aooohan commented on issue #29: Exception in thread "main" java.util.zip.ZipException: Bad CRC checksum for entry META-INF/MANIFEST.MF

2022-08-18 Thread GitBox


aooohan commented on issue #29:
URL: 
https://github.com/apache/tomcat-jakartaee-migration/issues/29#issuecomment-1219162105

   Hi, @nissan4x4 
   
[jakartaee-migration-1.0.2-SNAPSHOT-bin.tar.gz](https://github.com/apache/tomcat-jakartaee-migration/files/9371552/jakartaee-migration-1.0.2-SNAPSHOT-bin.tar.gz)
   
   You can use this temporary tool to test whether the migration of your war 
package works.
   
   - `tar -zxvf jakartaee-migration-1.0.2-SNAPSHOT-bin.tar.gz`
   - `cd jakartaee-migration-1.0.2-SNAPSHOT/lib`
   - `java -jar jakartaee-migration-1.0.2-SNAPSHOT.jar your-war.war 
target-your-war.war` **OR**` java -jar your-war-dir target-dir`
   
   **Note**: This is not a release version, it has nothing to do with tc 
offical, it is only for testing.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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



[GitHub] [tomcat-jakartaee-migration] nissan4x4 commented on issue #29: Exception in thread "main" java.util.zip.ZipException: Bad CRC checksum for entry META-INF/MANIFEST.MF

2022-08-18 Thread GitBox


nissan4x4 commented on issue #29:
URL: 
https://github.com/apache/tomcat-jakartaee-migration/issues/29#issuecomment-1219144189

   Hi,  @aooohan. I am experiencing the same issue as @gregorkistler with the 
CRC.
   ```
   18-Aug-2022 14:55:06.339 WARNING [Catalina-utility-1] 
org.apache.catalina.startup.HostConfig.migrateLegacyApp Migration failure
java.util.zip.ZipException: Bad CRC checksum for entry 
META-INF/MANIFEST.MF: 277a0274 instead of 5cfc51fe
at 
org.apache.tomcat.jakartaee.commons.compress.archivers.zip.ZipArchiveOutputStream.handleSizesAndCrc(ZipArchiveOutputStream.java:718)
   
   ```
   OS is Windows 2019 server
   JAVA 8 (jre-8u341-windows-i586)
   Tomcat 10.0.23
   
   I'm having TC do the migration by placing the *.war into the webapps-javaee 
folder.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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



[GitHub] [tomcat] tianshuang opened a new pull request, #543: Optimize comment

2022-08-18 Thread GitBox


tianshuang opened a new pull request, #543:
URL: https://github.com/apache/tomcat/pull/543

   HTTP2 also supports relative redirects.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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