Re: [tomcat] branch main updated: Polish

2023-05-02 Thread Han Li
On Apr 30, 2023, at 23:37, Mark Thomas  wrote:

On 28/04/2023 03:58, li...@apache.org wrote:

This is an automated email from the ASF dual-hosted git repository.
lihan 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 fa0b2b196d Polish
fa0b2b196d is described below
commit fa0b2b196d8525a662e9edec258650865da465ed
Author: lihan 
AuthorDate: Fri Apr 28 10:57:48 2023 +0800
Polish
---
java/org/apache/catalina/core/ContainerBase.java | 18 +++
java/org/apache/catalina/core/StandardServer.java | 26
+-
.../apache/catalina/valves/JsonAccessLogValve.java | 2 +-
3 files changed, 21 insertions(+), 25 deletions(-)
diff --git a/java/org/apache/catalina/core/ContainerBase.java
b/java/org/apache/catalina/core/ContainerBase.java
index 9dc018be15..784c9032ef 100644
--- a/java/org/apache/catalina/core/ContainerBase.java
+++ b/java/org/apache/catalina/core/ContainerBase.java
@@ -377,7 +377,7 @@ public abstract class ContainerBase extends
LifecycleMBeanBase implements Contai
this.cluster = cluster;
// Stop the old component if necessary
- if (getState().isAvailable() && (oldCluster != null) && (oldCluster
instanceof Lifecycle)) {
+ if (getState().isAvailable() && (oldCluster instanceof Lifecycle)) {
try {
((Lifecycle) oldCluster).stop();
} catch (LifecycleException e) {
@@ -390,7 +390,7 @@ public abstract class ContainerBase extends
LifecycleMBeanBase implements Contai
cluster.setContainer(this);
}
- if (getState().isAvailable() && (cluster != null) && (cluster instanceof
Lifecycle)) {
+ if (getState().isAvailable() && (cluster instanceof Lifecycle)) {
try {
((Lifecycle) cluster).start();
} catch (LifecycleException e) {
@@ -580,7 +580,7 @@ public abstract class ContainerBase extends
LifecycleMBeanBase implements Contai
this.realm = realm;
// Stop the old component if necessary
- if (getState().isAvailable() && (oldRealm != null) && (oldRealm
instanceof Lifecycle)) {
+ if (getState().isAvailable() && (oldRealm instanceof Lifecycle)) {
try {
((Lifecycle) oldRealm).stop();
} catch (LifecycleException e) {
@@ -592,7 +592,7 @@ public abstract class ContainerBase extends
LifecycleMBeanBase implements Contai
if (realm != null) {
realm.setContainer(this);
}
- if (getState().isAvailable() && (realm != null) && (realm instanceof
Lifecycle)) {
+ if (getState().isAvailable() && (realm instanceof Lifecycle)) {
try {
((Lifecycle) realm).start();
} catch (LifecycleException e) {
@@ -832,8 +832,8 @@ public abstract class ContainerBase extends
LifecycleMBeanBase implements Contai
}
// Start our child containers, if any
- Container children[] = findChildren();
- List> results = new ArrayList<>();
+ Container[] children = findChildren();
+ List> results = new ArrayList<>(children.length);
for (Container child : children) {
results.add(startStopExecutor.submit(new StartChild(child)));
}
@@ -897,8 +897,8 @@ public abstract class ContainerBase extends
LifecycleMBeanBase implements Contai
}
// Stop our child containers, if any
- Container children[] = findChildren();
- List> results = new ArrayList<>();
+ Container[] children = findChildren();
+ List> results = new ArrayList<>(children.length);
for (Container child : children) {
results.add(startStopExecutor.submit(new StopChild(child)));
}
@@ -992,7 +992,7 @@ public abstract class ContainerBase extends
LifecycleMBeanBase implements Contai
}
AccessLogAdapter adapter = null;
- Valve valves[] = getPipeline().getValves();
+ Valve[] valves = getPipeline().getValves();
for (Valve valve : valves) {
if (valve instanceof AccessLog) {
if (adapter == null) {
diff --git a/java/org/apache/catalina/core/StandardServer.java
b/java/org/apache/catalina/core/StandardServer.java
index eb5e91e932..09a223fa80 100644
--- a/java/org/apache/catalina/core/StandardServer.java
+++ b/java/org/apache/catalina/core/StandardServer.java
@@ -135,7 +135,7 @@ public final class StandardServer extends
LifecycleMBeanBase implements Server {
/**
* The set of Services associated with this Server.
*/
- private Service services[] = new Service[0];
+ private Service[] services = new Service[0];
private final Object servicesLock = new Object();
@@ -175,12 +175,12 @@ public final class StandardServer extends
LifecycleMBeanBase implements Server {
/**
* The number of threads available to process utility tasks in this service.
*/
- protected int utilityThreads = 2;
+ private int utilityThreads = 2;


This is changing the public API. We can do that in 11.0.x but not in
earlier versions. If we do make this change in 11.0.x then we really should
deprecated the field in at least 10.1.x to provide users with advance
warning of the change.


Sorry Mark, I am so confusing that why this called changed the public API.
According my review, users can not access this field directly with Server
instance as the modifier is protected and whom can not extend
StandardServer to do same operation as the modifier of Sta

Re: [tomcat] branch main updated: Polish

2023-05-02 Thread Mark Thomas

On 02/05/2023 09:30, Han Li wrote:

On Apr 30, 2023, at 23:37, Mark Thomas  wrote:

On 28/04/2023 03:58, li...@apache.org wrote:

This is an automated email from the ASF dual-hosted git repository.
lihan 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 fa0b2b196d Polish
fa0b2b196d is described below
commit fa0b2b196d8525a662e9edec258650865da465ed
Author: lihan 
AuthorDate: Fri Apr 28 10:57:48 2023 +0800
Polish
---
java/org/apache/catalina/core/ContainerBase.java | 18 +++
java/org/apache/catalina/core/StandardServer.java | 26
+-
.../apache/catalina/valves/JsonAccessLogValve.java | 2 +-
3 files changed, 21 insertions(+), 25 deletions(-)
diff --git a/java/org/apache/catalina/core/ContainerBase.java
b/java/org/apache/catalina/core/ContainerBase.java
index 9dc018be15..784c9032ef 100644
--- a/java/org/apache/catalina/core/ContainerBase.java
+++ b/java/org/apache/catalina/core/ContainerBase.java
@@ -377,7 +377,7 @@ public abstract class ContainerBase extends
LifecycleMBeanBase implements Contai
this.cluster = cluster;
// Stop the old component if necessary
- if (getState().isAvailable() && (oldCluster != null) && (oldCluster
instanceof Lifecycle)) {
+ if (getState().isAvailable() && (oldCluster instanceof Lifecycle)) {
try {
((Lifecycle) oldCluster).stop();
} catch (LifecycleException e) {
@@ -390,7 +390,7 @@ public abstract class ContainerBase extends
LifecycleMBeanBase implements Contai
cluster.setContainer(this);
}
- if (getState().isAvailable() && (cluster != null) && (cluster instanceof
Lifecycle)) {
+ if (getState().isAvailable() && (cluster instanceof Lifecycle)) {
try {
((Lifecycle) cluster).start();
} catch (LifecycleException e) {
@@ -580,7 +580,7 @@ public abstract class ContainerBase extends
LifecycleMBeanBase implements Contai
this.realm = realm;
// Stop the old component if necessary
- if (getState().isAvailable() && (oldRealm != null) && (oldRealm
instanceof Lifecycle)) {
+ if (getState().isAvailable() && (oldRealm instanceof Lifecycle)) {
try {
((Lifecycle) oldRealm).stop();
} catch (LifecycleException e) {
@@ -592,7 +592,7 @@ public abstract class ContainerBase extends
LifecycleMBeanBase implements Contai
if (realm != null) {
realm.setContainer(this);
}
- if (getState().isAvailable() && (realm != null) && (realm instanceof
Lifecycle)) {
+ if (getState().isAvailable() && (realm instanceof Lifecycle)) {
try {
((Lifecycle) realm).start();
} catch (LifecycleException e) {
@@ -832,8 +832,8 @@ public abstract class ContainerBase extends
LifecycleMBeanBase implements Contai
}
// Start our child containers, if any
- Container children[] = findChildren();
- List> results = new ArrayList<>();
+ Container[] children = findChildren();
+ List> results = new ArrayList<>(children.length);
for (Container child : children) {
results.add(startStopExecutor.submit(new StartChild(child)));
}
@@ -897,8 +897,8 @@ public abstract class ContainerBase extends
LifecycleMBeanBase implements Contai
}
// Stop our child containers, if any
- Container children[] = findChildren();
- List> results = new ArrayList<>();
+ Container[] children = findChildren();
+ List> results = new ArrayList<>(children.length);
for (Container child : children) {
results.add(startStopExecutor.submit(new StopChild(child)));
}
@@ -992,7 +992,7 @@ public abstract class ContainerBase extends
LifecycleMBeanBase implements Contai
}
AccessLogAdapter adapter = null;
- Valve valves[] = getPipeline().getValves();
+ Valve[] valves = getPipeline().getValves();
for (Valve valve : valves) {
if (valve instanceof AccessLog) {
if (adapter == null) {
diff --git a/java/org/apache/catalina/core/StandardServer.java
b/java/org/apache/catalina/core/StandardServer.java
index eb5e91e932..09a223fa80 100644
--- a/java/org/apache/catalina/core/StandardServer.java
+++ b/java/org/apache/catalina/core/StandardServer.java
@@ -135,7 +135,7 @@ public final class StandardServer extends
LifecycleMBeanBase implements Server {
/**
* The set of Services associated with this Server.
*/
- private Service services[] = new Service[0];
+ private Service[] services = new Service[0];
private final Object servicesLock = new Object();
@@ -175,12 +175,12 @@ public final class StandardServer extends
LifecycleMBeanBase implements Server {
/**
* The number of threads available to process utility tasks in this service.
*/
- protected int utilityThreads = 2;
+ private int utilityThreads = 2;


This is changing the public API. We can do that in 11.0.x but not in
earlier versions. If we do make this change in 11.0.x then we really should
deprecated the field in at least 10.1.x to provide users with advance
warning of the change.


Sorry Mark, I am so confusing that why this called changed the public API.
According my review, users can not access this field directly with Server
instance as the modifier is protected and whom can not extend
StandardServer to do 

[GitHub] [tomcat] markt-asf commented on pull request #612: Don't allow idle threads to live forever

2023-05-02 Thread via GitHub


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

   The thread dump confirms the earlier analysis. The 
`sun.nio.ch.KQueuePort$EventHandlerTask` never exits so the proposed change 
will not have the impact desired.
   It would be worth exploring if the default group configuration has changed 
since the code was first written since the intention was to mimic that but with 
the added benefits that multiple `WsWebSocketContainer` would share a single 
pool and that the pool would be destroyed when no longer required.


-- 
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: [tomcat] branch main updated: Polish

2023-05-02 Thread koteswara Rao Gundapaneni
Hi Team,

private int utilityThreads = 2; should be ideal that if its 3 keep it in
understanding/view of BinaryTree (Heap Memory) so that the server make full
advantage.

Any comments are more accepted if those are not missed by the mailinglist

Regards,
Koti

On Tue, May 2, 2023 at 1:41 AM Mark Thomas  wrote:

> On 02/05/2023 09:30, Han Li wrote:
> > On Apr 30, 2023, at 23:37, Mark Thomas  wrote:
> >
> > On 28/04/2023 03:58, li...@apache.org wrote:
> >
> > This is an automated email from the ASF dual-hosted git repository.
> > lihan 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 fa0b2b196d Polish
> > fa0b2b196d is described below
> > commit fa0b2b196d8525a662e9edec258650865da465ed
> > Author: lihan 
> > AuthorDate: Fri Apr 28 10:57:48 2023 +0800
> > Polish
> > ---
> > java/org/apache/catalina/core/ContainerBase.java | 18 +++
> > java/org/apache/catalina/core/StandardServer.java | 26
> > +-
> > .../apache/catalina/valves/JsonAccessLogValve.java | 2 +-
> > 3 files changed, 21 insertions(+), 25 deletions(-)
> > diff --git a/java/org/apache/catalina/core/ContainerBase.java
> > b/java/org/apache/catalina/core/ContainerBase.java
> > index 9dc018be15..784c9032ef 100644
> > --- a/java/org/apache/catalina/core/ContainerBase.java
> > +++ b/java/org/apache/catalina/core/ContainerBase.java
> > @@ -377,7 +377,7 @@ public abstract class ContainerBase extends
> > LifecycleMBeanBase implements Contai
> > this.cluster = cluster;
> > // Stop the old component if necessary
> > - if (getState().isAvailable() && (oldCluster != null) && (oldCluster
> > instanceof Lifecycle)) {
> > + if (getState().isAvailable() && (oldCluster instanceof Lifecycle)) {
> > try {
> > ((Lifecycle) oldCluster).stop();
> > } catch (LifecycleException e) {
> > @@ -390,7 +390,7 @@ public abstract class ContainerBase extends
> > LifecycleMBeanBase implements Contai
> > cluster.setContainer(this);
> > }
> > - if (getState().isAvailable() && (cluster != null) && (cluster
> instanceof
> > Lifecycle)) {
> > + if (getState().isAvailable() && (cluster instanceof Lifecycle)) {
> > try {
> > ((Lifecycle) cluster).start();
> > } catch (LifecycleException e) {
> > @@ -580,7 +580,7 @@ public abstract class ContainerBase extends
> > LifecycleMBeanBase implements Contai
> > this.realm = realm;
> > // Stop the old component if necessary
> > - if (getState().isAvailable() && (oldRealm != null) && (oldRealm
> > instanceof Lifecycle)) {
> > + if (getState().isAvailable() && (oldRealm instanceof Lifecycle)) {
> > try {
> > ((Lifecycle) oldRealm).stop();
> > } catch (LifecycleException e) {
> > @@ -592,7 +592,7 @@ public abstract class ContainerBase extends
> > LifecycleMBeanBase implements Contai
> > if (realm != null) {
> > realm.setContainer(this);
> > }
> > - if (getState().isAvailable() && (realm != null) && (realm instanceof
> > Lifecycle)) {
> > + if (getState().isAvailable() && (realm instanceof Lifecycle)) {
> > try {
> > ((Lifecycle) realm).start();
> > } catch (LifecycleException e) {
> > @@ -832,8 +832,8 @@ public abstract class ContainerBase extends
> > LifecycleMBeanBase implements Contai
> > }
> > // Start our child containers, if any
> > - Container children[] = findChildren();
> > - List> results = new ArrayList<>();
> > + Container[] children = findChildren();
> > + List> results = new ArrayList<>(children.length);
> > for (Container child : children) {
> > results.add(startStopExecutor.submit(new StartChild(child)));
> > }
> > @@ -897,8 +897,8 @@ public abstract class ContainerBase extends
> > LifecycleMBeanBase implements Contai
> > }
> > // Stop our child containers, if any
> > - Container children[] = findChildren();
> > - List> results = new ArrayList<>();
> > + Container[] children = findChildren();
> > + List> results = new ArrayList<>(children.length);
> > for (Container child : children) {
> > results.add(startStopExecutor.submit(new StopChild(child)));
> > }
> > @@ -992,7 +992,7 @@ public abstract class ContainerBase extends
> > LifecycleMBeanBase implements Contai
> > }
> > AccessLogAdapter adapter = null;
> > - Valve valves[] = getPipeline().getValves();
> > + Valve[] valves = getPipeline().getValves();
> > for (Valve valve : valves) {
> > if (valve instanceof AccessLog) {
> > if (adapter == null) {
> > diff --git a/java/org/apache/catalina/core/StandardServer.java
> > b/java/org/apache/catalina/core/StandardServer.java
> > index eb5e91e932..09a223fa80 100644
> > --- a/java/org/apache/catalina/core/StandardServer.java
> > +++ b/java/org/apache/catalina/core/StandardServer.java
> > @@ -135,7 +135,7 @@ public final class StandardServer extends
> > LifecycleMBeanBase implements Server {
> > /**
> > * The set of Services associated with this Server.
> > */
> > - private Service services[] = new Service[0];
> > + private Service[] services = new Service[0];
> > private final Object servic

[GitHub] [tomcat] markt-asf commented on pull request #612: Don't allow idle threads to live forever

2023-05-02 Thread via GitHub


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

   The default `AsynchronousChannelGroup` has adopted a keep-alive of 60s at 
some point but since the task never exits, it makes no difference in this case.
   We could make the similar change in Tomcat but, until 
`sun.nio.ch.KQueuePort$EventHandlerTask` changes, it will have no effect.
   'KQueuePort` appears to be MacOS specific (at least in the latest source 
code) so there may be benefits in this change on other platforms.
   Overall, I think I have convinced myself this change makes sense, even if it 
doesn't solve the issue the OP is seeing.


-- 
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] markt-asf merged pull request #612: Don't allow idle threads to live forever

2023-05-02 Thread via GitHub


markt-asf merged PR #612:
URL: https://github.com/apache/tomcat/pull/612


-- 
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 main updated: Don't allow idle threads to live forever

2023-05-02 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 cd25be5e2d Don't allow idle threads to live forever
cd25be5e2d is described below

commit cd25be5e2d6b324a9a3d5edd7d47705ebdb495ba
Author: Matthew Painter 
AuthorDate: Thu Apr 27 14:45:13 2023 +0100

Don't allow idle threads to live forever
---
 java/org/apache/tomcat/websocket/AsyncChannelGroupUtil.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/tomcat/websocket/AsyncChannelGroupUtil.java 
b/java/org/apache/tomcat/websocket/AsyncChannelGroupUtil.java
index 6e6d5aef05..2b92c9c9b3 100644
--- a/java/org/apache/tomcat/websocket/AsyncChannelGroupUtil.java
+++ b/java/org/apache/tomcat/websocket/AsyncChannelGroupUtil.java
@@ -79,8 +79,8 @@ public class AsyncChannelGroupUtil {
 // These are the same settings as the default
 // AsynchronousChannelGroup
 int initialSize = Runtime.getRuntime().availableProcessors();
-ExecutorService executorService = new ThreadPoolExecutor(0, 
Integer.MAX_VALUE, Long.MAX_VALUE,
-TimeUnit.MILLISECONDS, new SynchronousQueue<>(), new 
AsyncIOThreadFactory());
+ExecutorService executorService = new ThreadPoolExecutor(0, 
Integer.MAX_VALUE, 60,
+TimeUnit.SECONDS, new SynchronousQueue<>(), new 
AsyncIOThreadFactory());
 
 try {
 return 
AsynchronousChannelGroup.withCachedThreadPool(executorService, initialSize);


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



[tomcat] branch main updated: Update change log

2023-05-02 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 19e914bf4b Update change log
19e914bf4b is described below

commit 19e914bf4b1f153c185ebae6a1c622b7b168fc94
Author: Mark Thomas 
AuthorDate: Tue May 2 12:12:13 2023 +0100

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

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 428ec774f2..a3a21cedbe 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -159,6 +159,11 @@
 Improve exception handling when flushing batched messages during
 WebSocket session close. (markt)
   
+  
+66581: Update AsyncChannelGroupUtil to align it
+with the current defaults for AsynchronousChannelGroup. Pull request
+612 by Matthew Painter. (markt)
+  
 
   
 


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



[tomcat] 02/02: Update change log

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

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

commit 5ed170cbffda0b251abd78e5567b15858e5e052b
Author: Mark Thomas 
AuthorDate: Tue May 2 12:12:13 2023 +0100

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

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index c0b9389f53..2112a1c029 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -159,6 +159,11 @@
 Improve exception handling when flushing batched messages during
 WebSocket session close. (markt)
   
+  
+66581: Update AsyncChannelGroupUtil to align it
+with the current defaults for AsynchronousChannelGroup. Pull request
+612 by Matthew Painter. (markt)
+  
 
   
 


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



[tomcat] 01/02: Don't allow idle threads to live forever

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

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

commit d22fc4efaa0d8831b730ca573d3406f82c780be6
Author: Matthew Painter 
AuthorDate: Thu Apr 27 14:45:13 2023 +0100

Don't allow idle threads to live forever
---
 java/org/apache/tomcat/websocket/AsyncChannelGroupUtil.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/tomcat/websocket/AsyncChannelGroupUtil.java 
b/java/org/apache/tomcat/websocket/AsyncChannelGroupUtil.java
index f2510a84b7..492fdc53bf 100644
--- a/java/org/apache/tomcat/websocket/AsyncChannelGroupUtil.java
+++ b/java/org/apache/tomcat/websocket/AsyncChannelGroupUtil.java
@@ -81,8 +81,8 @@ public class AsyncChannelGroupUtil {
 // These are the same settings as the default
 // AsynchronousChannelGroup
 int initialSize = Runtime.getRuntime().availableProcessors();
-ExecutorService executorService = new ThreadPoolExecutor(0, 
Integer.MAX_VALUE, Long.MAX_VALUE,
-TimeUnit.MILLISECONDS, new SynchronousQueue<>(), new 
AsyncIOThreadFactory());
+ExecutorService executorService = new ThreadPoolExecutor(0, 
Integer.MAX_VALUE, 60,
+TimeUnit.SECONDS, new SynchronousQueue<>(), new 
AsyncIOThreadFactory());
 
 try {
 return 
AsynchronousChannelGroup.withCachedThreadPool(executorService, initialSize);


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



[tomcat] branch 10.1.x updated (cabb30037e -> 5ed170cbff)

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

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


from cabb30037e Fix Eclipse warning
 new d22fc4efaa Don't allow idle threads to live forever
 new 5ed170cbff Update change log

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 java/org/apache/tomcat/websocket/AsyncChannelGroupUtil.java | 4 ++--
 webapps/docs/changelog.xml  | 5 +
 2 files changed, 7 insertions(+), 2 deletions(-)


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



[tomcat] branch 9.0.x updated (7fd1d3d4a1 -> d805c27400)

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

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


from 7fd1d3d4a1 Fix Eclipse warning
 new eb4988ee51 Don't allow idle threads to live forever
 new d805c27400 Update change log

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 java/org/apache/tomcat/websocket/AsyncChannelGroupUtil.java | 4 ++--
 webapps/docs/changelog.xml  | 5 +
 2 files changed, 7 insertions(+), 2 deletions(-)


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



[tomcat] 01/02: Don't allow idle threads to live forever

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

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

commit eb4988ee5110da5e2356aee50565d7fa0f434428
Author: Matthew Painter 
AuthorDate: Thu Apr 27 14:45:13 2023 +0100

Don't allow idle threads to live forever
---
 java/org/apache/tomcat/websocket/AsyncChannelGroupUtil.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/tomcat/websocket/AsyncChannelGroupUtil.java 
b/java/org/apache/tomcat/websocket/AsyncChannelGroupUtil.java
index f2510a84b7..492fdc53bf 100644
--- a/java/org/apache/tomcat/websocket/AsyncChannelGroupUtil.java
+++ b/java/org/apache/tomcat/websocket/AsyncChannelGroupUtil.java
@@ -81,8 +81,8 @@ public class AsyncChannelGroupUtil {
 // These are the same settings as the default
 // AsynchronousChannelGroup
 int initialSize = Runtime.getRuntime().availableProcessors();
-ExecutorService executorService = new ThreadPoolExecutor(0, 
Integer.MAX_VALUE, Long.MAX_VALUE,
-TimeUnit.MILLISECONDS, new SynchronousQueue<>(), new 
AsyncIOThreadFactory());
+ExecutorService executorService = new ThreadPoolExecutor(0, 
Integer.MAX_VALUE, 60,
+TimeUnit.SECONDS, new SynchronousQueue<>(), new 
AsyncIOThreadFactory());
 
 try {
 return 
AsynchronousChannelGroup.withCachedThreadPool(executorService, initialSize);


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



[tomcat] 02/02: Update change log

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

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

commit d805c2740018f183f7dfed3dd687d9837054de8c
Author: Mark Thomas 
AuthorDate: Tue May 2 12:12:13 2023 +0100

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

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 7bd6ea22ae..43f655e221 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -159,6 +159,11 @@
 Improve exception handling when flushing batched messages during
 WebSocket session close. (markt)
   
+  
+66581: Update AsyncChannelGroupUtil to align it
+with the current defaults for AsynchronousChannelGroup. Pull request
+612 by Matthew Painter. (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 (233d5a83a7 -> 2828b32112)

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

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


from 233d5a83a7 Fix Eclipse warning
 new 5d511b0b85 Don't allow idle threads to live forever
 new 2828b32112 Update change log

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 java/org/apache/tomcat/websocket/AsyncChannelGroupUtil.java | 4 ++--
 webapps/docs/changelog.xml  | 5 +
 2 files changed, 7 insertions(+), 2 deletions(-)


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



[tomcat] 02/02: Update change log

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

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

commit 2828b32112c57464f2114fc66e7d03ea64d5ea83
Author: Mark Thomas 
AuthorDate: Tue May 2 12:12:13 2023 +0100

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

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 48dd526b27..e9cb5627af 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -159,6 +159,11 @@
 Improve exception handling when flushing batched messages during
 WebSocket session close. (markt)
   
+  
+66581: Update AsyncChannelGroupUtil to align it
+with the current defaults for AsynchronousChannelGroup. Pull request
+612 by Matthew Painter. (markt)
+  
 
   
 


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



[tomcat] 01/02: Don't allow idle threads to live forever

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

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

commit 5d511b0b857c7e86ae2c736dfdcf6c421d3f7e36
Author: Matthew Painter 
AuthorDate: Thu Apr 27 14:45:13 2023 +0100

Don't allow idle threads to live forever
---
 java/org/apache/tomcat/websocket/AsyncChannelGroupUtil.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/tomcat/websocket/AsyncChannelGroupUtil.java 
b/java/org/apache/tomcat/websocket/AsyncChannelGroupUtil.java
index 1a269e1fe5..086ffc11db 100644
--- a/java/org/apache/tomcat/websocket/AsyncChannelGroupUtil.java
+++ b/java/org/apache/tomcat/websocket/AsyncChannelGroupUtil.java
@@ -81,8 +81,8 @@ public class AsyncChannelGroupUtil {
 // These are the same settings as the default
 // AsynchronousChannelGroup
 int initialSize = Runtime.getRuntime().availableProcessors();
-ExecutorService executorService = new ThreadPoolExecutor(0, 
Integer.MAX_VALUE, Long.MAX_VALUE,
-TimeUnit.MILLISECONDS, new SynchronousQueue(), 
new AsyncIOThreadFactory());
+ExecutorService executorService = new ThreadPoolExecutor(0, 
Integer.MAX_VALUE, 60,
+TimeUnit.SECONDS, new SynchronousQueue(), new 
AsyncIOThreadFactory());
 
 try {
 return 
AsynchronousChannelGroup.withCachedThreadPool(executorService, initialSize);


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



[Bug 66581] Idle threads are never destroyed in org.apache.tomcat.websocket.AsyncChannelGroupUtil

2023-05-02 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=66581

Mark Thomas  changed:

   What|Removed |Added

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

--- Comment #2 from Mark Thomas  ---
Fixed in:
- 11.0.x for 11.0.0-M6 onwards
- 10.1.x for 10.1.9 onwards
-  9.0.x for  9.0.75 onwards
-  8.5.x for  8.5.89 onwards

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 66508] Tomcat after a GC pause causes the HTTP threads to be blocked to acquire a semaphore to process WebSockets connection closure.

2023-05-02 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=66508

Mark Thomas  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEEDINFO|RESOLVED

--- Comment #20 from Mark Thomas  ---
Given the lack of response, I am assuming that this is now fixed.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[VOTE][RESULT] Apache Tomcat migration tool for Jakarta EE 1.0.7

2023-05-02 Thread Mark Thomas

The following votes were cast:

Binding:
+1: ebourg, lihan, markt, fschumacher, remm

Non-binding:
+1: Dimitris Soumis

No other votes were cast. The vote therefore passes.

Thanks to everyone who contributed to this release.

Mark


On 26/04/2023 17:19, Mark Thomas wrote:

The proposed Apache Tomcat migration tool for Jakarta EE 1.0.7 is now
available for voting.

The significant changes since 1.0.6 are:

- Provide a workaround for a known JDK bug (JDK-8303866) that prevents
   some migrated JARs from being read

- Add new matchExcludesAgainstPathName configuration option

- Include file names in the renaming process

It can be obtained from:
https://dist.apache.org/repos/dist/dev/tomcat/jakartaee-migration/v1.0.7/

The Maven staging repo is:
https://repository.apache.org/content/repositories/orgapachetomcat-1431/

The tag is:
https://github.com/apache/tomcat-jakartaee-migration/tree/1.0.7
0f74b6a7541c1f7ff26b9588a9ede92f316a7c46

The proposed 1.0.7 release is:

[ ] -1: Broken. Do not release because...
[ ] +1: Acceptable. Go ahead and release.

Thanks,

Mark

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



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



[tomcat] branch 10.1.x updated: Fix BZ 66582 - not all static imports are valid for EL

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

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


The following commit(s) were added to refs/heads/10.1.x by this push:
 new afc0fd4c13 Fix BZ 66582 - not all static imports are valid for EL
afc0fd4c13 is described below

commit afc0fd4c1356953b71c1d879cdc2342d38d3fb49
Author: Mark Thomas 
AuthorDate: Tue May 2 13:30:30 2023 +0100

Fix BZ 66582 - not all static imports are valid for EL

https://bz.apache.org/bugzilla/show_bug.cgi?id=66582
---
 .../org/apache/jasper/runtime/PageContextImpl.java |  6 +-
 .../servlet/jsp/el/TestImportELResolver.java   | 16 +++
 .../apache/tomcat/unittest/TesterBug66582.java}| 24 +++---
 test/webapp/bug6/bug66582.jsp  | 22 
 webapps/docs/changelog.xml |  9 
 5 files changed, 55 insertions(+), 22 deletions(-)

diff --git a/java/org/apache/jasper/runtime/PageContextImpl.java 
b/java/org/apache/jasper/runtime/PageContextImpl.java
index 13ea49587e..d2dbf8faf2 100644
--- a/java/org/apache/jasper/runtime/PageContextImpl.java
+++ b/java/org/apache/jasper/runtime/PageContextImpl.java
@@ -718,7 +718,11 @@ public class PageContextImpl extends PageContext {
 for (String classImport : classImports) {
 if (classImport.startsWith("static ")) {
 classImport = classImport.substring(7);
-ih.importStatic(classImport);
+try {
+ih.importStatic(classImport);
+} catch (ELException e) {
+// Ignore - not all static imports are valid 
for EL
+}
 } else {
 ih.importClass(classImport);
 }
diff --git a/test/jakarta/servlet/jsp/el/TestImportELResolver.java 
b/test/jakarta/servlet/jsp/el/TestImportELResolver.java
index b68529d821..652f04dad1 100644
--- a/test/jakarta/servlet/jsp/el/TestImportELResolver.java
+++ b/test/jakarta/servlet/jsp/el/TestImportELResolver.java
@@ -16,6 +16,8 @@
  */
 package jakarta.servlet.jsp.el;
 
+import jakarta.servlet.http.HttpServletResponse;
+
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -36,4 +38,18 @@ public class TestImportELResolver extends TomcatBaseTest {
 Assert.assertTrue(result.contains("EL  - Long min value is 
-9223372036854775808"));
 Assert.assertTrue(result.contains("JSP - Long min value is 
-9223372036854775808"));
 }
+
+
+// https://bz.apache.org/bugzilla/show_bug.cgi?id=66582
+@Test
+public void testImportStaticFieldFromInterface() throws Exception {
+getTomcatInstanceTestWebapp(false, true);
+
+ByteChunk res = new ByteChunk();
+int rc = getUrl("http://localhost:"; + getPort() + 
"/test/bug6/bug66582.jsp", res, null);
+
+Assert.assertEquals(HttpServletResponse.SC_OK, rc);
+String result = res.toString();
+Assert.assertFalse(result, result.contains("data"));
+}
 }
diff --git a/test/jakarta/servlet/jsp/el/TestImportELResolver.java 
b/test/org/apache/tomcat/unittest/TesterBug66582.java
similarity index 51%
copy from test/jakarta/servlet/jsp/el/TestImportELResolver.java
copy to test/org/apache/tomcat/unittest/TesterBug66582.java
index b68529d821..fb8c97116f 100644
--- a/test/jakarta/servlet/jsp/el/TestImportELResolver.java
+++ b/test/org/apache/tomcat/unittest/TesterBug66582.java
@@ -14,26 +14,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package jakarta.servlet.jsp.el;
+package org.apache.tomcat.unittest;
 
-import org.junit.Assert;
-import org.junit.Test;
-
-import org.apache.catalina.startup.TomcatBaseTest;
-import org.apache.tomcat.util.buf.ByteChunk;
-
-public class TestImportELResolver extends TomcatBaseTest {
-
-// https://bz.apache.org/bugzilla/show_bug.cgi?id=66441
-@Test
-public void testImportStaticFields() throws Exception {
-getTomcatInstanceTestWebapp(false, true);
-
-ByteChunk res = getUrl("http://localhost:"; + getPort() + 
"/test/bug6/bug66441.jsp");
-
-String result = res.toString();
-
-Assert.assertTrue(result.contains("EL  - Long min value is 
-9223372036854775808"));
-Assert.assertTrue(result.contains("JSP - Long min value is 
-9223372036854775808"));
-}
+public interface TesterBug66582 {
+String DATA = "data";
 }
diff --git a/test/webapp/bug6/bug66582.jsp 
b/test/webapp/bug6/bug66582.jsp
new file mode 100644
index 00..4def99d32d
--- /dev/null
+++ b/test/webapp/bug6/bug66582.jsp
@@ -0,0 +1,22 @@
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distrib

[tomcat] branch 9.0.x updated: Fix BZ 66582 - not all static imports are valid for EL

2023-05-02 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 a6946d5de0 Fix BZ 66582 - not all static imports are valid for EL
a6946d5de0 is described below

commit a6946d5de05e77dc98365b359381d4fe3d9eca9a
Author: Mark Thomas 
AuthorDate: Tue May 2 13:30:30 2023 +0100

Fix BZ 66582 - not all static imports are valid for EL

https://bz.apache.org/bugzilla/show_bug.cgi?id=66582
---
 .../org/apache/jasper/runtime/PageContextImpl.java |  6 +-
 .../javax/servlet/jsp/el/TestImportELResolver.java | 16 +++
 .../apache/tomcat/unittest/TesterBug66582.java}| 24 +++---
 test/webapp/bug6/bug66582.jsp  | 22 
 webapps/docs/changelog.xml |  9 
 5 files changed, 55 insertions(+), 22 deletions(-)

diff --git a/java/org/apache/jasper/runtime/PageContextImpl.java 
b/java/org/apache/jasper/runtime/PageContextImpl.java
index 8c150df71e..8771856c84 100644
--- a/java/org/apache/jasper/runtime/PageContextImpl.java
+++ b/java/org/apache/jasper/runtime/PageContextImpl.java
@@ -707,7 +707,11 @@ public class PageContextImpl extends PageContext {
 for (String classImport : classImports) {
 if (classImport.startsWith("static ")) {
 classImport = classImport.substring(7);
-ih.importStatic(classImport);
+try {
+ih.importStatic(classImport);
+} catch (ELException e) {
+// Ignore - not all static imports are valid 
for EL
+}
 } else {
 ih.importClass(classImport);
 }
diff --git a/test/javax/servlet/jsp/el/TestImportELResolver.java 
b/test/javax/servlet/jsp/el/TestImportELResolver.java
index f065822ec6..c92d7f8800 100644
--- a/test/javax/servlet/jsp/el/TestImportELResolver.java
+++ b/test/javax/servlet/jsp/el/TestImportELResolver.java
@@ -16,6 +16,8 @@
  */
 package javax.servlet.jsp.el;
 
+import jakarta.servlet.http.HttpServletResponse;
+
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -36,4 +38,18 @@ public class TestImportELResolver extends TomcatBaseTest {
 Assert.assertTrue(result.contains("EL  - Long min value is 
-9223372036854775808"));
 Assert.assertTrue(result.contains("JSP - Long min value is 
-9223372036854775808"));
 }
+
+
+// https://bz.apache.org/bugzilla/show_bug.cgi?id=66582
+@Test
+public void testImportStaticFieldFromInterface() throws Exception {
+getTomcatInstanceTestWebapp(false, true);
+
+ByteChunk res = new ByteChunk();
+int rc = getUrl("http://localhost:"; + getPort() + 
"/test/bug6/bug66582.jsp", res, null);
+
+Assert.assertEquals(HttpServletResponse.SC_OK, rc);
+String result = res.toString();
+Assert.assertFalse(result, result.contains("data"));
+}
 }
diff --git a/test/javax/servlet/jsp/el/TestImportELResolver.java 
b/test/org/apache/tomcat/unittest/TesterBug66582.java
similarity index 51%
copy from test/javax/servlet/jsp/el/TestImportELResolver.java
copy to test/org/apache/tomcat/unittest/TesterBug66582.java
index f065822ec6..fb8c97116f 100644
--- a/test/javax/servlet/jsp/el/TestImportELResolver.java
+++ b/test/org/apache/tomcat/unittest/TesterBug66582.java
@@ -14,26 +14,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package javax.servlet.jsp.el;
+package org.apache.tomcat.unittest;
 
-import org.junit.Assert;
-import org.junit.Test;
-
-import org.apache.catalina.startup.TomcatBaseTest;
-import org.apache.tomcat.util.buf.ByteChunk;
-
-public class TestImportELResolver extends TomcatBaseTest {
-
-// https://bz.apache.org/bugzilla/show_bug.cgi?id=66441
-@Test
-public void testImportStaticFields() throws Exception {
-getTomcatInstanceTestWebapp(false, true);
-
-ByteChunk res = getUrl("http://localhost:"; + getPort() + 
"/test/bug6/bug66441.jsp");
-
-String result = res.toString();
-
-Assert.assertTrue(result.contains("EL  - Long min value is 
-9223372036854775808"));
-Assert.assertTrue(result.contains("JSP - Long min value is 
-9223372036854775808"));
-}
+public interface TesterBug66582 {
+String DATA = "data";
 }
diff --git a/test/webapp/bug6/bug66582.jsp 
b/test/webapp/bug6/bug66582.jsp
new file mode 100644
index 00..4def99d32d
--- /dev/null
+++ b/test/webapp/bug6/bug66582.jsp
@@ -0,0 +1,22 @@
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this wo

[tomcat] branch main updated: Fix BZ 66582 - not all static imports are valid for EL

2023-05-02 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 e86706b13d Fix BZ 66582 - not all static imports are valid for EL
e86706b13d is described below

commit e86706b13d522c904faa11c6d1feb7040b96fc5d
Author: Mark Thomas 
AuthorDate: Tue May 2 13:30:30 2023 +0100

Fix BZ 66582 - not all static imports are valid for EL

https://bz.apache.org/bugzilla/show_bug.cgi?id=66582
---
 .../org/apache/jasper/runtime/PageContextImpl.java |  6 +-
 .../servlet/jsp/el/TestImportELResolver.java   | 16 +++
 .../apache/tomcat/unittest/TesterBug66582.java}| 24 +++---
 test/webapp/bug6/bug66582.jsp  | 22 
 webapps/docs/changelog.xml |  9 
 5 files changed, 55 insertions(+), 22 deletions(-)

diff --git a/java/org/apache/jasper/runtime/PageContextImpl.java 
b/java/org/apache/jasper/runtime/PageContextImpl.java
index fe27e29ef2..35de1fd956 100644
--- a/java/org/apache/jasper/runtime/PageContextImpl.java
+++ b/java/org/apache/jasper/runtime/PageContextImpl.java
@@ -698,7 +698,11 @@ public class PageContextImpl extends PageContext {
 for (String classImport : classImports) {
 if (classImport.startsWith("static ")) {
 classImport = classImport.substring(7);
-ih.importStatic(classImport);
+try {
+ih.importStatic(classImport);
+} catch (ELException e) {
+// Ignore - not all static imports are valid 
for EL
+}
 } else {
 ih.importClass(classImport);
 }
diff --git a/test/jakarta/servlet/jsp/el/TestImportELResolver.java 
b/test/jakarta/servlet/jsp/el/TestImportELResolver.java
index b68529d821..652f04dad1 100644
--- a/test/jakarta/servlet/jsp/el/TestImportELResolver.java
+++ b/test/jakarta/servlet/jsp/el/TestImportELResolver.java
@@ -16,6 +16,8 @@
  */
 package jakarta.servlet.jsp.el;
 
+import jakarta.servlet.http.HttpServletResponse;
+
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -36,4 +38,18 @@ public class TestImportELResolver extends TomcatBaseTest {
 Assert.assertTrue(result.contains("EL  - Long min value is 
-9223372036854775808"));
 Assert.assertTrue(result.contains("JSP - Long min value is 
-9223372036854775808"));
 }
+
+
+// https://bz.apache.org/bugzilla/show_bug.cgi?id=66582
+@Test
+public void testImportStaticFieldFromInterface() throws Exception {
+getTomcatInstanceTestWebapp(false, true);
+
+ByteChunk res = new ByteChunk();
+int rc = getUrl("http://localhost:"; + getPort() + 
"/test/bug6/bug66582.jsp", res, null);
+
+Assert.assertEquals(HttpServletResponse.SC_OK, rc);
+String result = res.toString();
+Assert.assertFalse(result, result.contains("data"));
+}
 }
diff --git a/test/jakarta/servlet/jsp/el/TestImportELResolver.java 
b/test/org/apache/tomcat/unittest/TesterBug66582.java
similarity index 51%
copy from test/jakarta/servlet/jsp/el/TestImportELResolver.java
copy to test/org/apache/tomcat/unittest/TesterBug66582.java
index b68529d821..fb8c97116f 100644
--- a/test/jakarta/servlet/jsp/el/TestImportELResolver.java
+++ b/test/org/apache/tomcat/unittest/TesterBug66582.java
@@ -14,26 +14,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package jakarta.servlet.jsp.el;
+package org.apache.tomcat.unittest;
 
-import org.junit.Assert;
-import org.junit.Test;
-
-import org.apache.catalina.startup.TomcatBaseTest;
-import org.apache.tomcat.util.buf.ByteChunk;
-
-public class TestImportELResolver extends TomcatBaseTest {
-
-// https://bz.apache.org/bugzilla/show_bug.cgi?id=66441
-@Test
-public void testImportStaticFields() throws Exception {
-getTomcatInstanceTestWebapp(false, true);
-
-ByteChunk res = getUrl("http://localhost:"; + getPort() + 
"/test/bug6/bug66441.jsp");
-
-String result = res.toString();
-
-Assert.assertTrue(result.contains("EL  - Long min value is 
-9223372036854775808"));
-Assert.assertTrue(result.contains("JSP - Long min value is 
-9223372036854775808"));
-}
+public interface TesterBug66582 {
+String DATA = "data";
 }
diff --git a/test/webapp/bug6/bug66582.jsp 
b/test/webapp/bug6/bug66582.jsp
new file mode 100644
index 00..4def99d32d
--- /dev/null
+++ b/test/webapp/bug6/bug66582.jsp
@@ -0,0 +1,22 @@
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed

[tomcat] branch 8.5.x updated: Fix BZ 66582 - not all static imports are valid for EL

2023-05-02 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 6cf3efe0c1 Fix BZ 66582 - not all static imports are valid for EL
6cf3efe0c1 is described below

commit 6cf3efe0c150b70a2942f3b409a57fdf7e37bc73
Author: Mark Thomas 
AuthorDate: Tue May 2 13:30:30 2023 +0100

Fix BZ 66582 - not all static imports are valid for EL

https://bz.apache.org/bugzilla/show_bug.cgi?id=66582
---
 .../org/apache/jasper/runtime/PageContextImpl.java |  6 +-
 .../javax/servlet/jsp/el/TestImportELResolver.java | 16 +++
 .../apache/tomcat/unittest/TesterBug66582.java}| 24 +++---
 test/webapp/bug6/bug66582.jsp  | 22 
 webapps/docs/changelog.xml |  9 
 5 files changed, 55 insertions(+), 22 deletions(-)

diff --git a/java/org/apache/jasper/runtime/PageContextImpl.java 
b/java/org/apache/jasper/runtime/PageContextImpl.java
index 6d06113ba9..fc6a84a551 100644
--- a/java/org/apache/jasper/runtime/PageContextImpl.java
+++ b/java/org/apache/jasper/runtime/PageContextImpl.java
@@ -959,7 +959,11 @@ public class PageContextImpl extends PageContext {
 for (String classImport : classImports) {
 if (classImport.startsWith("static ")) {
 classImport = classImport.substring(7);
-ih.importStatic(classImport);
+try {
+ih.importStatic(classImport);
+} catch (ELException e) {
+// Ignore - not all static imports are valid 
for EL
+}
 } else {
 ih.importClass(classImport);
 }
diff --git a/test/javax/servlet/jsp/el/TestImportELResolver.java 
b/test/javax/servlet/jsp/el/TestImportELResolver.java
index f065822ec6..c92d7f8800 100644
--- a/test/javax/servlet/jsp/el/TestImportELResolver.java
+++ b/test/javax/servlet/jsp/el/TestImportELResolver.java
@@ -16,6 +16,8 @@
  */
 package javax.servlet.jsp.el;
 
+import jakarta.servlet.http.HttpServletResponse;
+
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -36,4 +38,18 @@ public class TestImportELResolver extends TomcatBaseTest {
 Assert.assertTrue(result.contains("EL  - Long min value is 
-9223372036854775808"));
 Assert.assertTrue(result.contains("JSP - Long min value is 
-9223372036854775808"));
 }
+
+
+// https://bz.apache.org/bugzilla/show_bug.cgi?id=66582
+@Test
+public void testImportStaticFieldFromInterface() throws Exception {
+getTomcatInstanceTestWebapp(false, true);
+
+ByteChunk res = new ByteChunk();
+int rc = getUrl("http://localhost:"; + getPort() + 
"/test/bug6/bug66582.jsp", res, null);
+
+Assert.assertEquals(HttpServletResponse.SC_OK, rc);
+String result = res.toString();
+Assert.assertFalse(result, result.contains("data"));
+}
 }
diff --git a/test/javax/servlet/jsp/el/TestImportELResolver.java 
b/test/org/apache/tomcat/unittest/TesterBug66582.java
similarity index 51%
copy from test/javax/servlet/jsp/el/TestImportELResolver.java
copy to test/org/apache/tomcat/unittest/TesterBug66582.java
index f065822ec6..fb8c97116f 100644
--- a/test/javax/servlet/jsp/el/TestImportELResolver.java
+++ b/test/org/apache/tomcat/unittest/TesterBug66582.java
@@ -14,26 +14,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package javax.servlet.jsp.el;
+package org.apache.tomcat.unittest;
 
-import org.junit.Assert;
-import org.junit.Test;
-
-import org.apache.catalina.startup.TomcatBaseTest;
-import org.apache.tomcat.util.buf.ByteChunk;
-
-public class TestImportELResolver extends TomcatBaseTest {
-
-// https://bz.apache.org/bugzilla/show_bug.cgi?id=66441
-@Test
-public void testImportStaticFields() throws Exception {
-getTomcatInstanceTestWebapp(false, true);
-
-ByteChunk res = getUrl("http://localhost:"; + getPort() + 
"/test/bug6/bug66441.jsp");
-
-String result = res.toString();
-
-Assert.assertTrue(result.contains("EL  - Long min value is 
-9223372036854775808"));
-Assert.assertTrue(result.contains("JSP - Long min value is 
-9223372036854775808"));
-}
+public interface TesterBug66582 {
+String DATA = "data";
 }
diff --git a/test/webapp/bug6/bug66582.jsp 
b/test/webapp/bug6/bug66582.jsp
new file mode 100644
index 00..4def99d32d
--- /dev/null
+++ b/test/webapp/bug6/bug66582.jsp
@@ -0,0 +1,22 @@
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this wo

[Bug 66582] Can't reference static fields declared in interfaces in JSP pages: javax.el.ELException: The class [...] must be public, in an exported package (for Java 9+), non-abstract and not an inter

2023-05-02 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=66582

Mark Thomas  changed:

   What|Removed |Added

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

--- Comment #2 from Mark Thomas  ---
Fixed in:
- 11.0.x for 11.0.0-M6 onwards
- 10.1.x for 10.1.9 onwards
-  9.0.x for  9.0.75 onwards
-  8.5.x for  8.5.89 onwards

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r61577 - /dev/tomcat/jakartaee-migration/v1.0.7/ /release/tomcat/jakartaee-migration/v1.0.7/

2023-05-02 Thread markt
Author: markt
Date: Tue May  2 12:37:04 2023
New Revision: 61577

Log:
Release Tomcat migration tool for Jakarta EE 1.0.7

Added:
release/tomcat/jakartaee-migration/v1.0.7/
  - copied from r61576, dev/tomcat/jakartaee-migration/v1.0.7/
Removed:
dev/tomcat/jakartaee-migration/v1.0.7/


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



[tomcat] branch 9.0.x updated: Fix back-port

2023-05-02 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 094c4bbaf9 Fix back-port
094c4bbaf9 is described below

commit 094c4bbaf9bd9e49a7c598f342624c2f2f84cce7
Author: Mark Thomas 
AuthorDate: Tue May 2 13:47:20 2023 +0100

Fix back-port
---
 test/javax/servlet/jsp/el/TestImportELResolver.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/javax/servlet/jsp/el/TestImportELResolver.java 
b/test/javax/servlet/jsp/el/TestImportELResolver.java
index c92d7f8800..085f514755 100644
--- a/test/javax/servlet/jsp/el/TestImportELResolver.java
+++ b/test/javax/servlet/jsp/el/TestImportELResolver.java
@@ -16,7 +16,7 @@
  */
 package javax.servlet.jsp.el;
 
-import jakarta.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpServletResponse;
 
 import org.junit.Assert;
 import org.junit.Test;


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



[tomcat] branch 8.5.x updated: Fix back-port

2023-05-02 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 92cc3c310f Fix back-port
92cc3c310f is described below

commit 92cc3c310f62f694b76c5ccb71c2a19d590b91f8
Author: Mark Thomas 
AuthorDate: Tue May 2 13:47:20 2023 +0100

Fix back-port
---
 test/javax/servlet/jsp/el/TestImportELResolver.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/javax/servlet/jsp/el/TestImportELResolver.java 
b/test/javax/servlet/jsp/el/TestImportELResolver.java
index c92d7f8800..085f514755 100644
--- a/test/javax/servlet/jsp/el/TestImportELResolver.java
+++ b/test/javax/servlet/jsp/el/TestImportELResolver.java
@@ -16,7 +16,7 @@
  */
 package javax.servlet.jsp.el;
 
-import jakarta.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpServletResponse;
 
 import org.junit.Assert;
 import org.junit.Test;


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



[tomcat] branch main updated: Improve French translations (remm)

2023-05-02 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 052ca41592 Improve French translations (remm)
052ca41592 is described below

commit 052ca415923a067d90758ad0dd2256c87d638cc8
Author: Mark Thomas 
AuthorDate: Tue May 2 13:53:50 2023 +0100

Improve French translations (remm)
---
 java/org/apache/catalina/authenticator/LocalStrings_fr.properties | 2 ++
 java/org/apache/catalina/core/LocalStrings_fr.properties  | 3 ++-
 java/org/apache/catalina/ha/deploy/LocalStrings_fr.properties | 1 +
 java/org/apache/catalina/realm/LocalStrings_fr.properties | 1 +
 java/org/apache/coyote/ajp/LocalStrings_fr.properties | 1 +
 webapps/docs/changelog.xml| 7 +++
 6 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/authenticator/LocalStrings_fr.properties 
b/java/org/apache/catalina/authenticator/LocalStrings_fr.properties
index 6b17f0282a..df9f284cf8 100644
--- a/java/org/apache/catalina/authenticator/LocalStrings_fr.properties
+++ b/java/org/apache/catalina/authenticator/LocalStrings_fr.properties
@@ -35,6 +35,8 @@ authenticator.unauthorized=Impossible d'authentifier avec les 
crédits fournis (
 basicAuthenticator.invalidCharset=Les seules valeurs permises sont null, la 
chaîne vide, ou des caractères UTF-8
 
 digestAuthenticator.cacheRemove=Une entrée valide du cache de nonce des 
clients a été enlevée pour faire de la place pour de nouvelles entrées, ce qui 
rend possible une attaque par répétition ; pour éviter cela, il est possible de 
reduire nonceValidity ou d'augmenter nonceCacheSize ; les avertissements de ce 
type ne se reproduiront pas avant 5 minutes
+digestAuthenticator.invalidAlgorithm=Impossible de configurer 
l''authentification DIGEST avec l''algorithme [{0}] car il n''est pas autorisé 
par la RFC 7616
+digestAuthenticator.unsupportedAlgorithm=Impossible de configurer 
l''authentification DIGEST avec l''algorithme [{0}] en tant que [{1}] car il 
n''est pas supporté par le JRE
 
 formAuthenticator.changeSessionIdLogin=L''id de session a été changé avant de 
forwarder vers la page de login lors de l''authentification FORM de [{0}] vers 
[{1}]
 formAuthenticator.forwardErrorFail=Erreur inattendue lors de la transmission à 
la page d'erreur
diff --git a/java/org/apache/catalina/core/LocalStrings_fr.properties 
b/java/org/apache/catalina/core/LocalStrings_fr.properties
index 9a3e862711..5b4ba827ee 100644
--- a/java/org/apache/catalina/core/LocalStrings_fr.properties
+++ b/java/org/apache/catalina/core/LocalStrings_fr.properties
@@ -209,7 +209,8 @@ standardContext.predestroy.duplicate=Définition dupliquée 
de la méthode de de
 standardContext.predestroy.required=Les noms qualifiés de la classe et de la 
méthode sont tous deux requis
 standardContext.reloadingCompleted=Le rechargement de ce contexte est terminé
 standardContext.reloadingStarted=Le rechargement du contexte [{0}] a démarré
-standardContext.requestListener.requestInit=Une exception lors de l''envoi de 
requête a initié un évènement cycle de vie (lifecycle event) pour l''instance 
de classe à l''écoute (listener) [{0}]
+standardContext.requestListener.requestDestroyed=Une exception est survenue 
lors de l''envoi de l''événement de destruction de la requête pour l''instance 
de listener de cycle de vie [{0}]
+standardContext.requestListener.requestInit=Une exception est survenue lors de 
l''envoi de l''événement d''initialisation de la requête pour l''instance de 
listener de cycle de vie [{0}]
 standardContext.resourcesInit=Erreur d'initialisation des ressources statiques
 standardContext.resourcesStart=Erreur lors du démarrage des ressources 
statiques
 standardContext.resourcesStop=Erreur lors de l'arrêt des ressources statiques
diff --git a/java/org/apache/catalina/ha/deploy/LocalStrings_fr.properties 
b/java/org/apache/catalina/ha/deploy/LocalStrings_fr.properties
index bb6a7b09b5..4264fe7ac8 100644
--- a/java/org/apache/catalina/ha/deploy/LocalStrings_fr.properties
+++ b/java/org/apache/catalina/ha/deploy/LocalStrings_fr.properties
@@ -14,6 +14,7 @@
 # limitations under the License.
 
 farmWarDeployer.alreadyDeployed=l''application web [{0}] est déjà déployée
+farmWarDeployer.delete=[{0}] a été supprimé avant que le fichier complet 
n''ait été recu car le maxValidTime de [{1}] secondes a expiré
 farmWarDeployer.deleteFail=Pas réussi à supprimer [{0}]
 farmWarDeployer.deployEnd=Le déploiement de [{0}] est terminé
 farmWarDeployer.fileCopyFail=Impossible de copier depuis [{0}] vers [{1}]
diff --git a/java/org/apache/catalina/realm/LocalStrings_fr.properties 
b/java/org/apache/catalina/realm/LocalStrings_fr.properties
index 6c481b7b91..f4cdef5c75 100644
--- a/java/org/apache/catalina/realm/LocalStrings_fr.properties
+++ b/java/org/apache/catalina/

[tomcat] branch main updated: Improvements to Chinese translations. (lihan)

2023-05-02 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 1a88e9937c Improvements to Chinese translations. (lihan)
1a88e9937c is described below

commit 1a88e9937c005eb1f06f979ba243cb4574d07754
Author: Mark Thomas 
AuthorDate: Tue May 2 13:56:44 2023 +0100

Improvements to Chinese translations. (lihan)
---
 java/org/apache/catalina/connector/LocalStrings_zh_CN.properties  | 4 
 java/org/apache/catalina/valves/rewrite/LocalStrings_zh_CN.properties | 2 ++
 java/org/apache/coyote/ajp/LocalStrings_zh_CN.properties  | 1 +
 java/org/apache/tomcat/util/http/parser/LocalStrings_zh_CN.properties | 2 ++
 java/org/apache/tomcat/util/net/LocalStrings_zh_CN.properties | 2 ++
 webapps/docs/changelog.xml| 3 +++
 6 files changed, 14 insertions(+)

diff --git a/java/org/apache/catalina/connector/LocalStrings_zh_CN.properties 
b/java/org/apache/catalina/connector/LocalStrings_zh_CN.properties
index 64c6f8b8ec..2da544fbdb 100644
--- a/java/org/apache/catalina/connector/LocalStrings_zh_CN.properties
+++ b/java/org/apache/catalina/connector/LocalStrings_zh_CN.properties
@@ -19,8 +19,12 @@ coyoteAdapter.authenticate=连接器提供的经过身份验证的用户[{0}]。
 coyoteAdapter.authorize=(:使用Tomcat的领域授权用户[{0}]
 coyoteAdapter.checkRecycled.request=遇到未回收的请求并强制回收。
 coyoteAdapter.checkRecycled.response=遇到非回收的相应并强行回收。
+coyoteAdapter.connect=不支持CONNECT方法的HTTP请求
 coyoteAdapter.debug=变量[{0}]的值为[{1}]。
+coyoteAdapter.invalidURI=无效URI
+coyoteAdapter.invalidURIWithMessage=无效URI:[{0}]
 coyoteAdapter.nullRequest=异步分派只能在现有请求上发生
+coyoteAdapter.trace=不允许使用TRACE方法
 
 coyoteConnector.invalidEncoding=编码 [{0}] 不能被 JRE 识别,Connector 将继续使用 [{1}]
 coyoteConnector.invalidPort=连接器不能启动,因为指定的端口 [{0}]无效
diff --git 
a/java/org/apache/catalina/valves/rewrite/LocalStrings_zh_CN.properties 
b/java/org/apache/catalina/valves/rewrite/LocalStrings_zh_CN.properties
index 4d41948cd3..f70440076a 100644
--- a/java/org/apache/catalina/valves/rewrite/LocalStrings_zh_CN.properties
+++ b/java/org/apache/catalina/valves/rewrite/LocalStrings_zh_CN.properties
@@ -16,6 +16,8 @@
 quotedStringTokenizer.tokenizeError=模式[{2}]中[{1}]位置处的文本[{0}]标记错误
 
 rewriteMap.tooManyParameters=对当前map来说参数太多
+rewriteMap.txtInvalidLine=文本文件中[{1}],[{0}]为无效行
+rewriteMap.txtReadError=读取文本文件[{0}]出错
 
 rewriteValve.closeError=关闭配置时出错
 rewriteValve.invalidFlags=[{0}]标志[{1}]中的标志无效
diff --git a/java/org/apache/coyote/ajp/LocalStrings_zh_CN.properties 
b/java/org/apache/coyote/ajp/LocalStrings_zh_CN.properties
index fea44101c6..ff959172cb 100644
--- a/java/org/apache/coyote/ajp/LocalStrings_zh_CN.properties
+++ b/java/org/apache/coyote/ajp/LocalStrings_zh_CN.properties
@@ -26,6 +26,7 @@ ajpprocessor.header.tooLong=已收到长度为[{0}]的头消息,但packetSize
 ajpprocessor.readtimeout=从Socket读取数据超时
 ajpprocessor.request.prepare=准备请求错误
 ajpprocessor.request.process=处理请求错误
+ajpprocessor.response.invalidHeader=响应头:[{0}] 值:[{1}]无效,已从响应中移除
 ajpprocessor.unknownAttribute=由于请求属性[{0}]接收自反向代理,请求被拒绝
 
 ajpprotocol.noSSL=AJP不支持SSL。[{0}]的SSL主机配置被忽略
diff --git 
a/java/org/apache/tomcat/util/http/parser/LocalStrings_zh_CN.properties 
b/java/org/apache/tomcat/util/http/parser/LocalStrings_zh_CN.properties
index 4532e0155c..e9a4412b46 100644
--- a/java/org/apache/tomcat/util/http/parser/LocalStrings_zh_CN.properties
+++ b/java/org/apache/tomcat/util/http/parser/LocalStrings_zh_CN.properties
@@ -50,3 +50,5 @@ sf.boolean.invalidCharacter=[{0}]字符不是有效布尔值
 sf.invalidCharacter=[{0}]字符在这里无效
 sf.numeric.decimalInvalidFinal=十进制最后一个字符必须是数字
 sf.numeric.decimalPartTooLong=小数点后超过3位
+sf.string.invalidCharacter=字符串中[{0}]字符无效
+sf.string.invalidEscape=[{0}]字符不能被转义
diff --git a/java/org/apache/tomcat/util/net/LocalStrings_zh_CN.properties 
b/java/org/apache/tomcat/util/net/LocalStrings_zh_CN.properties
index 59d5e29e86..3bbe3bc3d0 100644
--- a/java/org/apache/tomcat/util/net/LocalStrings_zh_CN.properties
+++ b/java/org/apache/tomcat/util/net/LocalStrings_zh_CN.properties
@@ -114,6 +114,8 @@ endpoint.setAttribute=设置. [{0}] 到 [{1}]
 endpoint.setAttributeError=无法将属性[{0}]设置为[{1}]
 endpoint.socketOptionsError=设置套接字选项时出错
 endpoint.timeout.err=处理套接字超时出错
+endpoint.tls.cert.encodingError=证书指纹不可用
+endpoint.tls.cert.noCerts=证书详细信息不可用,因为SSLContext返回的证书链为空
 endpoint.unknownSslHostName=此终结点无法识别SSL主机名[{0}]
 endpoint.warn.executorShutdown=与线程池[{0}]关联的执行程序尚未完全关闭。 某些应用程序线程可能仍在运行。
 endpoint.warn.incorrectConnectionCount=连接数不正确,在同一个套接字上调用多个socket.close。
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 57fe7ed111..12158cd38b 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -180,6 +180,9 @@
   
 Improvements to French translations. (remm)
   
+  
+Improvements to Chinese translations. (lihan)
+  
 
   
 


-

[tomcat] branch 10.1.x updated: Back-port translation updates

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

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


The following commit(s) were added to refs/heads/10.1.x by this push:
 new b2a5982918 Back-port translation updates
b2a5982918 is described below

commit b2a59829182d62a70b7d7b80d14af9952dcdcd94
Author: Mark Thomas 
AuthorDate: Tue May 2 13:58:43 2023 +0100

Back-port translation updates
---
 .../apache/catalina/authenticator/LocalStrings_fr.properties   |  2 ++
 .../apache/catalina/connector/LocalStrings_zh_CN.properties|  4 
 java/org/apache/catalina/core/LocalStrings_fr.properties   |  3 ++-
 java/org/apache/catalina/ha/deploy/LocalStrings_fr.properties  |  1 +
 java/org/apache/catalina/realm/LocalStrings_fr.properties  |  1 +
 .../catalina/valves/rewrite/LocalStrings_zh_CN.properties  |  2 ++
 .../apache/catalina/webresources/LocalStrings_fr.properties|  2 +-
 .../apache/catalina/webresources/LocalStrings_ja.properties|  2 +-
 java/org/apache/coyote/ajp/LocalStrings_fr.properties  |  1 +
 java/org/apache/coyote/ajp/LocalStrings_zh_CN.properties   |  1 +
 java/org/apache/tomcat/util/net/LocalStrings_zh_CN.properties  |  2 ++
 webapps/docs/changelog.xml | 10 ++
 12 files changed, 28 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/catalina/authenticator/LocalStrings_fr.properties 
b/java/org/apache/catalina/authenticator/LocalStrings_fr.properties
index 6b17f0282a..df9f284cf8 100644
--- a/java/org/apache/catalina/authenticator/LocalStrings_fr.properties
+++ b/java/org/apache/catalina/authenticator/LocalStrings_fr.properties
@@ -35,6 +35,8 @@ authenticator.unauthorized=Impossible d'authentifier avec les 
crédits fournis (
 basicAuthenticator.invalidCharset=Les seules valeurs permises sont null, la 
chaîne vide, ou des caractères UTF-8
 
 digestAuthenticator.cacheRemove=Une entrée valide du cache de nonce des 
clients a été enlevée pour faire de la place pour de nouvelles entrées, ce qui 
rend possible une attaque par répétition ; pour éviter cela, il est possible de 
reduire nonceValidity ou d'augmenter nonceCacheSize ; les avertissements de ce 
type ne se reproduiront pas avant 5 minutes
+digestAuthenticator.invalidAlgorithm=Impossible de configurer 
l''authentification DIGEST avec l''algorithme [{0}] car il n''est pas autorisé 
par la RFC 7616
+digestAuthenticator.unsupportedAlgorithm=Impossible de configurer 
l''authentification DIGEST avec l''algorithme [{0}] en tant que [{1}] car il 
n''est pas supporté par le JRE
 
 formAuthenticator.changeSessionIdLogin=L''id de session a été changé avant de 
forwarder vers la page de login lors de l''authentification FORM de [{0}] vers 
[{1}]
 formAuthenticator.forwardErrorFail=Erreur inattendue lors de la transmission à 
la page d'erreur
diff --git a/java/org/apache/catalina/connector/LocalStrings_zh_CN.properties 
b/java/org/apache/catalina/connector/LocalStrings_zh_CN.properties
index 64c6f8b8ec..2da544fbdb 100644
--- a/java/org/apache/catalina/connector/LocalStrings_zh_CN.properties
+++ b/java/org/apache/catalina/connector/LocalStrings_zh_CN.properties
@@ -19,8 +19,12 @@ coyoteAdapter.authenticate=连接器提供的经过身份验证的用户[{0}]。
 coyoteAdapter.authorize=(:使用Tomcat的领域授权用户[{0}]
 coyoteAdapter.checkRecycled.request=遇到未回收的请求并强制回收。
 coyoteAdapter.checkRecycled.response=遇到非回收的相应并强行回收。
+coyoteAdapter.connect=不支持CONNECT方法的HTTP请求
 coyoteAdapter.debug=变量[{0}]的值为[{1}]。
+coyoteAdapter.invalidURI=无效URI
+coyoteAdapter.invalidURIWithMessage=无效URI:[{0}]
 coyoteAdapter.nullRequest=异步分派只能在现有请求上发生
+coyoteAdapter.trace=不允许使用TRACE方法
 
 coyoteConnector.invalidEncoding=编码 [{0}] 不能被 JRE 识别,Connector 将继续使用 [{1}]
 coyoteConnector.invalidPort=连接器不能启动,因为指定的端口 [{0}]无效
diff --git a/java/org/apache/catalina/core/LocalStrings_fr.properties 
b/java/org/apache/catalina/core/LocalStrings_fr.properties
index 4c11ec358c..0edb5cbea1 100644
--- a/java/org/apache/catalina/core/LocalStrings_fr.properties
+++ b/java/org/apache/catalina/core/LocalStrings_fr.properties
@@ -209,7 +209,8 @@ standardContext.predestroy.duplicate=Définition dupliquée 
de la méthode de de
 standardContext.predestroy.required=Les noms qualifiés de la classe et de la 
méthode sont tous deux requis
 standardContext.reloadingCompleted=Le rechargement de ce contexte est terminé
 standardContext.reloadingStarted=Le rechargement du contexte [{0}] a démarré
-standardContext.requestListener.requestInit=Une exception lors de l''envoi de 
requête a initié un évènement cycle de vie (lifecycle event) pour l''instance 
de classe à l''écoute (listener) [{0}]
+standardContext.requestListener.requestDestroyed=Une exception est survenue 
lors de l''envoi de l''événement de destruction de la requête pour l''instance 
de listener de cycle de vie [{0}]
+standardContext.requestListener.requestInit=Une exception est survenue lors de 
l''envoi de l''événement d''initialisation de la requête

[tomcat] branch 9.0.x updated: Back-port translation updates

2023-05-02 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 8702ea93a0 Back-port translation updates
8702ea93a0 is described below

commit 8702ea93a03edb666f7b8d6210b1e45597166047
Author: Mark Thomas 
AuthorDate: Tue May 2 14:00:43 2023 +0100

Back-port translation updates
---
 .../apache/catalina/authenticator/LocalStrings_fr.properties   |  2 ++
 .../apache/catalina/connector/LocalStrings_zh_CN.properties|  4 
 java/org/apache/catalina/core/LocalStrings_fr.properties   |  3 ++-
 java/org/apache/catalina/ha/deploy/LocalStrings_fr.properties  |  1 +
 java/org/apache/catalina/realm/LocalStrings_fr.properties  |  1 +
 .../catalina/valves/rewrite/LocalStrings_zh_CN.properties  |  2 ++
 .../apache/catalina/webresources/LocalStrings_fr.properties|  2 +-
 .../apache/catalina/webresources/LocalStrings_ja.properties|  2 +-
 java/org/apache/coyote/ajp/LocalStrings_fr.properties  |  1 +
 java/org/apache/coyote/ajp/LocalStrings_zh_CN.properties   |  1 +
 java/org/apache/tomcat/util/net/LocalStrings_zh_CN.properties  |  2 ++
 webapps/docs/changelog.xml | 10 ++
 12 files changed, 28 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/catalina/authenticator/LocalStrings_fr.properties 
b/java/org/apache/catalina/authenticator/LocalStrings_fr.properties
index 6b17f0282a..df9f284cf8 100644
--- a/java/org/apache/catalina/authenticator/LocalStrings_fr.properties
+++ b/java/org/apache/catalina/authenticator/LocalStrings_fr.properties
@@ -35,6 +35,8 @@ authenticator.unauthorized=Impossible d'authentifier avec les 
crédits fournis (
 basicAuthenticator.invalidCharset=Les seules valeurs permises sont null, la 
chaîne vide, ou des caractères UTF-8
 
 digestAuthenticator.cacheRemove=Une entrée valide du cache de nonce des 
clients a été enlevée pour faire de la place pour de nouvelles entrées, ce qui 
rend possible une attaque par répétition ; pour éviter cela, il est possible de 
reduire nonceValidity ou d'augmenter nonceCacheSize ; les avertissements de ce 
type ne se reproduiront pas avant 5 minutes
+digestAuthenticator.invalidAlgorithm=Impossible de configurer 
l''authentification DIGEST avec l''algorithme [{0}] car il n''est pas autorisé 
par la RFC 7616
+digestAuthenticator.unsupportedAlgorithm=Impossible de configurer 
l''authentification DIGEST avec l''algorithme [{0}] en tant que [{1}] car il 
n''est pas supporté par le JRE
 
 formAuthenticator.changeSessionIdLogin=L''id de session a été changé avant de 
forwarder vers la page de login lors de l''authentification FORM de [{0}] vers 
[{1}]
 formAuthenticator.forwardErrorFail=Erreur inattendue lors de la transmission à 
la page d'erreur
diff --git a/java/org/apache/catalina/connector/LocalStrings_zh_CN.properties 
b/java/org/apache/catalina/connector/LocalStrings_zh_CN.properties
index d6987d2aea..2dd18b8739 100644
--- a/java/org/apache/catalina/connector/LocalStrings_zh_CN.properties
+++ b/java/org/apache/catalina/connector/LocalStrings_zh_CN.properties
@@ -19,8 +19,12 @@ coyoteAdapter.authenticate=连接器提供的经过身份验证的用户[{0}]。
 coyoteAdapter.authorize=(:使用Tomcat的领域授权用户[{0}]
 coyoteAdapter.checkRecycled.request=遇到未回收的请求并强制回收。
 coyoteAdapter.checkRecycled.response=遇到非回收的相应并强行回收。
+coyoteAdapter.connect=不支持CONNECT方法的HTTP请求
 coyoteAdapter.debug=变量[{0}]的值为[{1}]。
+coyoteAdapter.invalidURI=无效URI
+coyoteAdapter.invalidURIWithMessage=无效URI:[{0}]
 coyoteAdapter.nullRequest=异步分派只能在现有请求上发生
+coyoteAdapter.trace=不允许使用TRACE方法
 
 coyoteConnector.invalidEncoding=编码 [{0}] 不能被 JRE 识别,Connector 将继续使用 [{1}]
 coyoteConnector.invalidPort=连接器不能启动,因为指定的端口 [{0}]无效
diff --git a/java/org/apache/catalina/core/LocalStrings_fr.properties 
b/java/org/apache/catalina/core/LocalStrings_fr.properties
index 34c149ddcd..c0eb770822 100644
--- a/java/org/apache/catalina/core/LocalStrings_fr.properties
+++ b/java/org/apache/catalina/core/LocalStrings_fr.properties
@@ -216,7 +216,8 @@ standardContext.predestroy.duplicate=Définition dupliquée 
de la méthode de de
 standardContext.predestroy.required=Les noms qualifiés de la classe et de la 
méthode sont tous deux requis
 standardContext.reloadingCompleted=Le rechargement de ce contexte est terminé
 standardContext.reloadingStarted=Le rechargement du contexte [{0}] a démarré
-standardContext.requestListener.requestInit=Une exception lors de l''envoi de 
requête a initié un évènement cycle de vie (lifecycle event) pour l''instance 
de classe à l''écoute (listener) [{0}]
+standardContext.requestListener.requestDestroyed=Une exception est survenue 
lors de l''envoi de l''événement de destruction de la requête pour l''instance 
de listener de cycle de vie [{0}]
+standardContext.requestListener.requestInit=Une exception est survenue lors de 
l''envoi de l''événement d''initialisation de la requête p

[tomcat] branch 8.5.x updated: Back-port translation updates

2023-05-02 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 d172c7b9fb Back-port translation updates
d172c7b9fb is described below

commit d172c7b9fb5c1d61744389c84b1521b3a4bc9b04
Author: Mark Thomas 
AuthorDate: Tue May 2 14:02:03 2023 +0100

Back-port translation updates
---
 .../apache/catalina/authenticator/LocalStrings_fr.properties   |  2 ++
 .../apache/catalina/connector/LocalStrings_zh_CN.properties|  4 
 java/org/apache/catalina/core/LocalStrings_fr.properties   |  3 ++-
 java/org/apache/catalina/ha/deploy/LocalStrings_fr.properties  |  1 +
 java/org/apache/catalina/realm/LocalStrings_fr.properties  |  1 +
 .../catalina/valves/rewrite/LocalStrings_zh_CN.properties  |  2 ++
 .../apache/catalina/webresources/LocalStrings_fr.properties|  2 +-
 .../apache/catalina/webresources/LocalStrings_ja.properties|  2 +-
 java/org/apache/coyote/ajp/LocalStrings_fr.properties  |  1 +
 java/org/apache/coyote/ajp/LocalStrings_zh_CN.properties   |  1 +
 java/org/apache/tomcat/util/net/LocalStrings_zh_CN.properties  |  2 ++
 webapps/docs/changelog.xml | 10 ++
 12 files changed, 28 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/catalina/authenticator/LocalStrings_fr.properties 
b/java/org/apache/catalina/authenticator/LocalStrings_fr.properties
index 6b17f0282a..df9f284cf8 100644
--- a/java/org/apache/catalina/authenticator/LocalStrings_fr.properties
+++ b/java/org/apache/catalina/authenticator/LocalStrings_fr.properties
@@ -35,6 +35,8 @@ authenticator.unauthorized=Impossible d'authentifier avec les 
crédits fournis (
 basicAuthenticator.invalidCharset=Les seules valeurs permises sont null, la 
chaîne vide, ou des caractères UTF-8
 
 digestAuthenticator.cacheRemove=Une entrée valide du cache de nonce des 
clients a été enlevée pour faire de la place pour de nouvelles entrées, ce qui 
rend possible une attaque par répétition ; pour éviter cela, il est possible de 
reduire nonceValidity ou d'augmenter nonceCacheSize ; les avertissements de ce 
type ne se reproduiront pas avant 5 minutes
+digestAuthenticator.invalidAlgorithm=Impossible de configurer 
l''authentification DIGEST avec l''algorithme [{0}] car il n''est pas autorisé 
par la RFC 7616
+digestAuthenticator.unsupportedAlgorithm=Impossible de configurer 
l''authentification DIGEST avec l''algorithme [{0}] en tant que [{1}] car il 
n''est pas supporté par le JRE
 
 formAuthenticator.changeSessionIdLogin=L''id de session a été changé avant de 
forwarder vers la page de login lors de l''authentification FORM de [{0}] vers 
[{1}]
 formAuthenticator.forwardErrorFail=Erreur inattendue lors de la transmission à 
la page d'erreur
diff --git a/java/org/apache/catalina/connector/LocalStrings_zh_CN.properties 
b/java/org/apache/catalina/connector/LocalStrings_zh_CN.properties
index 22fc6b3e3d..26639f23d9 100644
--- a/java/org/apache/catalina/connector/LocalStrings_zh_CN.properties
+++ b/java/org/apache/catalina/connector/LocalStrings_zh_CN.properties
@@ -19,8 +19,12 @@ coyoteAdapter.authenticate=连接器提供的经过身份验证的用户[{0}]。
 coyoteAdapter.authorize=(:使用Tomcat的领域授权用户[{0}]
 coyoteAdapter.checkRecycled.request=遇到未回收的请求并强制回收。
 coyoteAdapter.checkRecycled.response=遇到非回收的相应并强行回收。
+coyoteAdapter.connect=不支持CONNECT方法的HTTP请求
 coyoteAdapter.debug=变量[{0}]的值为[{1}]。
+coyoteAdapter.invalidURI=无效URI
+coyoteAdapter.invalidURIWithMessage=无效URI:[{0}]
 coyoteAdapter.nullRequest=异步分派只能在现有请求上发生
+coyoteAdapter.trace=不允许使用TRACE方法
 
 coyoteConnector.invalidEncoding=编码 [{0}] 不能被 JRE 识别,Connector 将继续使用 [{1}]
 coyoteConnector.invalidPort=连接器不能启动,因为指定的端口 [{0}]无效
diff --git a/java/org/apache/catalina/core/LocalStrings_fr.properties 
b/java/org/apache/catalina/core/LocalStrings_fr.properties
index 3613debb23..9f396a2294 100644
--- a/java/org/apache/catalina/core/LocalStrings_fr.properties
+++ b/java/org/apache/catalina/core/LocalStrings_fr.properties
@@ -214,7 +214,8 @@ standardContext.predestroy.duplicate=Définition dupliquée 
de la méthode de de
 standardContext.predestroy.required=Les noms qualifiés de la classe et de la 
méthode sont tous deux requis
 standardContext.reloadingCompleted=Le rechargement de ce contexte est terminé
 standardContext.reloadingStarted=Le rechargement du contexte [{0}] a démarré
-standardContext.requestListener.requestInit=Une exception lors de l''envoi de 
requête a initié un évènement cycle de vie (lifecycle event) pour l''instance 
de classe à l''écoute (listener) [{0}]
+standardContext.requestListener.requestDestroyed=Une exception est survenue 
lors de l''envoi de l''événement de destruction de la requête pour l''instance 
de listener de cycle de vie [{0}]
+standardContext.requestListener.requestInit=Une exception est survenue lors de 
l''envoi de l''événement d''initialisation de la requête p

svn commit: r1909571 - in /tomcat/site/trunk: docs/download-migration.html docs/index.html docs/oldnews-2022.html xdocs/download-migration.xml xdocs/index.xml xdocs/oldnews-2022.xml

2023-05-02 Thread markt
Author: markt
Date: Tue May  2 13:17:23 2023
New Revision: 1909571

URL: http://svn.apache.org/viewvc?rev=1909571&view=rev
Log:
Update site for Tomcat Migration tool for Jakarta EE 1.0.7 release

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

Modified: tomcat/site/trunk/docs/download-migration.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/download-migration.html?rev=1909571&r1=1909570&r2=1909571&view=diff
==
--- tomcat/site/trunk/docs/download-migration.html (original)
+++ tomcat/site/trunk/docs/download-migration.html Tue May  2 13:17:23 2023
@@ -7,7 +7,7 @@
 
   Quick Navigation
 
-[define v]1.0.6[end]
+[define v]1.0.7[end]
 https://downloads.apache.org/tomcat/jakartaee-migration/KEYS";>KEYS |
 [v] |
 Browse |

Modified: tomcat/site/trunk/docs/index.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/index.html?rev=1909571&r1=1909570&r2=1909571&view=diff
==
--- tomcat/site/trunk/docs/index.html (original)
+++ tomcat/site/trunk/docs/index.html Tue May  2 13:17:23 2023
@@ -34,6 +34,31 @@ wiki page.
 Apache Tomcat, Tomcat, Apache, the Apache feather, and the Apache Tomcat
 project logo are trademarks of the Apache Software Foundation.
 
+2023-05-02 Tomcat Migration Tool for Jakarta EE 1.0.7 
Released
+
+The Apache Tomcat Project is proud to announce the release of 1.0.7 of the
+Apache Tomcat Migration Tool for Jakarta EE. This release contains a number of
+bug fixes and improvements compared to version 1.0.6.
+The notable changes in this release are:
+
+Update OSGI servlet specification versions if present in manifest file. PR
+#42 provided by Ivan Furnadjiev.
+Add configuration option, matchExcludesAgainstPathName that can be used to
+configure exclusions based on path name rather than just file name. PR 38
+provided by Réda Housni Alaoui.
+When converting directories, rename files according to the chosen profile.
+
+Work-around a known JDK bug when converting using the streaming approach.
+
+
+
+Full details of these changes, and all the other changes, are available in the
+https://github.com/apache/tomcat-jakartaee-migration/blob/main/CHANGES.md";>changelog.
+
+
+
+https://tomcat.apache.org/download-migration.cgi";>Download
+
 2023-04-19 Tomcat 8.5.88 Released
  
 The Apache Tomcat Project is proud to announce the release of version 8.5.88
@@ -189,25 +214,6 @@ Tomcat Native. The notable changes since
 https://tomcat.apache.org/download-native.cgi";>Download |
 ChangeLog for 1.2.36
 
-2022-12-05 Tomcat Migration Tool for Jakarta EE 1.0.6 
Released
-
-The Apache Tomcat Project is proud to announce the release of 1.0.6 of the
-Apache Tomcat Migration Tool for Jakarta EE. This release contains a number of
-bug fixes and improvements compared to version 1.0.5.
-The notable changes in this release are:
-
-Correct regression in handling of javax.annotation package introduced in
-1.0.5. PR provided by Danny Thomas.
-Allow parallel use of ClassConverter. PR provided by Danny Thomas. 
-
-
-Full details of these changes, and all the other changes, are available in the
-https://github.com/apache/tomcat-jakartaee-migration/blob/main/CHANGES.md";>changelog.
-
-
-
-https://tomcat.apache.org/download-migration.cgi";>Download
-
 2020-03-06 Tomcat Connectors 1.2.48 Released
 
 The Apache Tomcat Project is proud to announce the release of version 1.2.48 of

Modified: tomcat/site/trunk/docs/oldnews-2022.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/oldnews-2022.html?rev=1909571&r1=1909570&r2=1909571&view=diff
==
--- tomcat/site/trunk/docs/oldnews-2022.html (original)
+++ tomcat/site/trunk/docs/oldnews-2022.html Tue May  2 13:17:23 2023
@@ -17,6 +17,25 @@
   year 2011
   year 2010
 
+2022-12-05 Tomcat Migration Tool for Jakarta EE 1.0.6 
Released
+
+The Apache Tomcat Project is proud to announce the release of 1.0.6 of the
+Apache Tomcat Migration Tool for Jakarta EE. This release contains a number of
+bug fixes and improvements compared to version 1.0.5.
+The notable changes in this release are:
+
+Correct regression in handling of javax.annotation package introduced in
+1.0.5. PR provided by Danny Thomas.
+Allow parallel use of ClassConverter. PR provided by Danny Thomas. 
+
+
+Full details of these changes, and all the other changes, are available in the
+https://github.com/apache/tomcat-jakartaee-migration/blob/main/CHANGES.md";>changelog.
+
+
+
+https://tomcat.apache.org/download-migration.cgi";>Download
+
 2022-12-05 Tomcat 11.0.0-M1 Released
 
 The Apache Tomcat Proje

[tomcat] branch 8.5.x updated: Align with 9.0.x onwards - harden the default HTTP configuration

2023-05-02 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 4bbfd89dab Align with 9.0.x onwards - harden the default HTTP 
configuration
4bbfd89dab is described below

commit 4bbfd89dab9e62d77d7fd968a3c15b86ff364e62
Author: Mark Thomas 
AuthorDate: Tue May 2 14:25:58 2023 +0100

Align with 9.0.x onwards - harden the default HTTP configuration
---
 java/org/apache/coyote/http11/AbstractHttp11Protocol.java | 2 +-
 webapps/docs/changelog.xml| 6 ++
 webapps/docs/config/http.xml  | 6 +++---
 3 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/coyote/http11/AbstractHttp11Protocol.java 
b/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
index a337f07234..c4e4fcf218 100644
--- a/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
+++ b/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
@@ -172,7 +172,7 @@ public abstract class AbstractHttp11Protocol extends 
AbstractProtocol {
 }
 
 
-private boolean allowHostHeaderMismatch = true;
+private boolean allowHostHeaderMismatch = false;
 
 /**
  * Will Tomcat accept an HTTP 1.1 request where the host header does not 
agree with the host specified (if any) in
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 5e851fbde2..ebf9552cb6 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -142,6 +142,12 @@
 Add support for a new character set, gb18030-2022 -
 introduced in Java 21, to the character set caching mechanism. (markt)
   
+  
+The default for the HTTP Connector attribute
+allowHostHeaderMismatch has been changed from
+true to false to harden the default
+configuration. (markt)
+  
 
   
   
diff --git a/webapps/docs/config/http.xml b/webapps/docs/config/http.xml
index 30f032ab80..429c04f485 100644
--- a/webapps/docs/config/http.xml
+++ b/webapps/docs/config/http.xml
@@ -342,10 +342,10 @@
 
 
 
-  By default Tomcat will allow requests that specify a host in the
+  By default Tomcat will reject requests that specify a host in the
   request line but specify a different host in the host header. This
-  check can be enabled by setting this attribute to false. If
-  not specified, the default is true.
+  check can be disabled by setting this attribute to true. If
+  not specified, the default is false.
 
 
 


-
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: Align with 9.0.x onwards - harden the default HTTP configuration

2023-05-02 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 a1efd94f75 Align with 9.0.x onwards - harden the default HTTP 
configuration
a1efd94f75 is described below

commit a1efd94f7506d0bf113a0c225ad6f3fb9af08307
Author: Mark Thomas 
AuthorDate: Tue May 2 14:28:43 2023 +0100

Align with 9.0.x onwards - harden the default HTTP configuration
---
 java/org/apache/coyote/http11/AbstractHttp11Protocol.java | 2 +-
 webapps/docs/changelog.xml| 6 ++
 webapps/docs/config/http.xml  | 3 +--
 3 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/coyote/http11/AbstractHttp11Protocol.java 
b/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
index c4e4fcf218..2b1d75b124 100644
--- a/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
+++ b/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
@@ -195,7 +195,7 @@ public abstract class AbstractHttp11Protocol extends 
AbstractProtocol {
 }
 
 
-private boolean rejectIllegalHeader = false;
+private boolean rejectIllegalHeader = true;
 
 /**
  * If an HTTP request is received that contains an illegal header name or 
value (e.g. the header name is not a
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index ebf9552cb6..6f989bdd51 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -148,6 +148,12 @@
 true to false to harden the default
 configuration. (markt)
   
+  
+The default for the HTTP Connector attribute
+rejectIllegalHeader has been changed from
+false to true to harden the default
+configuration. (markt)
+  
 
   
   
diff --git a/webapps/docs/config/http.xml b/webapps/docs/config/http.xml
index 429c04f485..11f660d6cc 100644
--- a/webapps/docs/config/http.xml
+++ b/webapps/docs/config/http.xml
@@ -632,8 +632,7 @@
   value (e.g. the header name is not a token) this setting determines if 
the
   request will be rejected with a 400 response (true) or if 
the
   illegal header be ignored (false). The default value is
-  false which will cause the request to be processed but the
-  illegal header will be ignored.
+  true which will cause the request to be rejected.
 
 
 


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



[tomcat] branch main updated: Update Checkstyle to 10.10.0

2023-05-02 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 94017ec142 Update Checkstyle to 10.10.0
94017ec142 is described below

commit 94017ec142479bc4401baa76dd00f416d3f1f91d
Author: Mark Thomas 
AuthorDate: Tue May 2 15:25:31 2023 +0100

Update Checkstyle to 10.10.0
---
 build.properties.default   | 4 ++--
 webapps/docs/changelog.xml | 3 +++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/build.properties.default b/build.properties.default
index 6f53a9ec91..e3f9882ffe 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -253,10 +253,10 @@ 
unboundid.jar=${unboundid.home}/unboundid-ldapsdk-${unboundid.version}.jar
 
unboundid.loc=${base-maven.loc}/com/unboundid/unboundid-ldapsdk/${unboundid.version}/unboundid-ldapsdk-${unboundid.version}.jar
 
 # - Checkstyle, version 6.16 or later -
-checkstyle.version=10.9.3
+checkstyle.version=10.10.0
 checkstyle.checksum.enabled=true
 checkstyle.checksum.algorithm=SHA-512
-checkstyle.checksum.value=57443ea697a02630cea080e78296545586ce2fa40c72d4d5e3d24c511287fc5d460e274ef49a6c0fc386682df248c4306a232b5f13d844c2ef4d1613d5b37e92
+checkstyle.checksum.value=2209acae15d3665daf63a540aa2f28db82180393c26a89741e334112d1151ad76d0e33d2881a6d0ebd4b0aba889b4f78d17b0d851d16fc7d4b758166f7375df5
 checkstyle.home=${base.path}/checkstyle-${checkstyle.version}
 checkstyle.jar=${checkstyle.home}/checkstyle-${checkstyle.version}-all.jar
 
checkstyle.loc=${base-gh.loc}/checkstyle/checkstyle/releases/download/checkstyle-${checkstyle.version}/checkstyle-${checkstyle.version}-all.jar
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 12158cd38b..c9a7f73fc8 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -183,6 +183,9 @@
   
 Improvements to Chinese translations. (lihan)
   
+  
+Update Checkstyle to 10.10.0. (markt)
+  
 
   
 


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



[tomcat] branch 10.1.x updated: Update Checkstyle to 10.10.0

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

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


The following commit(s) were added to refs/heads/10.1.x by this push:
 new 480aac8e1d Update Checkstyle to 10.10.0
480aac8e1d is described below

commit 480aac8e1d1b7805d7e24ce9393d8ec1a6f7ec91
Author: Mark Thomas 
AuthorDate: Tue May 2 15:25:31 2023 +0100

Update Checkstyle to 10.10.0
---
 build.properties.default   | 4 ++--
 webapps/docs/changelog.xml | 3 +++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/build.properties.default b/build.properties.default
index e6844a4b2e..d88c69d3a9 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -271,10 +271,10 @@ 
unboundid.jar=${unboundid.home}/unboundid-ldapsdk-${unboundid.version}.jar
 
unboundid.loc=${base-maven.loc}/com/unboundid/unboundid-ldapsdk/${unboundid.version}/unboundid-ldapsdk-${unboundid.version}.jar
 
 # - Checkstyle, version 6.16 or later -
-checkstyle.version=10.9.3
+checkstyle.version=10.10.0
 checkstyle.checksum.enabled=true
 checkstyle.checksum.algorithm=SHA-512
-checkstyle.checksum.value=57443ea697a02630cea080e78296545586ce2fa40c72d4d5e3d24c511287fc5d460e274ef49a6c0fc386682df248c4306a232b5f13d844c2ef4d1613d5b37e92
+checkstyle.checksum.value=2209acae15d3665daf63a540aa2f28db82180393c26a89741e334112d1151ad76d0e33d2881a6d0ebd4b0aba889b4f78d17b0d851d16fc7d4b758166f7375df5
 checkstyle.home=${base.path}/checkstyle-${checkstyle.version}
 checkstyle.jar=${checkstyle.home}/checkstyle-${checkstyle.version}-all.jar
 
checkstyle.loc=${base-gh.loc}/checkstyle/checkstyle/releases/download/checkstyle-${checkstyle.version}/checkstyle-${checkstyle.version}-all.jar
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 890d603464..90d69f1a0a 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -183,6 +183,9 @@
   
 Improvements to Chinese translations. (lihan)
   
+  
+Update Checkstyle to 10.10.0. (markt)
+  
 
   
 


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



[tomcat] branch 9.0.x updated: Update Checkstyle to 10.10.0

2023-05-02 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 090e18d31d Update Checkstyle to 10.10.0
090e18d31d is described below

commit 090e18d31d3c89c520dcaf13b84881610a83a463
Author: Mark Thomas 
AuthorDate: Tue May 2 15:25:31 2023 +0100

Update Checkstyle to 10.10.0
---
 build.properties.default   | 4 ++--
 webapps/docs/changelog.xml | 3 +++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/build.properties.default b/build.properties.default
index 109d3435bf..fbd8226bec 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -276,10 +276,10 @@ 
unboundid.jar=${unboundid.home}/unboundid-ldapsdk-${unboundid.version}.jar
 
unboundid.loc=${base-maven.loc}/com/unboundid/unboundid-ldapsdk/${unboundid.version}/unboundid-ldapsdk-${unboundid.version}.jar
 
 # - Checkstyle, version 6.16 or later -
-checkstyle.version=10.9.3
+checkstyle.version=10.10.0
 checkstyle.checksum.enabled=true
 checkstyle.checksum.algorithm=SHA-512
-checkstyle.checksum.value=57443ea697a02630cea080e78296545586ce2fa40c72d4d5e3d24c511287fc5d460e274ef49a6c0fc386682df248c4306a232b5f13d844c2ef4d1613d5b37e92
+checkstyle.checksum.value=2209acae15d3665daf63a540aa2f28db82180393c26a89741e334112d1151ad76d0e33d2881a6d0ebd4b0aba889b4f78d17b0d851d16fc7d4b758166f7375df5
 checkstyle.home=${base.path}/checkstyle-${checkstyle.version}
 checkstyle.jar=${checkstyle.home}/checkstyle-${checkstyle.version}-all.jar
 
checkstyle.loc=${base-gh.loc}/checkstyle/checkstyle/releases/download/checkstyle-${checkstyle.version}/checkstyle-${checkstyle.version}-all.jar
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 908260fc13..e3380bad49 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -183,6 +183,9 @@
   
 Improvements to Chinese translations. (lihan)
   
+  
+Update Checkstyle to 10.10.0. (markt)
+  
 
   
 


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



[tomcat] branch 8.5.x updated: Update Checkstyle to 10.10.0

2023-05-02 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 daec0b0e88 Update Checkstyle to 10.10.0
daec0b0e88 is described below

commit daec0b0e88ff416fb907f32e21e3d7fa5d13cdb9
Author: Mark Thomas 
AuthorDate: Tue May 2 15:25:31 2023 +0100

Update Checkstyle to 10.10.0
---
 build.properties.default   | 4 ++--
 webapps/docs/changelog.xml | 3 +++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/build.properties.default b/build.properties.default
index edfd86ec70..f9f2f862e0 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -280,10 +280,10 @@ 
unboundid.jar=${unboundid.home}/unboundid-ldapsdk-${unboundid.version}.jar
 
unboundid.loc=${base-maven.loc}/com/unboundid/unboundid-ldapsdk/${unboundid.version}/unboundid-ldapsdk-${unboundid.version}.jar
 
 # - Checkstyle, version 6.16 or later -
-checkstyle.version=10.9.3
+checkstyle.version=10.10.0
 checkstyle.checksum.enabled=true
 checkstyle.checksum.algorithm=SHA-512
-checkstyle.checksum.value=57443ea697a02630cea080e78296545586ce2fa40c72d4d5e3d24c511287fc5d460e274ef49a6c0fc386682df248c4306a232b5f13d844c2ef4d1613d5b37e92
+checkstyle.checksum.value=2209acae15d3665daf63a540aa2f28db82180393c26a89741e334112d1151ad76d0e33d2881a6d0ebd4b0aba889b4f78d17b0d851d16fc7d4b758166f7375df5
 checkstyle.home=${base.path}/checkstyle-${checkstyle.version}
 checkstyle.jar=${checkstyle.home}/checkstyle-${checkstyle.version}-all.jar
 
checkstyle.loc=${base-gh.loc}/checkstyle/checkstyle/releases/download/checkstyle-${checkstyle.version}/checkstyle-${checkstyle.version}-all.jar
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 6f989bdd51..bf06678da0 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -195,6 +195,9 @@
   
 Improvements to Chinese translations. (lihan)
   
+  
+Update Checkstyle to 10.10.0. (markt)
+  
 
   
 


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



[tomcat] branch main updated (94017ec142 -> ca6613341f)

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

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


from 94017ec142 Update Checkstyle to 10.10.0
 new 3d9a7efad2 Update Jacoco to 0.8.10
 new ca6613341f Update migration tool to 1.0.7

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 build.properties.default   | 10 +-
 webapps/docs/changelog.xml |  7 +++
 2 files changed, 12 insertions(+), 5 deletions(-)


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



[tomcat] 01/02: Update Jacoco to 0.8.10

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

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

commit 3d9a7efad216409f3925f6f10b8560f5ee4e6847
Author: Mark Thomas 
AuthorDate: Tue May 2 15:27:48 2023 +0100

Update Jacoco to 0.8.10
---
 build.properties.default   | 4 ++--
 webapps/docs/changelog.xml | 3 +++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/build.properties.default b/build.properties.default
index e3f9882ffe..78384e4675 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -262,10 +262,10 @@ 
checkstyle.jar=${checkstyle.home}/checkstyle-${checkstyle.version}-all.jar
 
checkstyle.loc=${base-gh.loc}/checkstyle/checkstyle/releases/download/checkstyle-${checkstyle.version}/checkstyle-${checkstyle.version}-all.jar
 
 # - JaCoCo code coverage tool -
-jacoco.version=0.8.9
+jacoco.version=0.8.10
 jacoco.checksum.enabled=true
 jacoco.checksum.algorithm=MD5|SHA-1
-jacoco.checksum.value=a158dfd8d88760ee615854fb27ad3a88|2f29cf6431a011f538c768e56a0b358a9f00f52d
+jacoco.checksum.value=6e4816291718ec3274bfd0e786575ca9|0a31758a1b4030084f1c78e0eea1e390fec80265
 jacoco.home=${base.path}/jacoco-${jacoco.version}
 jacoco.jar=${jacoco.home}/lib/jacocoant.jar
 
jacoco.loc=${base-maven.loc}/org/jacoco/jacoco/${jacoco.version}/jacoco-${jacoco.version}.zip
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index c9a7f73fc8..5fb4e20d34 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -186,6 +186,9 @@
   
 Update Checkstyle to 10.10.0. (markt)
   
+  
+Update Jacoco to 0.8.10. (markt)
+  
 
   
 


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



[tomcat] 02/02: Update migration tool to 1.0.7

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

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

commit ca6613341fc5fda211ba0eefe9af9a497890846a
Author: Mark Thomas 
AuthorDate: Tue May 2 15:30:10 2023 +0100

Update migration tool to 1.0.7
---
 build.properties.default   | 6 +++---
 webapps/docs/changelog.xml | 4 
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/build.properties.default b/build.properties.default
index 78384e4675..c681c142fd 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -293,12 +293,12 @@ bnd.jar=${bnd.home}/biz.aQute.bnd-${bnd.version}.jar
 
bnd.loc=${base-maven.loc}/biz/aQute/bnd/biz.aQute.bnd/${bnd.version}/biz.aQute.bnd-${bnd.version}.jar
 
 # - Tomcat Migration Tool for Jakarta EE -
-migration-lib.version=1.0.6
+migration-lib.version=1.0.7
 
-# checksums for jakartaee-migration-1.0.6-shaded.jar
+# checksums for jakartaee-migration-1.0.7-shaded.jar
 migration-lib.checksum.enabled=true
 migration-lib.checksum.algorithm=MD5|SHA-1
-migration-lib.checksum.value=26a9088a708d81604bcd41d867297fe2|db0fe38cdf2856f709a0c5a85f97d3e9e47f3716
+migration-lib.checksum.value=378eeda7171284210688349f31e60e73|2baf7f729b409b47467c2ea998216441bf1c33cc
 
 migration-lib.home=${base.path}/migration-${migration-lib.version}
 
migration-lib.jar=${migration-lib.home}/jakartaee-migration-${migration-lib.version}-shaded.jar
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 5fb4e20d34..8c010a0cd6 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -189,6 +189,10 @@
   
 Update Jacoco to 0.8.10. (markt)
   
+  
+Update the packaged version of the Tomcat Migration Tool for Jakarta EE
+to 1.0.7. (markt)
+  
 
   
 


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



[tomcat] branch 10.1.x updated: Update Jacoco to 0.8.10

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

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


The following commit(s) were added to refs/heads/10.1.x by this push:
 new ff04d40f63 Update Jacoco to 0.8.10
ff04d40f63 is described below

commit ff04d40f6324e11deef1b5da5880a4d8c5f416e3
Author: Mark Thomas 
AuthorDate: Tue May 2 15:27:48 2023 +0100

Update Jacoco to 0.8.10
---
 build.properties.default   | 4 ++--
 webapps/docs/changelog.xml | 3 +++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/build.properties.default b/build.properties.default
index d88c69d3a9..d86608eadb 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -280,10 +280,10 @@ 
checkstyle.jar=${checkstyle.home}/checkstyle-${checkstyle.version}-all.jar
 
checkstyle.loc=${base-gh.loc}/checkstyle/checkstyle/releases/download/checkstyle-${checkstyle.version}/checkstyle-${checkstyle.version}-all.jar
 
 # - JaCoCo code coverage tool -
-jacoco.version=0.8.9
+jacoco.version=0.8.10
 jacoco.checksum.enabled=true
 jacoco.checksum.algorithm=MD5|SHA-1
-jacoco.checksum.value=a158dfd8d88760ee615854fb27ad3a88|2f29cf6431a011f538c768e56a0b358a9f00f52d
+jacoco.checksum.value=6e4816291718ec3274bfd0e786575ca9|0a31758a1b4030084f1c78e0eea1e390fec80265
 jacoco.home=${base.path}/jacoco-${jacoco.version}
 jacoco.jar=${jacoco.home}/lib/jacocoant.jar
 
jacoco.loc=${base-maven.loc}/org/jacoco/jacoco/${jacoco.version}/jacoco-${jacoco.version}.zip
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 90d69f1a0a..ab668c7417 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -186,6 +186,9 @@
   
 Update Checkstyle to 10.10.0. (markt)
   
+  
+Update Jacoco to 0.8.10. (markt)
+  
 
   
 


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



[tomcat] branch 9.0.x updated: Update Jacoco to 0.8.10

2023-05-02 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 ccbe451274 Update Jacoco to 0.8.10
ccbe451274 is described below

commit ccbe4512740b1e84b3e6c68386b38a1ec9a927a5
Author: Mark Thomas 
AuthorDate: Tue May 2 15:27:48 2023 +0100

Update Jacoco to 0.8.10
---
 build.properties.default   | 4 ++--
 webapps/docs/changelog.xml | 3 +++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/build.properties.default b/build.properties.default
index fbd8226bec..7481ed15ae 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -285,10 +285,10 @@ 
checkstyle.jar=${checkstyle.home}/checkstyle-${checkstyle.version}-all.jar
 
checkstyle.loc=${base-gh.loc}/checkstyle/checkstyle/releases/download/checkstyle-${checkstyle.version}/checkstyle-${checkstyle.version}-all.jar
 
 # - JaCoCo code coverage tool -
-jacoco.version=0.8.9
+jacoco.version=0.8.10
 jacoco.checksum.enabled=true
 jacoco.checksum.algorithm=MD5|SHA-1
-jacoco.checksum.value=a158dfd8d88760ee615854fb27ad3a88|2f29cf6431a011f538c768e56a0b358a9f00f52d
+jacoco.checksum.value=6e4816291718ec3274bfd0e786575ca9|0a31758a1b4030084f1c78e0eea1e390fec80265
 jacoco.home=${base.path}/jacoco-${jacoco.version}
 jacoco.jar=${jacoco.home}/lib/jacocoant.jar
 
jacoco.loc=${base-maven.loc}/org/jacoco/jacoco/${jacoco.version}/jacoco-${jacoco.version}.zip
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index e3380bad49..68dfdb3651 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -186,6 +186,9 @@
   
 Update Checkstyle to 10.10.0. (markt)
   
+  
+Update Jacoco to 0.8.10. (markt)
+  
 
   
 


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



[tomcat] branch 8.5.x updated: Update Jacoco to 0.8.10

2023-05-02 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 4e61825503 Update Jacoco to 0.8.10
4e61825503 is described below

commit 4e618255036c21e40764432a64ca37bcfa8e5e1d
Author: Mark Thomas 
AuthorDate: Tue May 2 15:27:48 2023 +0100

Update Jacoco to 0.8.10
---
 build.properties.default   | 4 ++--
 webapps/docs/changelog.xml | 3 +++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/build.properties.default b/build.properties.default
index f9f2f862e0..e80d877faf 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -289,10 +289,10 @@ 
checkstyle.jar=${checkstyle.home}/checkstyle-${checkstyle.version}-all.jar
 
checkstyle.loc=${base-gh.loc}/checkstyle/checkstyle/releases/download/checkstyle-${checkstyle.version}/checkstyle-${checkstyle.version}-all.jar
 
 # - JaCoCo code coverage tool -
-jacoco.version=0.8.9
+jacoco.version=0.8.10
 jacoco.checksum.enabled=true
 jacoco.checksum.algorithm=MD5|SHA-1
-jacoco.checksum.value=a158dfd8d88760ee615854fb27ad3a88|2f29cf6431a011f538c768e56a0b358a9f00f52d
+jacoco.checksum.value=6e4816291718ec3274bfd0e786575ca9|0a31758a1b4030084f1c78e0eea1e390fec80265
 jacoco.home=${base.path}/jacoco-${jacoco.version}
 jacoco.jar=${jacoco.home}/lib/jacocoant.jar
 
jacoco.loc=${base-maven.loc}/org/jacoco/jacoco/${jacoco.version}/jacoco-${jacoco.version}.zip
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index bf06678da0..10c8c924cc 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -198,6 +198,9 @@
   
 Update Checkstyle to 10.10.0. (markt)
   
+  
+Update Jacoco to 0.8.10. (markt)
+  
 
   
 


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



[tomcat] branch 10.1.x updated: Update migration tool to 1.0.7

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

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


The following commit(s) were added to refs/heads/10.1.x by this push:
 new fc2bbd4f38 Update migration tool to 1.0.7
fc2bbd4f38 is described below

commit fc2bbd4f38067494767142788041454355e43fbb
Author: Mark Thomas 
AuthorDate: Tue May 2 15:30:10 2023 +0100

Update migration tool to 1.0.7
---
 build.properties.default   | 6 +++---
 webapps/docs/changelog.xml | 4 
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/build.properties.default b/build.properties.default
index d86608eadb..3e9cb5d31f 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -311,12 +311,12 @@ bnd.jar=${bnd.home}/biz.aQute.bnd-${bnd.version}.jar
 
bnd.loc=${base-maven.loc}/biz/aQute/bnd/biz.aQute.bnd/${bnd.version}/biz.aQute.bnd-${bnd.version}.jar
 
 # - Tomcat Migration Tool for Jakarta EE -
-migration-lib.version=1.0.6
+migration-lib.version=1.0.7
 
-# checksums for jakartaee-migration-1.0.6-shaded.jar
+# checksums for jakartaee-migration-1.0.7-shaded.jar
 migration-lib.checksum.enabled=true
 migration-lib.checksum.algorithm=MD5|SHA-1
-migration-lib.checksum.value=26a9088a708d81604bcd41d867297fe2|db0fe38cdf2856f709a0c5a85f97d3e9e47f3716
+migration-lib.checksum.value=378eeda7171284210688349f31e60e73|2baf7f729b409b47467c2ea998216441bf1c33cc
 
 migration-lib.home=${base.path}/migration-${migration-lib.version}
 
migration-lib.jar=${migration-lib.home}/jakartaee-migration-${migration-lib.version}-shaded.jar
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index ab668c7417..d4621cb4be 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -189,6 +189,10 @@
   
 Update Jacoco to 0.8.10. (markt)
   
+  
+Update the packaged version of the Tomcat Migration Tool for Jakarta EE
+to 1.0.7. (markt)
+  
 
   
 


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



Buildbot failure in on tomcat-10.1.x

2023-05-02 Thread buildbot
Build status: BUILD FAILED: failed compile (failure)
Worker used: bb_worker2_ubuntu
URL: https://ci2.apache.org/#builders/44/builds/776
Blamelist: Mark Thomas 
Build Text: failed compile (failure)
Status Detected: new failure
Build Source Stamp: [branch 10.1.x] b2a59829182d62a70b7d7b80d14af9952dcdcd94


Steps:

  worker_preparation: 0

  git: 0

  shell: 0

  shell_1: 0

  shell_2: 0

  shell_3: 0

  shell_4: 0

  shell_5: 0

  compile: 1

  shell_6: 0

  shell_7: 0

  shell_8: 0

  shell_9: 0

  Rsync docs to nightlies.apache.org: 0

  shell_10: 0

  Rsync RAT to nightlies.apache.org: 0

  compile_1: 2

  shell_11: 0

  Rsync Logs to nightlies.apache.org: 0


-- ASF Buildbot


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



[tomcat] branch 10.1.x updated: Zero length HTTP header names are not valid (not valid tokens)

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

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


The following commit(s) were added to refs/heads/10.1.x by this push:
 new e239c5dbb0 Zero length HTTP header names are not valid (not valid 
tokens)
e239c5dbb0 is described below

commit e239c5dbb07e70d1d6298e6f066b4f69d6df39df
Author: Mark Thomas 
AuthorDate: Tue May 2 16:47:25 2023 +0100

Zero length HTTP header names are not valid (not valid tokens)
---
 .../apache/coyote/http11/Http11InputBuffer.java| 18 ++---
 .../apache/coyote/http11/LocalStrings.properties   |  1 +
 .../coyote/http11/TestHttp11InputBuffer.java   | 44 ++
 webapps/docs/changelog.xml |  4 ++
 4 files changed, 61 insertions(+), 6 deletions(-)

diff --git a/java/org/apache/coyote/http11/Http11InputBuffer.java 
b/java/org/apache/coyote/http11/Http11InputBuffer.java
index e338ef653a..e6b1595803 100644
--- a/java/org/apache/coyote/http11/Http11InputBuffer.java
+++ b/java/org/apache/coyote/http11/Http11InputBuffer.java
@@ -50,8 +50,8 @@ public class Http11InputBuffer implements InputBuffer, 
ApplicationBufferHandler
 private static final StringManager sm = 
StringManager.getManager(Http11InputBuffer.class);
 
 
-private static final byte[] CLIENT_PREFACE_START = "PRI * 
HTTP/2.0\r\n\r\nSM\r\n\r\n"
-.getBytes(StandardCharsets.ISO_8859_1);
+private static final byte[] CLIENT_PREFACE_START =
+"PRI * 
HTTP/2.0\r\n\r\nSM\r\n\r\n".getBytes(StandardCharsets.ISO_8859_1);
 
 /**
  * Associated Coyote request.
@@ -883,6 +883,11 @@ public class Http11InputBuffer implements InputBuffer, 
ApplicationBufferHandler
 int pos = byteBuffer.position();
 chr = byteBuffer.get();
 if (chr == Constants.COLON) {
+if (headerData.start == pos) {
+// Zero length header name - not valid.
+// skipLine() will handle the error
+return skipLine(false);
+}
 headerParsePos = HeaderParsePosition.HEADER_VALUE_START;
 headerData.headerValue = headers.addValue(byteBuffer.array(), 
headerData.start, pos - headerData.start);
 pos = byteBuffer.position();
@@ -1064,12 +1069,13 @@ public class Http11InputBuffer implements InputBuffer, 
ApplicationBufferHandler
 }
 }
 if (rejectThisHeader || log.isDebugEnabled()) {
-String message = sm.getString("iib.invalidheader", 
HeaderUtil.toPrintableString(byteBuffer.array(),
-headerData.lineStart, headerData.lastSignificantChar - 
headerData.lineStart + 1));
 if (rejectThisHeader) {
-throw new IllegalArgumentException(message);
+throw new IllegalArgumentException(
+sm.getString("iib.invalidheader.reject", 
HeaderUtil.toPrintableString(byteBuffer.array(),
+headerData.lineStart, 
headerData.lastSignificantChar - headerData.lineStart + 1)));
 }
-log.debug(message);
+log.debug(sm.getString("iib.invalidheader", 
HeaderUtil.toPrintableString(byteBuffer.array(),
+headerData.lineStart, headerData.lastSignificantChar - 
headerData.lineStart + 1)));
 }
 
 headerParsePos = HeaderParsePosition.HEADER_START;
diff --git a/java/org/apache/coyote/http11/LocalStrings.properties 
b/java/org/apache/coyote/http11/LocalStrings.properties
index 3e49897b51..9e4d2ec86a 100644
--- a/java/org/apache/coyote/http11/LocalStrings.properties
+++ b/java/org/apache/coyote/http11/LocalStrings.properties
@@ -47,6 +47,7 @@ iib.invalidHttpProtocol=Invalid character found in the HTTP 
protocol [{0}]
 iib.invalidPhase=Invalid request line parse phase [{0}]
 iib.invalidRequestTarget=Invalid character found in the request target [{0}]. 
The valid characters are defined in RFC 7230 and RFC 3986
 iib.invalidheader=The HTTP header line [{0}] does not conform to RFC 7230 and 
has been ignored.
+iib.invalidheader.reject=The HTTP header line [{0}] does not conform to RFC 
7230. The request has been rejected.
 iib.invalidmethod=Invalid character found in method name [{0}]. HTTP method 
names must be tokens
 iib.parseheaders.ise.error=Unexpected state: headers already parsed. Buffer 
not recycled?
 iib.readtimeout=Timeout attempting to read data from the socket
diff --git a/test/org/apache/coyote/http11/TestHttp11InputBuffer.java 
b/test/org/apache/coyote/http11/TestHttp11InputBuffer.java
index 40276619de..95fefd82dd 100644
--- a/test/org/apache/coyote/http11/TestHttp11InputBuffer.java
+++ b/test/org/apache/coyote/http11/TestHttp11InputBuffer.java
@@ -732,4 +732,48 @@ public class TestHttp11InputBuffer extends TomcatBaseTest {
 return true;
 }
 }
+
+
+private static final class Client exten

[tomcat] branch main updated: Zero length HTTP header names are not valid (not valid tokens)

2023-05-02 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 ed6d4ccd59 Zero length HTTP header names are not valid (not valid 
tokens)
ed6d4ccd59 is described below

commit ed6d4ccd59ec2e1c99bf0d3533219292f2107fde
Author: Mark Thomas 
AuthorDate: Tue May 2 16:47:25 2023 +0100

Zero length HTTP header names are not valid (not valid tokens)
---
 .../apache/coyote/http11/Http11InputBuffer.java| 18 ++---
 .../apache/coyote/http11/LocalStrings.properties   |  1 +
 .../coyote/http11/TestHttp11InputBuffer.java   | 44 ++
 webapps/docs/changelog.xml |  4 ++
 4 files changed, 61 insertions(+), 6 deletions(-)

diff --git a/java/org/apache/coyote/http11/Http11InputBuffer.java 
b/java/org/apache/coyote/http11/Http11InputBuffer.java
index e338ef653a..e6b1595803 100644
--- a/java/org/apache/coyote/http11/Http11InputBuffer.java
+++ b/java/org/apache/coyote/http11/Http11InputBuffer.java
@@ -50,8 +50,8 @@ public class Http11InputBuffer implements InputBuffer, 
ApplicationBufferHandler
 private static final StringManager sm = 
StringManager.getManager(Http11InputBuffer.class);
 
 
-private static final byte[] CLIENT_PREFACE_START = "PRI * 
HTTP/2.0\r\n\r\nSM\r\n\r\n"
-.getBytes(StandardCharsets.ISO_8859_1);
+private static final byte[] CLIENT_PREFACE_START =
+"PRI * 
HTTP/2.0\r\n\r\nSM\r\n\r\n".getBytes(StandardCharsets.ISO_8859_1);
 
 /**
  * Associated Coyote request.
@@ -883,6 +883,11 @@ public class Http11InputBuffer implements InputBuffer, 
ApplicationBufferHandler
 int pos = byteBuffer.position();
 chr = byteBuffer.get();
 if (chr == Constants.COLON) {
+if (headerData.start == pos) {
+// Zero length header name - not valid.
+// skipLine() will handle the error
+return skipLine(false);
+}
 headerParsePos = HeaderParsePosition.HEADER_VALUE_START;
 headerData.headerValue = headers.addValue(byteBuffer.array(), 
headerData.start, pos - headerData.start);
 pos = byteBuffer.position();
@@ -1064,12 +1069,13 @@ public class Http11InputBuffer implements InputBuffer, 
ApplicationBufferHandler
 }
 }
 if (rejectThisHeader || log.isDebugEnabled()) {
-String message = sm.getString("iib.invalidheader", 
HeaderUtil.toPrintableString(byteBuffer.array(),
-headerData.lineStart, headerData.lastSignificantChar - 
headerData.lineStart + 1));
 if (rejectThisHeader) {
-throw new IllegalArgumentException(message);
+throw new IllegalArgumentException(
+sm.getString("iib.invalidheader.reject", 
HeaderUtil.toPrintableString(byteBuffer.array(),
+headerData.lineStart, 
headerData.lastSignificantChar - headerData.lineStart + 1)));
 }
-log.debug(message);
+log.debug(sm.getString("iib.invalidheader", 
HeaderUtil.toPrintableString(byteBuffer.array(),
+headerData.lineStart, headerData.lastSignificantChar - 
headerData.lineStart + 1)));
 }
 
 headerParsePos = HeaderParsePosition.HEADER_START;
diff --git a/java/org/apache/coyote/http11/LocalStrings.properties 
b/java/org/apache/coyote/http11/LocalStrings.properties
index 3e49897b51..9e4d2ec86a 100644
--- a/java/org/apache/coyote/http11/LocalStrings.properties
+++ b/java/org/apache/coyote/http11/LocalStrings.properties
@@ -47,6 +47,7 @@ iib.invalidHttpProtocol=Invalid character found in the HTTP 
protocol [{0}]
 iib.invalidPhase=Invalid request line parse phase [{0}]
 iib.invalidRequestTarget=Invalid character found in the request target [{0}]. 
The valid characters are defined in RFC 7230 and RFC 3986
 iib.invalidheader=The HTTP header line [{0}] does not conform to RFC 7230 and 
has been ignored.
+iib.invalidheader.reject=The HTTP header line [{0}] does not conform to RFC 
7230. The request has been rejected.
 iib.invalidmethod=Invalid character found in method name [{0}]. HTTP method 
names must be tokens
 iib.parseheaders.ise.error=Unexpected state: headers already parsed. Buffer 
not recycled?
 iib.readtimeout=Timeout attempting to read data from the socket
diff --git a/test/org/apache/coyote/http11/TestHttp11InputBuffer.java 
b/test/org/apache/coyote/http11/TestHttp11InputBuffer.java
index 40276619de..95fefd82dd 100644
--- a/test/org/apache/coyote/http11/TestHttp11InputBuffer.java
+++ b/test/org/apache/coyote/http11/TestHttp11InputBuffer.java
@@ -732,4 +732,48 @@ public class TestHttp11InputBuffer extends TomcatBaseTest {
 return true;
 }
 }
+
+
+private static final class Client extends S

[tomcat] branch 9.0.x updated: Zero length HTTP header names are not valid (not valid tokens)

2023-05-02 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 327c0d7747 Zero length HTTP header names are not valid (not valid 
tokens)
327c0d7747 is described below

commit 327c0d77470e40ede3853fb452a78b4144258c19
Author: Mark Thomas 
AuthorDate: Tue May 2 16:47:25 2023 +0100

Zero length HTTP header names are not valid (not valid tokens)
---
 .../apache/coyote/http11/Http11InputBuffer.java| 18 ++---
 .../apache/coyote/http11/LocalStrings.properties   |  1 +
 .../coyote/http11/TestHttp11InputBuffer.java   | 44 ++
 webapps/docs/changelog.xml |  4 ++
 4 files changed, 61 insertions(+), 6 deletions(-)

diff --git a/java/org/apache/coyote/http11/Http11InputBuffer.java 
b/java/org/apache/coyote/http11/Http11InputBuffer.java
index 3c784e7540..b7517459fd 100644
--- a/java/org/apache/coyote/http11/Http11InputBuffer.java
+++ b/java/org/apache/coyote/http11/Http11InputBuffer.java
@@ -50,8 +50,8 @@ public class Http11InputBuffer implements InputBuffer, 
ApplicationBufferHandler
 private static final StringManager sm = 
StringManager.getManager(Http11InputBuffer.class);
 
 
-private static final byte[] CLIENT_PREFACE_START = "PRI * 
HTTP/2.0\r\n\r\nSM\r\n\r\n"
-.getBytes(StandardCharsets.ISO_8859_1);
+private static final byte[] CLIENT_PREFACE_START =
+"PRI * 
HTTP/2.0\r\n\r\nSM\r\n\r\n".getBytes(StandardCharsets.ISO_8859_1);
 
 /**
  * Associated Coyote request.
@@ -883,6 +883,11 @@ public class Http11InputBuffer implements InputBuffer, 
ApplicationBufferHandler
 int pos = byteBuffer.position();
 chr = byteBuffer.get();
 if (chr == Constants.COLON) {
+if (headerData.start == pos) {
+// Zero length header name - not valid.
+// skipLine() will handle the error
+return skipLine(false);
+}
 headerParsePos = HeaderParsePosition.HEADER_VALUE_START;
 headerData.headerValue = headers.addValue(byteBuffer.array(), 
headerData.start, pos - headerData.start);
 pos = byteBuffer.position();
@@ -1064,12 +1069,13 @@ public class Http11InputBuffer implements InputBuffer, 
ApplicationBufferHandler
 }
 }
 if (rejectThisHeader || log.isDebugEnabled()) {
-String message = sm.getString("iib.invalidheader", 
HeaderUtil.toPrintableString(byteBuffer.array(),
-headerData.lineStart, headerData.lastSignificantChar - 
headerData.lineStart + 1));
 if (rejectThisHeader) {
-throw new IllegalArgumentException(message);
+throw new IllegalArgumentException(
+sm.getString("iib.invalidheader.reject", 
HeaderUtil.toPrintableString(byteBuffer.array(),
+headerData.lineStart, 
headerData.lastSignificantChar - headerData.lineStart + 1)));
 }
-log.debug(message);
+log.debug(sm.getString("iib.invalidheader", 
HeaderUtil.toPrintableString(byteBuffer.array(),
+headerData.lineStart, headerData.lastSignificantChar - 
headerData.lineStart + 1)));
 }
 
 headerParsePos = HeaderParsePosition.HEADER_START;
diff --git a/java/org/apache/coyote/http11/LocalStrings.properties 
b/java/org/apache/coyote/http11/LocalStrings.properties
index 3e49897b51..9e4d2ec86a 100644
--- a/java/org/apache/coyote/http11/LocalStrings.properties
+++ b/java/org/apache/coyote/http11/LocalStrings.properties
@@ -47,6 +47,7 @@ iib.invalidHttpProtocol=Invalid character found in the HTTP 
protocol [{0}]
 iib.invalidPhase=Invalid request line parse phase [{0}]
 iib.invalidRequestTarget=Invalid character found in the request target [{0}]. 
The valid characters are defined in RFC 7230 and RFC 3986
 iib.invalidheader=The HTTP header line [{0}] does not conform to RFC 7230 and 
has been ignored.
+iib.invalidheader.reject=The HTTP header line [{0}] does not conform to RFC 
7230. The request has been rejected.
 iib.invalidmethod=Invalid character found in method name [{0}]. HTTP method 
names must be tokens
 iib.parseheaders.ise.error=Unexpected state: headers already parsed. Buffer 
not recycled?
 iib.readtimeout=Timeout attempting to read data from the socket
diff --git a/test/org/apache/coyote/http11/TestHttp11InputBuffer.java 
b/test/org/apache/coyote/http11/TestHttp11InputBuffer.java
index 564e5001d5..1c5c985c63 100644
--- a/test/org/apache/coyote/http11/TestHttp11InputBuffer.java
+++ b/test/org/apache/coyote/http11/TestHttp11InputBuffer.java
@@ -732,4 +732,48 @@ public class TestHttp11InputBuffer extends TomcatBaseTest {
 return true;
 }
 }
+
+
+private static final class Client extends

[tomcat] branch 8.5.x updated: Zero length HTTP header names are not valid (not valid tokens)

2023-05-02 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 3f379d417e Zero length HTTP header names are not valid (not valid 
tokens)
3f379d417e is described below

commit 3f379d417ebba69af1f3f48df52e64a2a6f5e283
Author: Mark Thomas 
AuthorDate: Tue May 2 16:47:25 2023 +0100

Zero length HTTP header names are not valid (not valid tokens)
---
 .../apache/coyote/http11/Http11InputBuffer.java| 18 ++---
 .../apache/coyote/http11/LocalStrings.properties   |  1 +
 .../coyote/http11/TestHttp11InputBuffer.java   | 44 ++
 webapps/docs/changelog.xml |  4 ++
 4 files changed, 61 insertions(+), 6 deletions(-)

diff --git a/java/org/apache/coyote/http11/Http11InputBuffer.java 
b/java/org/apache/coyote/http11/Http11InputBuffer.java
index bb8945fc8e..87799b7d6c 100644
--- a/java/org/apache/coyote/http11/Http11InputBuffer.java
+++ b/java/org/apache/coyote/http11/Http11InputBuffer.java
@@ -50,8 +50,8 @@ public class Http11InputBuffer implements InputBuffer, 
ApplicationBufferHandler
 private static final StringManager sm = 
StringManager.getManager(Http11InputBuffer.class);
 
 
-private static final byte[] CLIENT_PREFACE_START = "PRI * 
HTTP/2.0\r\n\r\nSM\r\n\r\n"
-.getBytes(StandardCharsets.ISO_8859_1);
+private static final byte[] CLIENT_PREFACE_START =
+"PRI * 
HTTP/2.0\r\n\r\nSM\r\n\r\n".getBytes(StandardCharsets.ISO_8859_1);
 
 /**
  * Associated Coyote request.
@@ -883,6 +883,11 @@ public class Http11InputBuffer implements InputBuffer, 
ApplicationBufferHandler
 int pos = byteBuffer.position();
 chr = byteBuffer.get();
 if (chr == Constants.COLON) {
+if (headerData.start == pos) {
+// Zero length header name - not valid.
+// skipLine() will handle the error
+return skipLine(false);
+}
 headerParsePos = HeaderParsePosition.HEADER_VALUE_START;
 headerData.headerValue = headers.addValue(byteBuffer.array(), 
headerData.start, pos - headerData.start);
 pos = byteBuffer.position();
@@ -1064,12 +1069,13 @@ public class Http11InputBuffer implements InputBuffer, 
ApplicationBufferHandler
 }
 }
 if (rejectThisHeader || log.isDebugEnabled()) {
-String message = sm.getString("iib.invalidheader", 
HeaderUtil.toPrintableString(byteBuffer.array(),
-headerData.lineStart, headerData.lastSignificantChar - 
headerData.lineStart + 1));
 if (rejectThisHeader) {
-throw new IllegalArgumentException(message);
+throw new IllegalArgumentException(
+sm.getString("iib.invalidheader.reject", 
HeaderUtil.toPrintableString(byteBuffer.array(),
+headerData.lineStart, 
headerData.lastSignificantChar - headerData.lineStart + 1)));
 }
-log.debug(message);
+log.debug(sm.getString("iib.invalidheader", 
HeaderUtil.toPrintableString(byteBuffer.array(),
+headerData.lineStart, headerData.lastSignificantChar - 
headerData.lineStart + 1)));
 }
 
 headerParsePos = HeaderParsePosition.HEADER_START;
diff --git a/java/org/apache/coyote/http11/LocalStrings.properties 
b/java/org/apache/coyote/http11/LocalStrings.properties
index 7af34c2d1d..9be53d2d77 100644
--- a/java/org/apache/coyote/http11/LocalStrings.properties
+++ b/java/org/apache/coyote/http11/LocalStrings.properties
@@ -49,6 +49,7 @@ iib.invalidHttpProtocol=Invalid character found in the HTTP 
protocol [{0}]
 iib.invalidPhase=Invalid request line parse phase [{0}]
 iib.invalidRequestTarget=Invalid character found in the request target [{0}]. 
The valid characters are defined in RFC 7230 and RFC 3986
 iib.invalidheader=The HTTP header line [{0}] does not conform to RFC 7230 and 
has been ignored.
+iib.invalidheader.reject=The HTTP header line [{0}] does not conform to RFC 
7230. The request has been rejected.
 iib.invalidmethod=Invalid character found in method name [{0}]. HTTP method 
names must be tokens
 iib.parseheaders.ise.error=Unexpected state: headers already parsed. Buffer 
not recycled?
 iib.readtimeout=Timeout attempting to read data from the socket
diff --git a/test/org/apache/coyote/http11/TestHttp11InputBuffer.java 
b/test/org/apache/coyote/http11/TestHttp11InputBuffer.java
index 104f2b4724..186bd0db0a 100644
--- a/test/org/apache/coyote/http11/TestHttp11InputBuffer.java
+++ b/test/org/apache/coyote/http11/TestHttp11InputBuffer.java
@@ -733,4 +733,48 @@ public class TestHttp11InputBuffer extends TomcatBaseTest {
 return true;
 }
 }
+
+
+private static final class Client extends

[tomcat] branch main updated: Deprecate allowHostHeaderMismatch and rejectIllegalHeader

2023-05-02 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 7f9b449196 Deprecate allowHostHeaderMismatch and rejectIllegalHeader
7f9b449196 is described below

commit 7f9b449196f5be579127c179e0cc474179c8bd46
Author: Mark Thomas 
AuthorDate: Tue May 2 17:15:21 2023 +0100

Deprecate allowHostHeaderMismatch and rejectIllegalHeader
---
 .../coyote/http11/AbstractHttp11Protocol.java  | 26 +-
 webapps/docs/config/http.xml   | 10 +++--
 2 files changed, 29 insertions(+), 7 deletions(-)

diff --git a/java/org/apache/coyote/http11/AbstractHttp11Protocol.java 
b/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
index 9ffaeb0c93..e31fbb25a2 100644
--- a/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
+++ b/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
@@ -60,7 +60,7 @@ public abstract class AbstractHttp11Protocol extends 
AbstractProtocol {
 private final CompressionConfig compressionConfig = new 
CompressionConfig();
 
 
-public AbstractHttp11Protocol(AbstractEndpoint endpoint) {
+public AbstractHttp11Protocol(AbstractEndpoint endpoint) {
 super(endpoint);
 setConnectionTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
 }
@@ -116,7 +116,7 @@ public abstract class AbstractHttp11Protocol extends 
AbstractProtocol {
  * Over-ridden here to make the method visible to nested classes.
  */
 @Override
-protected AbstractEndpoint getEndpoint() {
+protected AbstractEndpoint getEndpoint() {
 return super.getEndpoint();
 }
 
@@ -179,7 +179,11 @@ public abstract class AbstractHttp11Protocol extends 
AbstractProtocol {
  * the request line?
  *
  * @return {@code true} if Tomcat will allow such requests, otherwise 
{@code false}
+ *
+ * @deprecated This will removed in Tomcat 11 onwards where {@code 
allowHostHeaderMismatch} will be hard-coded to
+ * {@code false}.
  */
+@Deprecated
 public boolean getAllowHostHeaderMismatch() {
 return allowHostHeaderMismatch;
 }
@@ -189,7 +193,11 @@ public abstract class AbstractHttp11Protocol extends 
AbstractProtocol {
  * the request line?
  *
  * @param allowHostHeaderMismatch {@code true} to allow such requests, 
{@code false} to reject them with a 400
+ *
+ * @deprecated This will removed in Tomcat 11 onwards where {@code 
allowHostHeaderMismatch} will be hard-coded to
+ * {@code false}.
  */
+@Deprecated
 public void setAllowHostHeaderMismatch(boolean allowHostHeaderMismatch) {
 this.allowHostHeaderMismatch = allowHostHeaderMismatch;
 }
@@ -202,7 +210,11 @@ public abstract class AbstractHttp11Protocol extends 
AbstractProtocol {
  * token) will the request be rejected (with a 400 response) or will the 
illegal header be ignored?
  *
  * @return {@code true} if the request will be rejected or {@code false} 
if the header will be ignored
+ *
+ * @deprecated This will removed in Tomcat 11 onwards where {@code 
allowHostHeaderMismatch} will be hard-coded to
+ * {@code true}.
  */
+@Deprecated
 public boolean getRejectIllegalHeader() {
 return rejectIllegalHeader;
 }
@@ -213,7 +225,11 @@ public abstract class AbstractHttp11Protocol extends 
AbstractProtocol {
  *
  * @param rejectIllegalHeader {@code true} to reject requests with illegal 
header names or values, {@code false} to
  *ignore the header
+ *
+ * @deprecated This will removed in Tomcat 11 onwards where {@code 
allowHostHeaderMismatch} will be hard-coded to
+ * {@code true}.
  */
+@Deprecated
 public void setRejectIllegalHeader(boolean rejectIllegalHeader) {
 this.rejectIllegalHeader = rejectIllegalHeader;
 }
@@ -578,11 +594,11 @@ public abstract class AbstractHttp11Protocol extends 
AbstractProtocol {
 /**
  * The protocols that are available via internal Tomcat support for access 
via HTTP upgrade.
  */
-private final Map httpUpgradeProtocols = new 
HashMap<>();
+private final Map httpUpgradeProtocols = new 
HashMap<>();
 /**
  * The protocols that are available via internal Tomcat support for access 
via ALPN negotiation.
  */
-private final Map negotiatedProtocols = new 
HashMap<>();
+private final Map negotiatedProtocols = new 
HashMap<>();
 
 private void configureUpgradeProtocol(UpgradeProtocol upgradeProtocol) {
 // HTTP Upgrade
@@ -634,7 +650,7 @@ public abstract class AbstractHttp11Protocol extends 
AbstractProtocol {
  * To enable basic statistics to be made available for these protocols, a 
map of protocol name to
  * {@link UpgradeGroupInfo} instances is 

[tomcat] branch 10.1.x updated: Deprecate allowHostHeaderMismatch and rejectIllegalHeader

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

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


The following commit(s) were added to refs/heads/10.1.x by this push:
 new a4d6ffb66f Deprecate allowHostHeaderMismatch and rejectIllegalHeader
a4d6ffb66f is described below

commit a4d6ffb66f34f7d1da789179d20cc327c6c51fcc
Author: Mark Thomas 
AuthorDate: Tue May 2 17:15:21 2023 +0100

Deprecate allowHostHeaderMismatch and rejectIllegalHeader
---
 .../coyote/http11/AbstractHttp11Protocol.java  | 26 +-
 java/org/apache/coyote/http11/Http11Processor.java |  2 ++
 webapps/docs/changelog.xml |  5 +
 webapps/docs/config/http.xml   | 10 +++--
 4 files changed, 36 insertions(+), 7 deletions(-)

diff --git a/java/org/apache/coyote/http11/AbstractHttp11Protocol.java 
b/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
index a8fab9554d..b2679d7618 100644
--- a/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
+++ b/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
@@ -59,7 +59,7 @@ public abstract class AbstractHttp11Protocol extends 
AbstractProtocol {
 private final CompressionConfig compressionConfig = new 
CompressionConfig();
 
 
-public AbstractHttp11Protocol(AbstractEndpoint endpoint) {
+public AbstractHttp11Protocol(AbstractEndpoint endpoint) {
 super(endpoint);
 setConnectionTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
 }
@@ -115,7 +115,7 @@ public abstract class AbstractHttp11Protocol extends 
AbstractProtocol {
  * Over-ridden here to make the method visible to nested classes.
  */
 @Override
-protected AbstractEndpoint getEndpoint() {
+protected AbstractEndpoint getEndpoint() {
 return super.getEndpoint();
 }
 
@@ -178,7 +178,11 @@ public abstract class AbstractHttp11Protocol extends 
AbstractProtocol {
  * the request line?
  *
  * @return {@code true} if Tomcat will allow such requests, otherwise 
{@code false}
+ *
+ * @deprecated This will removed in Tomcat 11 onwards where {@code 
allowHostHeaderMismatch} will be hard-coded to
+ * {@code false}.
  */
+@Deprecated
 public boolean getAllowHostHeaderMismatch() {
 return allowHostHeaderMismatch;
 }
@@ -188,7 +192,11 @@ public abstract class AbstractHttp11Protocol extends 
AbstractProtocol {
  * the request line?
  *
  * @param allowHostHeaderMismatch {@code true} to allow such requests, 
{@code false} to reject them with a 400
+ *
+ * @deprecated This will removed in Tomcat 11 onwards where {@code 
allowHostHeaderMismatch} will be hard-coded to
+ * {@code false}.
  */
+@Deprecated
 public void setAllowHostHeaderMismatch(boolean allowHostHeaderMismatch) {
 this.allowHostHeaderMismatch = allowHostHeaderMismatch;
 }
@@ -201,7 +209,11 @@ public abstract class AbstractHttp11Protocol extends 
AbstractProtocol {
  * token) will the request be rejected (with a 400 response) or will the 
illegal header be ignored?
  *
  * @return {@code true} if the request will be rejected or {@code false} 
if the header will be ignored
+ *
+ * @deprecated This will removed in Tomcat 11 onwards where {@code 
allowHostHeaderMismatch} will be hard-coded to
+ * {@code true}.
  */
+@Deprecated
 public boolean getRejectIllegalHeader() {
 return rejectIllegalHeader;
 }
@@ -212,7 +224,11 @@ public abstract class AbstractHttp11Protocol extends 
AbstractProtocol {
  *
  * @param rejectIllegalHeader {@code true} to reject requests with illegal 
header names or values, {@code false} to
  *ignore the header
+ *
+ * @deprecated This will removed in Tomcat 11 onwards where {@code 
allowHostHeaderMismatch} will be hard-coded to
+ * {@code true}.
  */
+@Deprecated
 public void setRejectIllegalHeader(boolean rejectIllegalHeader) {
 this.rejectIllegalHeader = rejectIllegalHeader;
 }
@@ -577,11 +593,11 @@ public abstract class AbstractHttp11Protocol extends 
AbstractProtocol {
 /**
  * The protocols that are available via internal Tomcat support for access 
via HTTP upgrade.
  */
-private final Map httpUpgradeProtocols = new 
HashMap<>();
+private final Map httpUpgradeProtocols = new 
HashMap<>();
 /**
  * The protocols that are available via internal Tomcat support for access 
via ALPN negotiation.
  */
-private final Map negotiatedProtocols = new 
HashMap<>();
+private final Map negotiatedProtocols = new 
HashMap<>();
 
 private void configureUpgradeProtocol(UpgradeProtocol upgradeProtocol) {
 // HTTP Upgrade
@@ -633,7 +649,7 @@ public abstract class AbstractHttp11Protocol extends 
AbstractProtocol {
  * To enable basic

[tomcat] branch 9.0.x updated: Deprecate allowHostHeaderMismatch and rejectIllegalHeader

2023-05-02 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 de63b522d9 Deprecate allowHostHeaderMismatch and rejectIllegalHeader
de63b522d9 is described below

commit de63b522d9187c3155b3f1b5d778362105a1360a
Author: Mark Thomas 
AuthorDate: Tue May 2 17:15:21 2023 +0100

Deprecate allowHostHeaderMismatch and rejectIllegalHeader
---
 .../coyote/http11/AbstractHttp11Protocol.java  | 26 +-
 java/org/apache/coyote/http11/Http11Processor.java |  2 ++
 webapps/docs/changelog.xml |  5 +
 webapps/docs/config/http.xml   | 10 +++--
 4 files changed, 36 insertions(+), 7 deletions(-)

diff --git a/java/org/apache/coyote/http11/AbstractHttp11Protocol.java 
b/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
index 908ef0f9e3..00e4873cd8 100644
--- a/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
+++ b/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
@@ -57,7 +57,7 @@ public abstract class AbstractHttp11Protocol extends 
AbstractProtocol {
 private final CompressionConfig compressionConfig = new 
CompressionConfig();
 
 
-public AbstractHttp11Protocol(AbstractEndpoint endpoint) {
+public AbstractHttp11Protocol(AbstractEndpoint endpoint) {
 super(endpoint);
 setConnectionTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
 }
@@ -113,7 +113,7 @@ public abstract class AbstractHttp11Protocol extends 
AbstractProtocol {
  * Over-ridden here to make the method visible to nested classes.
  */
 @Override
-protected AbstractEndpoint getEndpoint() {
+protected AbstractEndpoint getEndpoint() {
 return super.getEndpoint();
 }
 
@@ -176,7 +176,11 @@ public abstract class AbstractHttp11Protocol extends 
AbstractProtocol {
  * the request line?
  *
  * @return {@code true} if Tomcat will allow such requests, otherwise 
{@code false}
+ *
+ * @deprecated This will removed in Tomcat 11 onwards where {@code 
allowHostHeaderMismatch} will be hard-coded to
+ * {@code false}.
  */
+@Deprecated
 public boolean getAllowHostHeaderMismatch() {
 return allowHostHeaderMismatch;
 }
@@ -186,7 +190,11 @@ public abstract class AbstractHttp11Protocol extends 
AbstractProtocol {
  * the request line?
  *
  * @param allowHostHeaderMismatch {@code true} to allow such requests, 
{@code false} to reject them with a 400
+ *
+ * @deprecated This will removed in Tomcat 11 onwards where {@code 
allowHostHeaderMismatch} will be hard-coded to
+ * {@code false}.
  */
+@Deprecated
 public void setAllowHostHeaderMismatch(boolean allowHostHeaderMismatch) {
 this.allowHostHeaderMismatch = allowHostHeaderMismatch;
 }
@@ -199,7 +207,11 @@ public abstract class AbstractHttp11Protocol extends 
AbstractProtocol {
  * token) will the request be rejected (with a 400 response) or will the 
illegal header be ignored?
  *
  * @return {@code true} if the request will be rejected or {@code false} 
if the header will be ignored
+ *
+ * @deprecated This will removed in Tomcat 11 onwards where {@code 
allowHostHeaderMismatch} will be hard-coded to
+ * {@code true}.
  */
+@Deprecated
 public boolean getRejectIllegalHeader() {
 return rejectIllegalHeader;
 }
@@ -210,7 +222,11 @@ public abstract class AbstractHttp11Protocol extends 
AbstractProtocol {
  *
  * @param rejectIllegalHeader {@code true} to reject requests with illegal 
header names or values, {@code false} to
  *ignore the header
+ *
+ * @deprecated This will removed in Tomcat 11 onwards where {@code 
allowHostHeaderMismatch} will be hard-coded to
+ * {@code true}.
  */
+@Deprecated
 public void setRejectIllegalHeader(boolean rejectIllegalHeader) {
 this.rejectIllegalHeader = rejectIllegalHeader;
 }
@@ -609,11 +625,11 @@ public abstract class AbstractHttp11Protocol extends 
AbstractProtocol {
 /**
  * The protocols that are available via internal Tomcat support for access 
via HTTP upgrade.
  */
-private final Map httpUpgradeProtocols = new 
HashMap<>();
+private final Map httpUpgradeProtocols = new 
HashMap<>();
 /**
  * The protocols that are available via internal Tomcat support for access 
via ALPN negotiation.
  */
-private final Map negotiatedProtocols = new 
HashMap<>();
+private final Map negotiatedProtocols = new 
HashMap<>();
 
 private void configureUpgradeProtocol(UpgradeProtocol upgradeProtocol) {
 // HTTP Upgrade
@@ -664,7 +680,7 @@ public abstract class AbstractHttp11Protocol extends 
AbstractProtocol {
  * {@code UpgradePro

[tomcat] branch 8.5.x updated: Deprecate allowHostHeaderMismatch and rejectIllegalHeader

2023-05-02 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 95c4397a6a Deprecate allowHostHeaderMismatch and rejectIllegalHeader
95c4397a6a is described below

commit 95c4397a6a6cde74dc9d34ed484794374abe9ad4
Author: Mark Thomas 
AuthorDate: Tue May 2 17:15:21 2023 +0100

Deprecate allowHostHeaderMismatch and rejectIllegalHeader
---
 .../coyote/http11/AbstractHttp11Protocol.java  | 26 +-
 java/org/apache/coyote/http11/Http11Processor.java |  1 +
 webapps/docs/changelog.xml |  5 +
 webapps/docs/config/http.xml   | 10 +++--
 4 files changed, 35 insertions(+), 7 deletions(-)

diff --git a/java/org/apache/coyote/http11/AbstractHttp11Protocol.java 
b/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
index 2b1d75b124..0e76f4d2fe 100644
--- a/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
+++ b/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
@@ -58,7 +58,7 @@ public abstract class AbstractHttp11Protocol extends 
AbstractProtocol {
 private final CompressionConfig compressionConfig = new 
CompressionConfig();
 
 
-public AbstractHttp11Protocol(AbstractEndpoint endpoint) {
+public AbstractHttp11Protocol(AbstractEndpoint endpoint) {
 super(endpoint);
 setConnectionTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
 }
@@ -116,7 +116,7 @@ public abstract class AbstractHttp11Protocol extends 
AbstractProtocol {
  * Over-ridden here to make the method visible to nested classes.
  */
 @Override
-protected AbstractEndpoint getEndpoint() {
+protected AbstractEndpoint getEndpoint() {
 return super.getEndpoint();
 }
 
@@ -179,7 +179,11 @@ public abstract class AbstractHttp11Protocol extends 
AbstractProtocol {
  * the request line?
  *
  * @return {@code true} if Tomcat will allow such requests, otherwise 
{@code false}
+ *
+ * @deprecated This will removed in Tomcat 11 onwards where {@code 
allowHostHeaderMismatch} will be hard-coded to
+ * {@code false}.
  */
+@Deprecated
 public boolean getAllowHostHeaderMismatch() {
 return allowHostHeaderMismatch;
 }
@@ -189,7 +193,11 @@ public abstract class AbstractHttp11Protocol extends 
AbstractProtocol {
  * the request line?
  *
  * @param allowHostHeaderMismatch {@code true} to allow such requests, 
{@code false} to reject them with a 400
+ *
+ * @deprecated This will removed in Tomcat 11 onwards where {@code 
allowHostHeaderMismatch} will be hard-coded to
+ * {@code false}.
  */
+@Deprecated
 public void setAllowHostHeaderMismatch(boolean allowHostHeaderMismatch) {
 this.allowHostHeaderMismatch = allowHostHeaderMismatch;
 }
@@ -202,7 +210,11 @@ public abstract class AbstractHttp11Protocol extends 
AbstractProtocol {
  * token) will the request be rejected (with a 400 response) or will the 
illegal header be ignored?
  *
  * @return {@code true} if the request will be rejected or {@code false} 
if the header will be ignored
+ *
+ * @deprecated This will removed in Tomcat 11 onwards where {@code 
allowHostHeaderMismatch} will be hard-coded to
+ * {@code true}.
  */
+@Deprecated
 public boolean getRejectIllegalHeader() {
 return rejectIllegalHeader;
 }
@@ -213,7 +225,11 @@ public abstract class AbstractHttp11Protocol extends 
AbstractProtocol {
  *
  * @param rejectIllegalHeader {@code true} to reject requests with illegal 
header names or values, {@code false} to
  *ignore the header
+ *
+ * @deprecated This will removed in Tomcat 11 onwards where {@code 
allowHostHeaderMismatch} will be hard-coded to
+ * {@code true}.
  */
+@Deprecated
 public void setRejectIllegalHeader(boolean rejectIllegalHeader) {
 this.rejectIllegalHeader = rejectIllegalHeader;
 }
@@ -613,11 +629,11 @@ public abstract class AbstractHttp11Protocol extends 
AbstractProtocol {
 /**
  * The protocols that are available via internal Tomcat support for access 
via HTTP upgrade.
  */
-private final Map httpUpgradeProtocols = new 
HashMap<>();
+private final Map httpUpgradeProtocols = new 
HashMap<>();
 /**
  * The protocols that are available via internal Tomcat support for access 
via ALPN negotiation.
  */
-private final Map negotiatedProtocols = new 
HashMap<>();
+private final Map negotiatedProtocols = new 
HashMap<>();
 
 private void configureUpgradeProtocol(UpgradeProtocol upgradeProtocol) {
 // HTTP Upgrade
@@ -668,7 +684,7 @@ public abstract class AbstractHttp11Protocol extends 
AbstractProtocol {
  * {@code UpgradeProt

Buildbot success in on tomcat-10.1.x

2023-05-02 Thread buildbot
Build status: Build succeeded!
Worker used: bb_worker2_ubuntu
URL: https://ci2.apache.org/#builders/44/builds/777
Blamelist: Mark Thomas 
Build Text: build successful
Status Detected: restored build
Build Source Stamp: [branch 10.1.x] e239c5dbb07e70d1d6298e6f066b4f69d6df39df


Steps:

  worker_preparation: 0

  git: 0

  shell: 0

  shell_1: 0

  shell_2: 0

  shell_3: 0

  shell_4: 0

  shell_5: 0

  compile: 1

  shell_6: 0

  shell_7: 0

  shell_8: 0

  shell_9: 0

  Rsync docs to nightlies.apache.org: 0

  shell_10: 0

  Rsync RAT to nightlies.apache.org: 0

  compile_1: 1

  shell_11: 0

  Rsync Logs to nightlies.apache.org: 0


-- ASF Buildbot


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



[tomcat] branch main updated: Hard-code rejectIllegalHeader and allowHostHeaderMismatch to defaults

2023-05-02 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 1f5951ad32 Hard-code rejectIllegalHeader and allowHostHeaderMismatch 
to defaults
1f5951ad32 is described below

commit 1f5951ad3224009b98662c8d6b0bbdfcffd2c3b1
Author: Mark Thomas 
AuthorDate: Tue May 2 18:06:44 2023 +0100

Hard-code rejectIllegalHeader and allowHostHeaderMismatch to defaults
---
 .../coyote/http11/AbstractHttp11Protocol.java  |  63 
 .../apache/coyote/http11/Http11InputBuffer.java|  50 ++
 java/org/apache/coyote/http11/Http11Processor.java |  20 +---
 .../coyote/http11/TestHttp11InputBuffer.java   | 109 +++--
 webapps/docs/changelog.xml |   6 ++
 webapps/docs/config/http.xml   |  21 
 6 files changed, 36 insertions(+), 233 deletions(-)

diff --git a/java/org/apache/coyote/http11/AbstractHttp11Protocol.java 
b/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
index e31fbb25a2..9cdd084198 100644
--- a/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
+++ b/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
@@ -172,69 +172,6 @@ public abstract class AbstractHttp11Protocol extends 
AbstractProtocol {
 }
 
 
-private boolean allowHostHeaderMismatch = false;
-
-/**
- * Will Tomcat accept an HTTP 1.1 request where the host header does not 
agree with the host specified (if any) in
- * the request line?
- *
- * @return {@code true} if Tomcat will allow such requests, otherwise 
{@code false}
- *
- * @deprecated This will removed in Tomcat 11 onwards where {@code 
allowHostHeaderMismatch} will be hard-coded to
- * {@code false}.
- */
-@Deprecated
-public boolean getAllowHostHeaderMismatch() {
-return allowHostHeaderMismatch;
-}
-
-/**
- * Will Tomcat accept an HTTP 1.1 request where the host header does not 
agree with the host specified (if any) in
- * the request line?
- *
- * @param allowHostHeaderMismatch {@code true} to allow such requests, 
{@code false} to reject them with a 400
- *
- * @deprecated This will removed in Tomcat 11 onwards where {@code 
allowHostHeaderMismatch} will be hard-coded to
- * {@code false}.
- */
-@Deprecated
-public void setAllowHostHeaderMismatch(boolean allowHostHeaderMismatch) {
-this.allowHostHeaderMismatch = allowHostHeaderMismatch;
-}
-
-
-private boolean rejectIllegalHeader = true;
-
-/**
- * If an HTTP request is received that contains an illegal header name or 
value (e.g. the header name is not a
- * token) will the request be rejected (with a 400 response) or will the 
illegal header be ignored?
- *
- * @return {@code true} if the request will be rejected or {@code false} 
if the header will be ignored
- *
- * @deprecated This will removed in Tomcat 11 onwards where {@code 
allowHostHeaderMismatch} will be hard-coded to
- * {@code true}.
- */
-@Deprecated
-public boolean getRejectIllegalHeader() {
-return rejectIllegalHeader;
-}
-
-/**
- * If an HTTP request is received that contains an illegal header name or 
value (e.g. the header name is not a
- * token) should the request be rejected (with a 400 response) or should 
the illegal header be ignored?
- *
- * @param rejectIllegalHeader {@code true} to reject requests with illegal 
header names or values, {@code false} to
- *ignore the header
- *
- * @deprecated This will removed in Tomcat 11 onwards where {@code 
allowHostHeaderMismatch} will be hard-coded to
- * {@code true}.
- */
-@Deprecated
-public void setRejectIllegalHeader(boolean rejectIllegalHeader) {
-this.rejectIllegalHeader = rejectIllegalHeader;
-}
-
-
 private int maxSavePostSize = 4 * 1024;
 
 /**
diff --git a/java/org/apache/coyote/http11/Http11InputBuffer.java 
b/java/org/apache/coyote/http11/Http11InputBuffer.java
index e6b1595803..36a1bb4f1c 100644
--- a/java/org/apache/coyote/http11/Http11InputBuffer.java
+++ b/java/org/apache/coyote/http11/Http11InputBuffer.java
@@ -65,8 +65,6 @@ public class Http11InputBuffer implements InputBuffer, 
ApplicationBufferHandler
 private final MimeHeaders headers;
 
 
-private final boolean rejectIllegalHeader;
-
 /**
  * State.
  */
@@ -148,14 +146,12 @@ public class Http11InputBuffer implements InputBuffer, 
ApplicationBufferHandler
 
 // --- Constructors
 
-public Http11InputBuffer(Request request, int headerBufferSize, boolean 
rejectIllegalHeader,
-HttpParser httpParser) {
+public Http11InputBuffer(Req

[tomcat] branch main updated: Naming convention (Spot Bugs warning)

2023-05-02 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 9fc35c1444 Naming convention (Spot Bugs warning)
9fc35c1444 is described below

commit 9fc35c14441a3fc6991029d2309068abcc711698
Author: Mark Thomas 
AuthorDate: Tue May 2 18:28:20 2023 +0100

Naming convention (Spot Bugs warning)
---
 test/org/apache/catalina/valves/TestAccessLogValve.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/org/apache/catalina/valves/TestAccessLogValve.java 
b/test/org/apache/catalina/valves/TestAccessLogValve.java
index 022c4e0b78..495f8bdf15 100644
--- a/test/org/apache/catalina/valves/TestAccessLogValve.java
+++ b/test/org/apache/catalina/valves/TestAccessLogValve.java
@@ -270,7 +270,7 @@ public class TestAccessLogValve extends TomcatBaseTest {
 }
 
 @Test
-public void Test() throws LifecycleException, IOException {
+public void test() throws LifecycleException, IOException {
 Tomcat tomcat = getTomcatInstance();
 
 // No file system docBase required


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



[tomcat] branch 10.1.x updated: Naming convention (Spot Bugs warning)

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

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


The following commit(s) were added to refs/heads/10.1.x by this push:
 new 6409899d57 Naming convention (Spot Bugs warning)
6409899d57 is described below

commit 6409899d579f88ea9eaf8f52924de9e86c37f366
Author: Mark Thomas 
AuthorDate: Tue May 2 18:28:20 2023 +0100

Naming convention (Spot Bugs warning)
---
 test/org/apache/catalina/valves/TestAccessLogValve.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/org/apache/catalina/valves/TestAccessLogValve.java 
b/test/org/apache/catalina/valves/TestAccessLogValve.java
index 022c4e0b78..495f8bdf15 100644
--- a/test/org/apache/catalina/valves/TestAccessLogValve.java
+++ b/test/org/apache/catalina/valves/TestAccessLogValve.java
@@ -270,7 +270,7 @@ public class TestAccessLogValve extends TomcatBaseTest {
 }
 
 @Test
-public void Test() throws LifecycleException, IOException {
+public void test() throws LifecycleException, IOException {
 Tomcat tomcat = getTomcatInstance();
 
 // No file system docBase required


-
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: Naming convention (Spot Bugs warning)

2023-05-02 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 71b2aafc67 Naming convention (Spot Bugs warning)
71b2aafc67 is described below

commit 71b2aafc67dce02c05b3be5b0b6c0f79552ebfba
Author: Mark Thomas 
AuthorDate: Tue May 2 18:28:20 2023 +0100

Naming convention (Spot Bugs warning)
---
 test/org/apache/catalina/valves/TestAccessLogValve.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/org/apache/catalina/valves/TestAccessLogValve.java 
b/test/org/apache/catalina/valves/TestAccessLogValve.java
index cb520a3d7e..6fcbbebe91 100644
--- a/test/org/apache/catalina/valves/TestAccessLogValve.java
+++ b/test/org/apache/catalina/valves/TestAccessLogValve.java
@@ -270,7 +270,7 @@ public class TestAccessLogValve extends TomcatBaseTest {
 }
 
 @Test
-public void Test() throws LifecycleException, IOException {
+public void test() throws LifecycleException, IOException {
 Tomcat tomcat = getTomcatInstance();
 
 // No file system docBase required


-
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: Naming convention (Spot Bugs warning)

2023-05-02 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 32d13a6200 Naming convention (Spot Bugs warning)
32d13a6200 is described below

commit 32d13a6200d52a1cdf70b05f7a435ac2bcb79b41
Author: Mark Thomas 
AuthorDate: Tue May 2 18:28:20 2023 +0100

Naming convention (Spot Bugs warning)
---
 test/org/apache/catalina/valves/TestAccessLogValve.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/org/apache/catalina/valves/TestAccessLogValve.java 
b/test/org/apache/catalina/valves/TestAccessLogValve.java
index 01b175acd0..f2e6196871 100644
--- a/test/org/apache/catalina/valves/TestAccessLogValve.java
+++ b/test/org/apache/catalina/valves/TestAccessLogValve.java
@@ -268,7 +268,7 @@ public class TestAccessLogValve extends TomcatBaseTest {
 }
 
 @Test
-public void Test() throws LifecycleException, IOException {
+public void test() throws LifecycleException, IOException {
 Tomcat tomcat = getTomcatInstance();
 
 // No file system docBase required


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



[Bug 66589] New: Data frame included in response for 200 OK status with no body (content-length=0)

2023-05-02 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=66589

Bug ID: 66589
   Summary: Data frame included in response for 200 OK status with
no body (content-length=0)
   Product: Tomcat 9
   Version: 9.0.x
  Hardware: Macintosh
OS: Mac OS X 10.1
Status: NEW
  Severity: normal
  Priority: P2
 Component: Connectors
  Assignee: dev@tomcat.apache.org
  Reporter: hypn...@donarproject.org
  Target Milestone: -

Hi,

while investigating tomcat support for gRPC-servlet server, it seems that
tomcat is sending an empty data frame with end_stream flag uppon 200 status
response with no body (content-length=0).

This is not supported by gRPC:

https://github.com/grpc/grpc-java/blob/3c01bfe77f3d64d9ab97b28bc924105b3e72e8a7/servlet/src/tomcatTest/java/io/grpc/servlet/TomcatTransportTest.java#L254

https://github.com/grpc/grpc-java/blob/3c01bfe77f3d64d9ab97b28bc924105b3e72e8a7/core/src/main/java/io/grpc/internal/Http2ClientStreamTransportState.java#L150

Looking at the tomcat bug history, I came across
https://bz.apache.org/bugzilla/show_bug.cgi?id=66442. The fix
(https://github.com/apache/tomcat/commit/519403fb8aace2c64e1ee3999511719418dc6968)
only relies on the status code and not the content-length.

gRPC expects that only headers carry the end of stream flag from the server as
it never sends a data frame without a trailer frame.

Here is a possible fix :
https://github.com/hypnoce/tomcat/commit/27e6e3da7e5784b460da475a784d58f882fb1801

Let me know what you think.

Thanks

-- 
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 66589] Data frame included in response for 200 OK status with no body (content-length=0)

2023-05-02 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=66589

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |INVALID

--- Comment #1 from Mark Thomas  ---
I can't see anything in RFC 9113 that states that Tomcat's behaviour is not
allowed. On that basis, this would be considered a bug in gRPC and the Tomcat
team would expect it to be fixed in gRPC.

If I have missed the relevant text in RFC 9113 (always possible) please point
it out.

-- 
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 66589] Data frame included in response for 200 OK status with no body (content-length=0)

2023-05-02 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=66589

--- Comment #2 from hypn...@donarproject.org ---
The RFC does not seem to have such requirement.

I think it's the same type of case as
https://bz.apache.org/bugzilla/show_bug.cgi?id=66442, where nothing in the RFC
prevents an empty dataframe with reset flag on status 204, but some client
implementation might be sensitive to such behaviour.

Not sure how this use case is more or less valid than the other one ?

Servlet 4 does not specify in which case data frames are sent.

-- 
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 66589] Data frame included in response for 200 OK status with no body (content-length=0)

2023-05-02 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=66589

--- Comment #3 from Mark Thomas  ---
The difference is that RFC 9110 states that 204 responses are headers only. a
204 response cannot contain content.

-- 
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 66589] Data frame included in response for 200 OK status with no body (content-length=0)

2023-05-02 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=66589

--- Comment #4 from hypn...@donarproject.org ---
OK clear. Will check on the gRPC side then.

-- 
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 66591] New: HttpResponse without any header generates corrupted AJP messages

2023-05-02 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=66591

Bug ID: 66591
   Summary: HttpResponse without any header generates corrupted
AJP messages
   Product: Tomcat 9
   Version: 9.0.74
  Hardware: All
OS: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Connectors
  Assignee: dev@tomcat.apache.org
  Reporter: conny.mar...@t-systems.com
  Target Milestone: -

Fix for bug 66512 caused an issue in one of our applications, which does not
set any response header at all. At a first glance no RFC defines that one MUST
set some http header. But we definitely "should". 

So this "Bug" is only to bring this to your attention. At least there should be
an appropriate error message instead of generating corrupted AJP messages.

KR Conny

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