[Bug 64872] Inefficient enum resolution in JSPs

2020-11-10 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64872

--- Comment #6 from John Engebretson  ---
We have a Tomcat8 implementation deployed that addresses the following cases:

Boolean/boolean properties:
value="true"
value="${true}"
value="${'true'}"

String properties:
value="${'myString'}"

Enum properties:
value="hotFudge"
value="${'hotFudge'}"

We considered the literal conversions to be quite safe, but the others were
debated. 
- For booleans we decided that anyone who wrote true but wanted false could fix
their own problem.
- For enums, our codebase contained many places where engineers forgot to use
the literal syntax, so there was substantial value in taking a risk.  We
settled on applying the optimization when the string matched the name of an
enum value, else allow the current EL evaluation to occur as normal.  The
optimized JSPs would clearly reflect the author's intent when valid but
fallback to previous behavior when intent wasn't clear.

We are satisfied with the balance we struck, but I'm interested in your take.

-- 
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 64872] Inefficient enum resolution in JSPs

2020-11-10 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64872

--- Comment #5 from Mark Thomas  ---
Yes, I could support a feature like that.

The tricky part is going to be implementing it. The JSP engine doesn't have
access to the internals of the EL parser. Just musing on that, are all the uses
of the form property="${'literal-string'}" so the process we are trying to
short-cut is the literal to appropriate type coercion?

-- 
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 64872] Inefficient enum resolution in JSPs

2020-11-10 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64872

--- Comment #4 from John Engebretson  ---
"Fudging the spec is not an option." Understood.

"That said, I do wonder why expression language is being used in these
instances rather than a scriptlet."  EL was originally used for this because a)
it hid the details of the enums, b) it worked, c) no one understood the
performance impacts vs. scriptlets, d) scriptlets are discouraged internally
because of maintainability issues.

Your search-and-replace suggestion could work, but given the size of our
codebase and the sheer number of variations, it isn't feasible.

My view of this suggestion is a mechanism for making the existing behavior much
faster - with the unfortunate exception that you pointed out.  Making adoption
free or trivial (config flag) will maximize that benefit for Tomcat users and
would give Tomcat an efficiency advantage over similar containers; in our case
performance matters most and we wouldn't consider switching off Tomcat unless
similar features were available on a competitor.

It sounds like you could support an "accelerated JSP" mode that defaults to
off, and documentation clearly describes how it violates spec?

-- 
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 64872] Inefficient enum resolution in JSPs

2020-11-10 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64872

--- Comment #3 from Mark Thomas  ---
Fudging the spec is not an option. Providing an option that provides non-spec
compliant behaviour and is disabled by default is an option.

That said, I do wonder why expression language is being used in these instances
rather than a scriptlet.



rather than



should give you exactly the behaviour you desire shouldn't it?

I'd also expect it be possible to implement with some form of global search and
replace. That approach strikes me as a rather less risky solution (both from an
implementation point of view and a testing one) than an optimisation in the JSP
compiler. It also means you would not be reliant on a Tomcat specific
performance tweak should you decide to switch containers at some point.

-- 
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 64875] ClassNotFoundException with GraalVM and JNI

2020-11-10 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64875

--- Comment #10 from Iván López  ---
Regarding the class `io.netty.internal.tcnative.SSLPrivateKeyMethod`, it's
coming because the test application we have uses Micronaut Http Client, that
uses some Netty dependencies under the hood.

But even with that, I think that "triggering" the JNI stuff for every single
application the uses Tomcat is not a good default because users don't have an
option to disable it.

Another approach would be to create a GraalVM `@AutomaticFeature` class so
programatically can be decided if the JNI stuff needs to be added or not. It
could be enabled (added) by default but with some flag or configuration option
could be disabled. This way we could disable it by default in Micronaut.

-- 
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 64875] ClassNotFoundException with GraalVM and JNI

2020-11-10 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64875

--- Comment #9 from Iván López  ---
I think that Graal will only look for `jni-config.json` automatically, so if
the file is called `tomcat-jni.json` the user needs to manually "enable" it.

-- 
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 7.0.x updated: Add credit

2020-11-10 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/7.0.x by this push:
 new f464506  Add credit
f464506 is described below

commit f464506fd6975dccc40100bd55d45f942442e76c
Author: Mark Thomas 
AuthorDate: Tue Nov 10 15:55:42 2020 +

Add credit
---
 webapps/docs/changelog.xml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 72da323..4e6b6f2 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -124,7 +124,8 @@
   
   
 Configure the examples, Manager and Host Manager to use the HTTP header
-security filter with default settings apart from no HSTS header. 
(markt)
+security filter with default settings apart from no HSTS header. Based
+on a suggestion by Debangshu Kundu. (markt)
   
 
   


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



[tomcat] branch master updated: Add credit

2020-11-10 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 590f7d9  Add credit
590f7d9 is described below

commit 590f7d9298584567d57c2e1eb7b53e2ce283d457
Author: Mark Thomas 
AuthorDate: Tue Nov 10 15:55:42 2020 +

Add credit
---
 webapps/docs/changelog.xml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index dfd14ee..c49ff08 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -192,7 +192,8 @@
   
   
 Configure the examples, Manager and Host Manager to use the HTTP header
-security filter with default settings apart from no HSTS header. 
(markt)
+security filter with default settings apart from no HSTS header. Based
+on a suggestion by Debangshu Kundu. (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: Add credit

2020-11-10 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 c598ff8  Add credit
c598ff8 is described below

commit c598ff86773117f68c78458cf6438b2c3e28a467
Author: Mark Thomas 
AuthorDate: Tue Nov 10 15:55:42 2020 +

Add credit
---
 webapps/docs/changelog.xml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index e182626..91b214f 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -136,7 +136,8 @@
   
   
 Configure the examples, Manager and Host Manager to use the HTTP header
-security filter with default settings apart from no HSTS header. 
(markt)
+security filter with default settings apart from no HSTS header. Based
+on a suggestion by Debangshu Kundu. (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: Add credit

2020-11-10 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 4eaf189  Add credit
4eaf189 is described below

commit 4eaf189d353bd1a5771ea3512d188173610e0368
Author: Mark Thomas 
AuthorDate: Tue Nov 10 15:55:42 2020 +

Add credit
---
 webapps/docs/changelog.xml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 800b422..0a1a928 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -188,7 +188,8 @@
   
   
 Configure the examples, Manager and Host Manager to use the HTTP header
-security filter with default settings apart from no HSTS header. 
(markt)
+security filter with default settings apart from no HSTS header. Based
+on a suggestion by Debangshu Kundu. (markt)
   
 
   


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



[Bug 64875] ClassNotFoundException with GraalVM and JNI

2020-11-10 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64875

--- Comment #8 from Remy Maucherat  ---
(In reply to Iván López from comment #7)
> Yes please, that would be awesome because we (Micronaut) will be able to
> upgrade to the next 9.0.40 (at this moment I rolled back to 9.0.38).

There would be legitimate reasons to still include a smaller one like this (
https://github.com/apache/tomcat/blob/master/modules/stuffed/tomcat-jni.json )
for OpenSSL only, so removing the descriptor is not a good move.

io.netty.internal.tcnative.SSLPrivateKeyMethod is being used by something.
Maybe the mere presence of the descriptor makes Graal want to look at JNI where
it would otherwise not, causing the problems.

-- 
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 64818] Allow duplicate URL mapping to the same Servlet

2020-11-10 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64818

Igal Sapir  changed:

   What|Removed |Added

 Resolution|--- |WONTFIX
 Status|NEW |RESOLVED

--- Comment #11 from Igal Sapir  ---
Closing this as WONTFIX per discussion in comments, so we can focus on bigger
and better things

-- 
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 64875] ClassNotFoundException with GraalVM and JNI

2020-11-10 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64875

--- Comment #7 from Iván López  ---
> I don't mind removing "-H:JNIConfigurationResources=${.}/tomcat-jni.json" 
> from 
>https://github.com/apache/tomcat/blob/da3b672ed6b59afbc6341c2bb00aad435bcf7a9b/res/graal/tomcat-embed-core/native-image/native-image.properties#L16
>But let's keep tomcat-jni.json in META-INF/... This way if anyone wants to use 
>APR (s)he will be able to refer to it in his/her native-image build parameters.
>Is this OK for everyone ?

Yes please, that would be awesome because we (Micronaut) will be able to
upgrade to the next 9.0.40 (at this moment I rolled back to 9.0.38).

-- 
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 64875] ClassNotFoundException with GraalVM and JNI

2020-11-10 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64875

--- Comment #6 from mgrigorov  ---
(In reply to Remy Maucherat from comment #5)
> (In reply to mgrigorov from comment #2)
> > I've made it possible to use APR protocol.
> > There is nothing Netty specific in it.
> > As Remy explained you need to find out how Netty is being involved and why
> > it breaks the things.
> 
> I also cannot see where Netty could possibly be coming from, it's 100% not
> used in Tomcat, so it comes from a library somewhere else.
> 
> However, I don't understand the idea behind advocating use of the APR
> connector especially in embedded. The plan is still to remove it completely
> at the moment.

It is not advocating anything. It just fixed a broken use case. All other
protocols (NIO and NIO2) worked out of the box. APR was failing with
"Unsupported JNI version 0x".
org.apache.coyote.http11.Http11AprProtocol is not deprecated in even in master
branch, so I just fixed the problem.

> 
> With the standalone native image build, I tested NIO/OpenSSL, but APR is not
> supported at all in the descriptors. And even NIO/OpenSSL brings along all

What do you mean with "APR is not supported in the descriptors" ?
After adding tomcat-jni.json I was able to use APR protocol without any other
problems.

> the build/runtime problems with containers. Since now even Java 8 does ALPN
> properly, I would say it is more reasonable to stick to the base JVM
> whenever possible.


I don't mind removing "-H:JNIConfigurationResources=${.}/tomcat-jni.json" from 
https://github.com/apache/tomcat/blob/da3b672ed6b59afbc6341c2bb00aad435bcf7a9b/res/graal/tomcat-embed-core/native-image/native-image.properties#L16
But let's keep tomcat-jni.json in META-INF/... This way if anyone wants to use
APR (s)he will be able to refer to it in his/her native-image build parameters.
Is this OK for everyone ?

-- 
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 master updated: Fix Windows test failures

2020-11-10 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new da3b672  Fix Windows test failures
da3b672 is described below

commit da3b672ed6b59afbc6341c2bb00aad435bcf7a9b
Author: Mark Thomas 
AuthorDate: Tue Nov 10 13:41:48 2020 +

Fix Windows test failures
---
 test/org/apache/coyote/http11/TestHttp11Processor.java | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/test/org/apache/coyote/http11/TestHttp11Processor.java 
b/test/org/apache/coyote/http11/TestHttp11Processor.java
index 80c4ca3..8ac21f4 100644
--- a/test/org/apache/coyote/http11/TestHttp11Processor.java
+++ b/test/org/apache/coyote/http11/TestHttp11Processor.java
@@ -1728,7 +1728,15 @@ public class TestHttp11Processor extends TomcatBaseTest {
 client.setRequestPause(delay);
 
 client.connect();
-client.processRequest();
+try {
+client.processRequest();
+} catch (IOException ioe) {
+// Failure is expected on some platforms (notably Windows) if the
+// longer upload timeout is not used but record the exception in
+// case it is useful for debugging purposes.
+// The assertions below will check for the correct behaviour.
+ioe.printStackTrace();
+}
 
 if (useLongerUploadTimeout) {
 // Expected response is a 200 response.


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



[Bug 64875] ClassNotFoundException with GraalVM and JNI

2020-11-10 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64875

--- Comment #5 from Remy Maucherat  ---
(In reply to mgrigorov from comment #2)
> I've made it possible to use APR protocol.
> There is nothing Netty specific in it.
> As Remy explained you need to find out how Netty is being involved and why
> it breaks the things.

I also cannot see where Netty could possibly be coming from, it's 100% not used
in Tomcat, so it comes from a library somewhere else.

However, I don't understand the idea behind advocating use of the APR connector
especially in embedded. The plan is still to remove it completely at the
moment.

With the standalone native image build, I tested NIO/OpenSSL, but APR is not
supported at all in the descriptors. And even NIO/OpenSSL brings along all the
build/runtime problems with containers. Since now even Java 8 does ALPN
properly, I would say it is more reasonable to stick to the base JVM whenever
possible.

-- 
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 8.5.x updated: Add more optimized DataSource code for session store

2020-11-10 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 1fbdf55  Add more optimized DataSource code for session store
1fbdf55 is described below

commit 1fbdf555f954b12b8082dc4c3c07639e4f5a8b97
Author: remm 
AuthorDate: Tue Nov 10 12:02:17 2020 +0100

Add more optimized DataSource code for session store

Remove bottlenecks caused by single JDBC connection code.
Rename the JDBCStore to DataSourceStore. The JDBCStore is deprecated but
unchanged. Only document DataSourceStore.
If the code duplication is too large, I can change DataSourceStore to
being only an empty extends of JDBCStore.
Code submitted by Philippe Mouawad.
---
 .../apache/catalina/session/DataSourceStore.java   | 453 +
 java/org/apache/catalina/session/JDBCStore.java|   3 +
 .../catalina/session/LocalStrings.properties   |   1 +
 webapps/docs/changelog.xml |   6 +
 webapps/docs/config/manager.xml|  51 +--
 5 files changed, 474 insertions(+), 40 deletions(-)

diff --git a/java/org/apache/catalina/session/DataSourceStore.java 
b/java/org/apache/catalina/session/DataSourceStore.java
new file mode 100644
index 000..778f3ad
--- /dev/null
+++ b/java/org/apache/catalina/session/DataSourceStore.java
@@ -0,0 +1,453 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.catalina.session;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.sql.DataSource;
+
+import org.apache.catalina.Globals;
+import org.apache.catalina.Session;
+import org.apache.juli.logging.Log;
+
+/**
+ * Implementation of the {@link org.apache.catalina.Store Store}
+ * interface that stores serialized session objects in a database.
+ * Sessions that are saved are still subject to being expired
+ * based on inactivity.
+ *
+ * @author Bip Thelin
+ */
+@SuppressWarnings("deprecation")
+public class DataSourceStore extends JDBCStore {
+
+// - Public Methods
+
+@Override
+public String[] expiredKeys() throws IOException {
+return keys(true);
+}
+
+@Override
+public String[] keys() throws IOException {
+return keys(false);
+}
+
+/**
+ * Return an array containing the session identifiers of all Sessions
+ * currently saved in this Store.  If there are no such Sessions, a
+ * zero-length array is returned.
+ *
+ * @param expiredOnly flag, whether only keys of expired sessions should
+ *be returned
+ * @return array containing the list of session IDs
+ *
+ * @exception IOException if an input/output error occurred
+ */
+private String[] keys(boolean expiredOnly) throws IOException {
+String keys[] = null;
+int numberOfTries = 2;
+while (numberOfTries > 0) {
+
+Connection _conn = getConnection();
+if (_conn == null) {
+return new String[0];
+}
+try {
+
+String keysSql = "SELECT " + sessionIdCol + " FROM "
++ sessionTable + " WHERE " + sessionAppCol + " = ?";
+if (expiredOnly) {
+keysSql += " AND (" + sessionLastAccessedCol + " + "
++ sessionMaxInactiveCol + " * 1000 < ?)";
+}
+try (PreparedStatement preparedKeysSql = 
_conn.prepareStatement(keysSql)) {
+preparedKeysSql.setString(1, getName());
+  

[tomcat] branch 8.5.x updated: Add more optimized DataSource code for session store

2020-11-10 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 1fbdf55  Add more optimized DataSource code for session store
1fbdf55 is described below

commit 1fbdf555f954b12b8082dc4c3c07639e4f5a8b97
Author: remm 
AuthorDate: Tue Nov 10 12:02:17 2020 +0100

Add more optimized DataSource code for session store

Remove bottlenecks caused by single JDBC connection code.
Rename the JDBCStore to DataSourceStore. The JDBCStore is deprecated but
unchanged. Only document DataSourceStore.
If the code duplication is too large, I can change DataSourceStore to
being only an empty extends of JDBCStore.
Code submitted by Philippe Mouawad.
---
 .../apache/catalina/session/DataSourceStore.java   | 453 +
 java/org/apache/catalina/session/JDBCStore.java|   3 +
 .../catalina/session/LocalStrings.properties   |   1 +
 webapps/docs/changelog.xml |   6 +
 webapps/docs/config/manager.xml|  51 +--
 5 files changed, 474 insertions(+), 40 deletions(-)

diff --git a/java/org/apache/catalina/session/DataSourceStore.java 
b/java/org/apache/catalina/session/DataSourceStore.java
new file mode 100644
index 000..778f3ad
--- /dev/null
+++ b/java/org/apache/catalina/session/DataSourceStore.java
@@ -0,0 +1,453 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.catalina.session;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.sql.DataSource;
+
+import org.apache.catalina.Globals;
+import org.apache.catalina.Session;
+import org.apache.juli.logging.Log;
+
+/**
+ * Implementation of the {@link org.apache.catalina.Store Store}
+ * interface that stores serialized session objects in a database.
+ * Sessions that are saved are still subject to being expired
+ * based on inactivity.
+ *
+ * @author Bip Thelin
+ */
+@SuppressWarnings("deprecation")
+public class DataSourceStore extends JDBCStore {
+
+// - Public Methods
+
+@Override
+public String[] expiredKeys() throws IOException {
+return keys(true);
+}
+
+@Override
+public String[] keys() throws IOException {
+return keys(false);
+}
+
+/**
+ * Return an array containing the session identifiers of all Sessions
+ * currently saved in this Store.  If there are no such Sessions, a
+ * zero-length array is returned.
+ *
+ * @param expiredOnly flag, whether only keys of expired sessions should
+ *be returned
+ * @return array containing the list of session IDs
+ *
+ * @exception IOException if an input/output error occurred
+ */
+private String[] keys(boolean expiredOnly) throws IOException {
+String keys[] = null;
+int numberOfTries = 2;
+while (numberOfTries > 0) {
+
+Connection _conn = getConnection();
+if (_conn == null) {
+return new String[0];
+}
+try {
+
+String keysSql = "SELECT " + sessionIdCol + " FROM "
++ sessionTable + " WHERE " + sessionAppCol + " = ?";
+if (expiredOnly) {
+keysSql += " AND (" + sessionLastAccessedCol + " + "
++ sessionMaxInactiveCol + " * 1000 < ?)";
+}
+try (PreparedStatement preparedKeysSql = 
_conn.prepareStatement(keysSql)) {
+preparedKeysSql.setString(1, getName());
+  

[Bug 64877] New implementation of JDBC Based Store with better performances

2020-11-10 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64877

Remy Maucherat  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #2 from Remy Maucherat  ---
Ok, this looked fine to me after some adjustments.
The functionality will be in 10.0.0-M10, 9.0.40 and 8.5.60.

-- 
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] rmaucher closed pull request #376: Implement Bug 64877

2020-11-10 Thread GitBox


rmaucher closed pull request #376:
URL: https://github.com/apache/tomcat/pull/376


   



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.

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] rmaucher commented on pull request #376: Implement Bug 64877

2020-11-10 Thread GitBox


rmaucher commented on pull request #376:
URL: https://github.com/apache/tomcat/pull/376#issuecomment-724639920


   I meged the PR, sorf of, in Tomcat 10. Thanks ! Also added in 9.0 and 8.5.



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.

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 64875] ClassNotFoundException with GraalVM and JNI

2020-11-10 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64875

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |NEEDINFO

-- 
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 9.0.x updated: Add more optimized DataSource code for session store

2020-11-10 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 4964a1b  Add more optimized DataSource code for session store
4964a1b is described below

commit 4964a1b3036cc8ea7cb2ace010b979d8f4382ad1
Author: remm 
AuthorDate: Tue Nov 10 12:02:17 2020 +0100

Add more optimized DataSource code for session store

Remove bottlenecks caused by single JDBC connection code.
Rename the JDBCStore to DataSourceStore. The JDBCStore is deprecated but
unchanged. Only document DataSourceStore.
If the code duplication is too large, I can change DataSourceStore to
being only an empty extends of JDBCStore.
Code submitted by Philippe Mouawad.
---
 .../apache/catalina/session/DataSourceStore.java   | 453 +
 java/org/apache/catalina/session/JDBCStore.java|   3 +
 .../catalina/session/LocalStrings.properties   |   1 +
 webapps/docs/changelog.xml |   6 +
 webapps/docs/config/manager.xml|  51 +--
 5 files changed, 474 insertions(+), 40 deletions(-)

diff --git a/java/org/apache/catalina/session/DataSourceStore.java 
b/java/org/apache/catalina/session/DataSourceStore.java
new file mode 100644
index 000..778f3ad
--- /dev/null
+++ b/java/org/apache/catalina/session/DataSourceStore.java
@@ -0,0 +1,453 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.catalina.session;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.sql.DataSource;
+
+import org.apache.catalina.Globals;
+import org.apache.catalina.Session;
+import org.apache.juli.logging.Log;
+
+/**
+ * Implementation of the {@link org.apache.catalina.Store Store}
+ * interface that stores serialized session objects in a database.
+ * Sessions that are saved are still subject to being expired
+ * based on inactivity.
+ *
+ * @author Bip Thelin
+ */
+@SuppressWarnings("deprecation")
+public class DataSourceStore extends JDBCStore {
+
+// - Public Methods
+
+@Override
+public String[] expiredKeys() throws IOException {
+return keys(true);
+}
+
+@Override
+public String[] keys() throws IOException {
+return keys(false);
+}
+
+/**
+ * Return an array containing the session identifiers of all Sessions
+ * currently saved in this Store.  If there are no such Sessions, a
+ * zero-length array is returned.
+ *
+ * @param expiredOnly flag, whether only keys of expired sessions should
+ *be returned
+ * @return array containing the list of session IDs
+ *
+ * @exception IOException if an input/output error occurred
+ */
+private String[] keys(boolean expiredOnly) throws IOException {
+String keys[] = null;
+int numberOfTries = 2;
+while (numberOfTries > 0) {
+
+Connection _conn = getConnection();
+if (_conn == null) {
+return new String[0];
+}
+try {
+
+String keysSql = "SELECT " + sessionIdCol + " FROM "
++ sessionTable + " WHERE " + sessionAppCol + " = ?";
+if (expiredOnly) {
+keysSql += " AND (" + sessionLastAccessedCol + " + "
++ sessionMaxInactiveCol + " * 1000 < ?)";
+}
+try (PreparedStatement preparedKeysSql = 
_conn.prepareStatement(keysSql)) {
+preparedKeysSql.setString(1, getName());
+  

Re: Removing JDBC mode from JDBCStore

2020-11-10 Thread Keiichi Fujino
2020年11月9日(月) 22:45 Rémy Maucherat :

> Hi,
>
> As part of https://github.com/apache/tomcat/pull/376 and along with the
> similar removal of JDBCRealm, I would like to propose:
> - Remove JDBC code from JDBCStore in Tomcat 10, in favor of DataSource
> code; this allows simplifying and removing global sync which obviously
> kills scalability
> - Rename JDBCStore to DataSourceStore in Tomcat 10
> - Introduce a new empty DataSourceStore store extending JDBCStore in Tomcat
> 7.0.x, 8.5.x and 9.0.x to help migration, and adjust documentation to refer
> to it
>
> Comments ?
>
>
+1


> Rémy
>


-- 
Keiichi.Fujino


[tomcat] branch 7.0.x updated: Add HTTP header security filter to manager, host manager and examples

2020-11-10 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/7.0.x by this push:
 new 7bbd7bc  Add HTTP header security filter to manager, host manager and 
examples
7bbd7bc is described below

commit 7bbd7bccae16be994ce3fcc5a6e57edb129ea7df
Author: Mark Thomas 
AuthorDate: Tue Nov 10 10:21:04 2020 +

Add HTTP header security filter to manager, host manager and examples
---
 webapps/docs/changelog.xml   |  4 
 webapps/examples/WEB-INF/web.xml | 18 ++
 webapps/host-manager/WEB-INF/web.xml | 17 +
 webapps/manager/WEB-INF/web.xml  | 17 +
 4 files changed, 56 insertions(+)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 035f086..72da323 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -122,6 +122,10 @@
 64797: Align manager.xml template file in Host-Manager with
 context.xml of real Manager web application. (isapir)
   
+  
+Configure the examples, Manager and Host Manager to use the HTTP header
+security filter with default settings apart from no HSTS header. 
(markt)
+  
 
   
   
diff --git a/webapps/examples/WEB-INF/web.xml b/webapps/examples/WEB-INF/web.xml
index 65a34de..07f7590 100644
--- a/webapps/examples/WEB-INF/web.xml
+++ b/webapps/examples/WEB-INF/web.xml
@@ -77,6 +77,18 @@
 
 
 
+
+
+
+
+HTTP header security filter
+
org.apache.catalina.filters.HttpHeaderSecurityFilter
+
+hstsEnabled
+false
+
+
+
 
 
 
+
+
+HTTP header security filter
+/*
+
+
 
 
 listeners.ContextListener
diff --git a/webapps/host-manager/WEB-INF/web.xml 
b/webapps/host-manager/WEB-INF/web.xml
index 30f319b..30107ae 100644
--- a/webapps/host-manager/WEB-INF/web.xml
+++ b/webapps/host-manager/WEB-INF/web.xml
@@ -69,11 +69,28 @@
 
   
 
+  
+  
+  
+  
+HTTP header security filter
+
org.apache.catalina.filters.HttpHeaderSecurityFilter
+
+  hstsEnabled
+  false
+
+  
+
   
 CSRF
 HTMLHostManager
   
 
+  
+HTTP header security filter
+/*
+  
+
   
   
 HostManager
diff --git a/webapps/manager/WEB-INF/web.xml b/webapps/manager/WEB-INF/web.xml
index a47162e..f500899 100644
--- a/webapps/manager/WEB-INF/web.xml
+++ b/webapps/manager/WEB-INF/web.xml
@@ -113,11 +113,28 @@
 
   
 
+  
+  
+  
+  
+HTTP header security filter
+
org.apache.catalina.filters.HttpHeaderSecurityFilter
+
+  hstsEnabled
+  false
+
+  
+
   
 CSRF
 HTMLManager
   
 
+  
+HTTP header security filter
+/*
+  
+
   
   
   


-
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 HTTP header security filter to manager, host manager and examples

2020-11-10 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 6124be5  Add HTTP header security filter to manager, host manager and 
examples
6124be5 is described below

commit 6124be56ea3fee23a9ec3ad8d128a7c93a598c89
Author: Mark Thomas 
AuthorDate: Tue Nov 10 10:21:04 2020 +

Add HTTP header security filter to manager, host manager and examples
---
 webapps/docs/changelog.xml   |  4 
 webapps/examples/WEB-INF/web.xml | 18 ++
 webapps/host-manager/WEB-INF/web.xml | 17 +
 webapps/manager/WEB-INF/web.xml  | 17 +
 4 files changed, 56 insertions(+)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 9f4e3cd..6e85ee4 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -128,6 +128,10 @@
 SameSite=strict for all cookies, including session 
cookies,
 created by the application. (markt)
   
+  
+Configure the examples, Manager and Host Manager to use the HTTP header
+security filter with default settings apart from no HSTS header. 
(markt)
+  
 
   
   
diff --git a/webapps/examples/WEB-INF/web.xml b/webapps/examples/WEB-INF/web.xml
index ac4840e..f294e2b 100644
--- a/webapps/examples/WEB-INF/web.xml
+++ b/webapps/examples/WEB-INF/web.xml
@@ -78,6 +78,18 @@
 
 
 
+
+
+
+
+HTTP header security filter
+
org.apache.catalina.filters.HttpHeaderSecurityFilter
+
+hstsEnabled
+false
+
+
+
 
 
 
+
+
+HTTP header security filter
+/*
+
+
 
 
 listeners.ContextListener
diff --git a/webapps/host-manager/WEB-INF/web.xml 
b/webapps/host-manager/WEB-INF/web.xml
index c315546..db785d1 100644
--- a/webapps/host-manager/WEB-INF/web.xml
+++ b/webapps/host-manager/WEB-INF/web.xml
@@ -68,11 +68,28 @@
 
   
 
+  
+  
+  
+  
+HTTP header security filter
+
org.apache.catalina.filters.HttpHeaderSecurityFilter
+
+  hstsEnabled
+  false
+
+  
+
   
 CSRF
 HTMLHostManager
   
 
+  
+HTTP header security filter
+/*
+  
+
   
   
 HostManager
diff --git a/webapps/manager/WEB-INF/web.xml b/webapps/manager/WEB-INF/web.xml
index d91728e..1a161a7 100644
--- a/webapps/manager/WEB-INF/web.xml
+++ b/webapps/manager/WEB-INF/web.xml
@@ -112,11 +112,28 @@
 
   
 
+  
+  
+  
+  
+HTTP header security filter
+
org.apache.catalina.filters.HttpHeaderSecurityFilter
+
+  hstsEnabled
+  false
+
+  
+
   
 CSRF
 HTMLManager
   
 
+  
+HTTP header security filter
+/*
+  
+
   
   
   


-
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 HTTP header security filter to manager, host manager and examples

2020-11-10 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 6e232f8  Add HTTP header security filter to manager, host manager and 
examples
6e232f8 is described below

commit 6e232f825d53abe1406bc9a9b8add67743b3f35d
Author: Mark Thomas 
AuthorDate: Tue Nov 10 10:21:04 2020 +

Add HTTP header security filter to manager, host manager and examples
---
 webapps/docs/changelog.xml   |  4 
 webapps/examples/WEB-INF/web.xml | 18 ++
 webapps/host-manager/WEB-INF/web.xml | 17 +
 webapps/manager/WEB-INF/web.xml  | 17 +
 4 files changed, 56 insertions(+)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 168806b..f22e1f1 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -180,6 +180,10 @@
 SameSite=strict for all cookies, including session 
cookies,
 created by the application. (markt)
   
+  
+Configure the examples, Manager and Host Manager to use the HTTP header
+security filter with default settings apart from no HSTS header. 
(markt)
+  
 
   
   
diff --git a/webapps/examples/WEB-INF/web.xml b/webapps/examples/WEB-INF/web.xml
index 8f86f5f..9e73861 100644
--- a/webapps/examples/WEB-INF/web.xml
+++ b/webapps/examples/WEB-INF/web.xml
@@ -65,6 +65,18 @@
 
 
 
+
+
+
+
+HTTP header security filter
+
org.apache.catalina.filters.HttpHeaderSecurityFilter
+
+hstsEnabled
+false
+
+
+
 
 
 
+
+
+HTTP header security filter
+/*
+
+
 
 
 listeners.ContextListener
diff --git a/webapps/host-manager/WEB-INF/web.xml 
b/webapps/host-manager/WEB-INF/web.xml
index e9faa2c..54d7d4f 100644
--- a/webapps/host-manager/WEB-INF/web.xml
+++ b/webapps/host-manager/WEB-INF/web.xml
@@ -56,11 +56,28 @@
 
   
 
+  
+  
+  
+  
+HTTP header security filter
+
org.apache.catalina.filters.HttpHeaderSecurityFilter
+
+  hstsEnabled
+  false
+
+  
+
   
 CSRF
 HTMLHostManager
   
 
+  
+HTTP header security filter
+/*
+  
+
   
   
 HostManager
diff --git a/webapps/manager/WEB-INF/web.xml b/webapps/manager/WEB-INF/web.xml
index e73aae0..ac70577 100644
--- a/webapps/manager/WEB-INF/web.xml
+++ b/webapps/manager/WEB-INF/web.xml
@@ -100,11 +100,28 @@
 
   
 
+  
+  
+  
+  
+HTTP header security filter
+
org.apache.catalina.filters.HttpHeaderSecurityFilter
+
+  hstsEnabled
+  false
+
+  
+
   
 CSRF
 HTMLManager
   
 
+  
+HTTP header security filter
+/*
+  
+
   
   
   


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



[tomcat] branch master updated: Add HTTP header security filter to manager, host manager and examples

2020-11-10 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 0ca2ba3  Add HTTP header security filter to manager, host manager and 
examples
0ca2ba3 is described below

commit 0ca2ba30dae067943ec390b98ad5c8e869eb9189
Author: Mark Thomas 
AuthorDate: Tue Nov 10 10:21:04 2020 +

Add HTTP header security filter to manager, host manager and examples
---
 webapps/docs/changelog.xml   |  4 
 webapps/examples/WEB-INF/web.xml | 18 ++
 webapps/host-manager/WEB-INF/web.xml | 17 +
 webapps/manager/WEB-INF/web.xml  | 17 +
 4 files changed, 56 insertions(+)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 5e66486..dfd14ee 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -190,6 +190,10 @@
 SameSite=strict for all cookies, including session 
cookies,
 created by the application. (markt)
   
+  
+Configure the examples, Manager and Host Manager to use the HTTP header
+security filter with default settings apart from no HSTS header. 
(markt)
+  
 
   
   
diff --git a/webapps/examples/WEB-INF/web.xml b/webapps/examples/WEB-INF/web.xml
index 993f808..fcb4625 100644
--- a/webapps/examples/WEB-INF/web.xml
+++ b/webapps/examples/WEB-INF/web.xml
@@ -65,6 +65,18 @@
 
 
 
+
+
+
+
+HTTP header security filter
+
org.apache.catalina.filters.HttpHeaderSecurityFilter
+
+hstsEnabled
+false
+
+
+
 
 
 
+
+
+HTTP header security filter
+/*
+
+
 
 
 listeners.ContextListener
diff --git a/webapps/host-manager/WEB-INF/web.xml 
b/webapps/host-manager/WEB-INF/web.xml
index 0582072..61d2da1 100644
--- a/webapps/host-manager/WEB-INF/web.xml
+++ b/webapps/host-manager/WEB-INF/web.xml
@@ -56,11 +56,28 @@
 
   
 
+  
+  
+  
+  
+HTTP header security filter
+
org.apache.catalina.filters.HttpHeaderSecurityFilter
+
+  hstsEnabled
+  false
+
+  
+
   
 CSRF
 HTMLHostManager
   
 
+  
+HTTP header security filter
+/*
+  
+
   
   
 HostManager
diff --git a/webapps/manager/WEB-INF/web.xml b/webapps/manager/WEB-INF/web.xml
index 30705e2..d169f26 100644
--- a/webapps/manager/WEB-INF/web.xml
+++ b/webapps/manager/WEB-INF/web.xml
@@ -100,11 +100,28 @@
 
   
 
+  
+  
+  
+  
+HTTP header security filter
+
org.apache.catalina.filters.HttpHeaderSecurityFilter
+
+  hstsEnabled
+  false
+
+  
+
   
 CSRF
 HTMLManager
   
 
+  
+HTTP header security filter
+/*
+  
+
   
   
   


-
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 SameSite=strict for cookies from /examples

2020-11-10 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 d229dd6  Add SameSite=strict for cookies from /examples
d229dd6 is described below

commit d229dd6f481714bd95f6e20686c723f802b7a793
Author: Mark Thomas 
AuthorDate: Tue Nov 10 09:54:36 2020 +

Add SameSite=strict for cookies from /examples
---
 webapps/docs/changelog.xml|  5 +
 webapps/examples/META-INF/context.xml | 21 +
 2 files changed, 26 insertions(+)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 02a5019..9f4e3cd 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -123,6 +123,11 @@
 64797: Align manager.xml template file in Host-Manager with
 context.xml of real Manager web application. (isapir)
   
+  
+Configure the examples web applications to set
+SameSite=strict for all cookies, including session 
cookies,
+created by the application. (markt)
+  
 
   
   
diff --git a/webapps/examples/META-INF/context.xml 
b/webapps/examples/META-INF/context.xml
new file mode 100644
index 000..b388b2a
--- /dev/null
+++ b/webapps/examples/META-INF/context.xml
@@ -0,0 +1,21 @@
+
+
+
+  
+


-
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 SameSite=strict for cookies from /examples

2020-11-10 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 8626033  Add SameSite=strict for cookies from /examples
8626033 is described below

commit 862603361bdf2034319bbaaf9ae9845aa418fd2e
Author: Mark Thomas 
AuthorDate: Tue Nov 10 09:54:36 2020 +

Add SameSite=strict for cookies from /examples
---
 webapps/docs/changelog.xml|  5 +
 webapps/examples/META-INF/context.xml | 21 +
 2 files changed, 26 insertions(+)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 6018dfb..168806b 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -175,6 +175,11 @@
 64797: Align manager.xml template file in Host-Manager with
 context.xml of real Manager web application. (isapir)
   
+  
+Configure the examples web applications to set
+SameSite=strict for all cookies, including session 
cookies,
+created by the application. (markt)
+  
 
   
   
diff --git a/webapps/examples/META-INF/context.xml 
b/webapps/examples/META-INF/context.xml
new file mode 100644
index 000..b388b2a
--- /dev/null
+++ b/webapps/examples/META-INF/context.xml
@@ -0,0 +1,21 @@
+
+
+
+  
+


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



[tomcat] branch master updated: Add SameSite=strict for cookies from /examples

2020-11-10 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 35347c5  Add SameSite=strict for cookies from /examples
35347c5 is described below

commit 35347c5893b3b2f63277a6c65e2824ed25a04939
Author: Mark Thomas 
AuthorDate: Tue Nov 10 09:54:36 2020 +

Add SameSite=strict for cookies from /examples
---
 webapps/docs/changelog.xml|  5 +
 webapps/examples/META-INF/context.xml | 21 +
 2 files changed, 26 insertions(+)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index fd14274..5e66486 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -185,6 +185,11 @@
 64797: Align manager.xml template file in Host-Manager with
 context.xml of real Manager web application. (isapir)
   
+  
+Configure the examples web applications to set
+SameSite=strict for all cookies, including session 
cookies,
+created by the application. (markt)
+  
 
   
   
diff --git a/webapps/examples/META-INF/context.xml 
b/webapps/examples/META-INF/context.xml
new file mode 100644
index 000..b388b2a
--- /dev/null
+++ b/webapps/examples/META-INF/context.xml
@@ -0,0 +1,21 @@
+
+
+
+  
+


-
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 SameSite=strict for cookies from /examples

2020-11-10 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 8626033  Add SameSite=strict for cookies from /examples
8626033 is described below

commit 862603361bdf2034319bbaaf9ae9845aa418fd2e
Author: Mark Thomas 
AuthorDate: Tue Nov 10 09:54:36 2020 +

Add SameSite=strict for cookies from /examples
---
 webapps/docs/changelog.xml|  5 +
 webapps/examples/META-INF/context.xml | 21 +
 2 files changed, 26 insertions(+)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 6018dfb..168806b 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -175,6 +175,11 @@
 64797: Align manager.xml template file in Host-Manager with
 context.xml of real Manager web application. (isapir)
   
+  
+Configure the examples web applications to set
+SameSite=strict for all cookies, including session 
cookies,
+created by the application. (markt)
+  
 
   
   
diff --git a/webapps/examples/META-INF/context.xml 
b/webapps/examples/META-INF/context.xml
new file mode 100644
index 000..b388b2a
--- /dev/null
+++ b/webapps/examples/META-INF/context.xml
@@ -0,0 +1,21 @@
+
+
+
+  
+


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



[tomcat] branch master updated: Add SameSite=strict for cookies from /examples

2020-11-10 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 35347c5  Add SameSite=strict for cookies from /examples
35347c5 is described below

commit 35347c5893b3b2f63277a6c65e2824ed25a04939
Author: Mark Thomas 
AuthorDate: Tue Nov 10 09:54:36 2020 +

Add SameSite=strict for cookies from /examples
---
 webapps/docs/changelog.xml|  5 +
 webapps/examples/META-INF/context.xml | 21 +
 2 files changed, 26 insertions(+)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index fd14274..5e66486 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -185,6 +185,11 @@
 64797: Align manager.xml template file in Host-Manager with
 context.xml of real Manager web application. (isapir)
   
+  
+Configure the examples web applications to set
+SameSite=strict for all cookies, including session 
cookies,
+created by the application. (markt)
+  
 
   
   
diff --git a/webapps/examples/META-INF/context.xml 
b/webapps/examples/META-INF/context.xml
new file mode 100644
index 000..b388b2a
--- /dev/null
+++ b/webapps/examples/META-INF/context.xml
@@ -0,0 +1,21 @@
+
+
+
+  
+


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



Re: [tomcat] branch master updated: Rename strings in other languages

2020-11-10 Thread Mark Thomas
On 09/11/2020 21:41, r...@apache.org wrote:
> This is an automated email from the ASF dual-hosted git repository.
> 
> remm pushed a commit to branch master
> in repository https://gitbox.apache.org/repos/asf/tomcat.git
> 
> 
> The following commit(s) were added to refs/heads/master by this push:
>  new b1ec24d  Rename strings in other languages
> b1ec24d is described below
> 
> commit b1ec24d384f012e933c3fcb1f761e991a51908df
> Author: remm 
> AuthorDate: Mon Nov 9 22:39:54 2020 +0100
> 
> Rename strings in other languages

I've updated POEditor.com to use the new keys.

Mark

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



[Bug 64830] HTTP2 : GOAWAY sent with Protocol Error and Frame Size Error

2020-11-10 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64830

--- Comment #17 from Mark Thomas  ---
I didn't see any payload errors reported. The other errors occurred after a few
seconds on Windows so I fixed those then ran a longer test (20 mins) where no
errors where observed.

I don't immediately see how the issues I fixed could led to the payload errors
described. It would be informative if you were to test the latest 9.0.x code
and report back.

-- 
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 64818] Allow duplicate URL mapping to the same Servlet

2020-11-10 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64818

--- Comment #10 from Mark Thomas  ---
The move to enhancement just signifies that it is being treated as an
enhancement rather than a bug as they have different expectations when it comes
to speed of resolution.

I continue to be of the view that it is wrong to make an assumption about why
the error occurred and auto-correct based on that potentially invalid
assumption. Better, in my view, to have a failed deployment that a system admin
has to deal with now than 404s presented to users at some point in the future.

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