tomcat and httpd track before July 13th! Final Reminder: Community Over Code call for presentations closing soon

2023-07-05 Thread jean-frederic clere

Hi,

Don't forget to submit talks ASAP to:
https://communityovercode.org/call-for-presentations/
there is a tomcat and httpd track for us.

Cheers

Jean-Frederic


 Forwarded Message 
Subject: Final Reminder: Community Over Code call for presentations 
closing soon

Date: Wed, 28 Jun 2023 16:09:34 -0400
From: Rich Bowen 
Reply-To: plann...@apachecon.com
Organization: The Apache Software Foundation
To: ApacheCon Planners 

[Note: You're receiving this email because you are subscribed to one or
more project dev@ mailing lists at the Apache Software Foundation.]

This is your final reminder that the Call for Presentations for
Community Over Code (formerly known as ApacheCon) is closing soon - on
Thursday, 13 July 2023 at 23:59:59 GMT.

https://communityovercode.org/call-for-presentations/

We are looking for talk proposals on all topics related to ASF projects
and open source software.

The event will be held in Halifax, Nova Scotia, Octiber 7th through
10th. More details about the event may be found on the event website at
https://communityovercode.org/

Rich, for the event planners

--
Cheers

Jean-Frederic

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



Re: [VOTE] Release Apache Tomcat 9.0.78

2023-07-05 Thread Han Li



> On Jul 4, 2023, at 21:28, Rémy Maucherat  wrote:
> 
> The proposed Apache Tomcat 9.0.78 release is now available for voting.
> 
> The notable changes compared to 9.0.76 are:
> 
> - Add ContextNamingInfoListener, a listener which creates context naming
>   information environment entries
> 
> - Add PropertiesRoleMappingListener, a listener which populates the
>   context's role mapping from a properties file.
> 
> Along with lots of other bug fixes and improvements.
> 
> For full details, see the changelog:
> https://nightlies.apache.org/tomcat/tomcat-9.0.x/docs/changelog.html
> 
> It can be obtained from:
> https://dist.apache.org/repos/dist/dev/tomcat/tomcat-9/v9.0.78/
> The Maven staging repo is:
> https://repository.apache.org/content/repositories/orgapachetomcat-1444
> The tag is:
> https://github.com/apache/tomcat/tree/9.0.78
> caf0baff34789335ae23a56337db252c2a578456
> 
> The proposed 9.0.78 release is:
> [ ] -1, Broken - do not release
> [ X] +1, Stable - go ahead and release as 9.0.78

Tests pass.

Han

> 
> Rémy
> 
> -
> 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



Buildbot success in on tomcat-9.0.x

2023-07-05 Thread buildbot
Build status: Build succeeded!
Worker used: bb_worker2_ubuntu
URL: https://ci2.apache.org/#builders/37/builds/617
Blamelist: Mark Thomas 
Build Text: build successful
Status Detected: restored build
Build Source Stamp: [branch 9.0.x] 06304b52d4975eb0f71a2e85ef065b68b658443e


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



Re: [VOTE] Release Apache Tomcat 9.0.78

2023-07-05 Thread Mark Thomas

On 04/07/2023 14:28, Rémy Maucherat wrote:


The proposed 9.0.78 release is:
[ ] -1, Broken - do not release
[X] +1, Stable - go ahead and release as 9.0.78


Build is repeatable.

Unit tests pass on MacOS (Intel & M1), Windows and Linux.

Mark

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



Re: [VOTE] Release Apache Tomcat 11.0.0-M9

2023-07-05 Thread Rémy Maucherat
On Tue, Jul 4, 2023 at 1:00 PM Mark Thomas  wrote:
>
> The proposed Apache Tomcat 11.0.0-M9 release is now available for
> voting.
>
> Apache Tomcat 11.0.0-M9 is a milestone release of the 11.0.x branch and
> has been made to provide users with early access to the new features in
> Apache Tomcat 11.0.x so that they may provide feedback. The notable
> changes compared to the previous milestone include:
>
> - Add ContextNamingInfoListener, a listener which creates context naming
>information environment entries
>
> - Add PropertiesRoleMappingListener, a listener which populates the
>context's role mapping from a properties file.
>
> - Update the Jakarta EL and Jakarta WebSocket implementations to align
>with the latest changes planned for Jakarta EE 11
>
> For full details, see the change log:
> https://nightlies.apache.org/tomcat/tomcat-11.0.x/docs/changelog.html
>
> Applications that run on Tomcat 9 and earlier will not run on Tomcat 11
> without changes. Java EE applications designed for Tomcat 9 and earlier
> may be placed in the $CATALINA_BASE/webapps-javaee directory and Tomcat
> will automatically convert them to Jakarta EE and copy them to the
> webapps directory. Applications using deprecated APIs may require
> further changes.
>
> It can be obtained from:
> https://dist.apache.org/repos/dist/dev/tomcat/tomcat-11/v11.0.0-M9/
>
> The Maven staging repo is:
> https://repository.apache.org/content/repositories/orgapachetomcat-1443
>
> The tag is:
> https://github.com/apache/tomcat/tree/11.0.0-M9
> de714a23642a4d0baef342db6762a7f7a550d82c
>
>
> The proposed 11.0.0-M9 release is:
> [ ] -1 Broken - do not release
> [X] +1 Alpha  - go ahead and release as 11.0.0-M9

Rémy

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



Buildbot failure in on tomcat-11.0.x

2023-07-05 Thread buildbot
Build status: BUILD FAILED: failed compile (failure)
Worker used: bb_worker2_ubuntu
URL: https://ci2.apache.org/#builders/112/builds/475
Blamelist: Mark Thomas 
Build Text: failed compile (failure)
Status Detected: new failure
Build Source Stamp: [branch main] 7e9ce3880b66f7fc3bcaf79c751a1808df10843c


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



Re: [VOTE] Release Apache Tomcat 11.0.0-M9

2023-07-05 Thread Dimitris Soumis
Tests pass on Fedora 38.

On Tue, Jul 4, 2023 at 2:07 PM Mark Thomas  wrote:

> The proposed Apache Tomcat 11.0.0-M9 release is now available for
> voting.
>
> Apache Tomcat 11.0.0-M9 is a milestone release of the 11.0.x branch and
> has been made to provide users with early access to the new features in
> Apache Tomcat 11.0.x so that they may provide feedback. The notable
> changes compared to the previous milestone include:
>
> - Add ContextNamingInfoListener, a listener which creates context naming
>information environment entries
>
> - Add PropertiesRoleMappingListener, a listener which populates the
>context's role mapping from a properties file.
>
> - Update the Jakarta EL and Jakarta WebSocket implementations to align
>with the latest changes planned for Jakarta EE 11
>
> For full details, see the change log:
> https://nightlies.apache.org/tomcat/tomcat-11.0.x/docs/changelog.html
>
> Applications that run on Tomcat 9 and earlier will not run on Tomcat 11
> without changes. Java EE applications designed for Tomcat 9 and earlier
> may be placed in the $CATALINA_BASE/webapps-javaee directory and Tomcat
> will automatically convert them to Jakarta EE and copy them to the
> webapps directory. Applications using deprecated APIs may require
> further changes.
>
> It can be obtained from:
> https://dist.apache.org/repos/dist/dev/tomcat/tomcat-11/v11.0.0-M9/
>
> The Maven staging repo is:
> https://repository.apache.org/content/repositories/orgapachetomcat-1443
>
> The tag is:
> https://github.com/apache/tomcat/tree/11.0.0-M9
> de714a23642a4d0baef342db6762a7f7a550d82c
>
>
> The proposed 11.0.0-M9 release is:
> [ ] -1 Broken - do not release
> [X ] +1 Alpha  - go ahead and release as 11.0.0-M9
>
> -
> 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: Remove via Iterator since collection is fail-fast (ArrayList)

2023-07-05 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 0d23722f58 Remove via Iterator since collection is fail-fast 
(ArrayList)
0d23722f58 is described below

commit 0d23722f585ce9092dbd11ef76760236bf0381c4
Author: Mark Thomas 
AuthorDate: Wed Jul 5 18:30:10 2023 +0100

Remove via Iterator since collection is fail-fast (ArrayList)

Identified by Coverity Scan
---
 java/org/apache/catalina/servlets/WebdavServlet.java | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java 
b/java/org/apache/catalina/servlets/WebdavServlet.java
index 1ef73559a2..17151e4824 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -1057,9 +1057,11 @@ public class WebdavServlet extends DefaultServlet {
 // Checking if a child resource of this collection is
 // already locked
 List lockPaths = new ArrayList<>();
-for (LockInfo currentLock : collectionLocks) {
+Iterator collectionLocksIterator = 
collectionLocks.iterator();
+while (collectionLocksIterator.hasNext()) {
+LockInfo currentLock = collectionLocksIterator.next();
 if (currentLock.hasExpired()) {
-collectionLocks.remove(currentLock);
+collectionLocksIterator.remove();
 continue;
 }
 if (currentLock.path.startsWith(lock.path) &&


-
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: Remove via Iterator since collection is fail-fast (ArrayList)

2023-07-05 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 06304b52d4 Remove via Iterator since collection is fail-fast 
(ArrayList)
06304b52d4 is described below

commit 06304b52d4975eb0f71a2e85ef065b68b658443e
Author: Mark Thomas 
AuthorDate: Wed Jul 5 18:30:10 2023 +0100

Remove via Iterator since collection is fail-fast (ArrayList)

Identified by Coverity Scan
---
 java/org/apache/catalina/servlets/WebdavServlet.java | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java 
b/java/org/apache/catalina/servlets/WebdavServlet.java
index dae5a470b4..457ab2a25d 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -1055,9 +1055,11 @@ public class WebdavServlet extends DefaultServlet {
 // Checking if a child resource of this collection is
 // already locked
 List lockPaths = new ArrayList<>();
-for (LockInfo currentLock : collectionLocks) {
+Iterator collectionLocksIterator = 
collectionLocks.iterator();
+while (collectionLocksIterator.hasNext()) {
+LockInfo currentLock = collectionLocksIterator.next();
 if (currentLock.hasExpired()) {
-collectionLocks.remove(currentLock);
+collectionLocksIterator.remove();
 continue;
 }
 if (currentLock.path.startsWith(lock.path) &&


-
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: Remove via Iterator since collection is fail-fast (ArrayList)

2023-07-05 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 4842d3874b Remove via Iterator since collection is fail-fast 
(ArrayList)
4842d3874b is described below

commit 4842d3874bf7727bfd2638aef1cc0d4f18561d71
Author: Mark Thomas 
AuthorDate: Wed Jul 5 18:30:10 2023 +0100

Remove via Iterator since collection is fail-fast (ArrayList)

Identified by Coverity Scan
---
 java/org/apache/catalina/servlets/WebdavServlet.java | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java 
b/java/org/apache/catalina/servlets/WebdavServlet.java
index c9be178963..bd75fc7760 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -1056,9 +1056,11 @@ public class WebdavServlet extends DefaultServlet {
 // Checking if a child resource of this collection is
 // already locked
 List lockPaths = new ArrayList<>();
-for (LockInfo currentLock : collectionLocks) {
+Iterator collectionLocksIterator = 
collectionLocks.iterator();
+while (collectionLocksIterator.hasNext()) {
+LockInfo currentLock = collectionLocksIterator.next();
 if (currentLock.hasExpired()) {
-collectionLocks.remove(currentLock);
+collectionLocksIterator.remove();
 continue;
 }
 if (currentLock.path.startsWith(lock.path) &&


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



[tomcat] branch main updated: Remove via Iterator since collection is fail-fast (ArrayList)

2023-07-05 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 7e9ce3880b Remove via Iterator since collection is fail-fast 
(ArrayList)
7e9ce3880b is described below

commit 7e9ce3880b66f7fc3bcaf79c751a1808df10843c
Author: Mark Thomas 
AuthorDate: Wed Jul 5 18:30:10 2023 +0100

Remove via Iterator since collection is fail-fast (ArrayList)

Identified by Coverity Scan
---
 java/org/apache/catalina/servlets/WebdavServlet.java | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java 
b/java/org/apache/catalina/servlets/WebdavServlet.java
index c9be178963..bd75fc7760 100644
--- a/java/org/apache/catalina/servlets/WebdavServlet.java
+++ b/java/org/apache/catalina/servlets/WebdavServlet.java
@@ -1056,9 +1056,11 @@ public class WebdavServlet extends DefaultServlet {
 // Checking if a child resource of this collection is
 // already locked
 List lockPaths = new ArrayList<>();
-for (LockInfo currentLock : collectionLocks) {
+Iterator collectionLocksIterator = 
collectionLocks.iterator();
+while (collectionLocksIterator.hasNext()) {
+LockInfo currentLock = collectionLocksIterator.next();
 if (currentLock.hasExpired()) {
-collectionLocks.remove(currentLock);
+collectionLocksIterator.remove();
 continue;
 }
 if (currentLock.path.startsWith(lock.path) &&


-
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: Remove unnecessary code

2023-07-05 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 957f37ed36 Remove unnecessary code
957f37ed36 is described below

commit 957f37ed36c0b58f9e99f7db806dc3969f9f46ca
Author: Mark Thomas 
AuthorDate: Wed Jul 5 17:34:03 2023 +0100

Remove unnecessary code

Dead code identified by Coverity Scan
---
 java/org/apache/coyote/http2/StreamProcessor.java | 9 ++---
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/java/org/apache/coyote/http2/StreamProcessor.java 
b/java/org/apache/coyote/http2/StreamProcessor.java
index f9dfefc8f0..80c04ed5cc 100644
--- a/java/org/apache/coyote/http2/StreamProcessor.java
+++ b/java/org/apache/coyote/http2/StreamProcessor.java
@@ -466,17 +466,12 @@ class StreamProcessor extends AbstractProcessor {
 }
 
 // HTTP header names must be tokens.
+// Stream#emitHeader() checks that all the pseudo headers appear first.
 MimeHeaders headers = request.getMimeHeaders();
-boolean previousHeaderWasPseudoHeader = true;
 Enumeration names = headers.names();
 while (names.hasMoreElements()) {
 String name = names.nextElement();
-if (H2_PSEUDO_HEADERS_REQUEST.contains(name)) {
-if (!previousHeaderWasPseudoHeader) {
-return false;
-}
-} else if (!HttpParser.isToken(name)) {
-previousHeaderWasPseudoHeader = false;
+if (!H2_PSEUDO_HEADERS_REQUEST.contains(name) && 
!HttpParser.isToken(name)) {
 return false;
 }
 }


-
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: Remove unnecessary code

2023-07-05 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 1e9b8fcef3 Remove unnecessary code
1e9b8fcef3 is described below

commit 1e9b8fcef372bc50c9f2438f00187fbfca6aad74
Author: Mark Thomas 
AuthorDate: Wed Jul 5 17:34:03 2023 +0100

Remove unnecessary code

Dead code identified by Coverity Scan
---
 java/org/apache/coyote/http2/StreamProcessor.java | 9 ++---
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/java/org/apache/coyote/http2/StreamProcessor.java 
b/java/org/apache/coyote/http2/StreamProcessor.java
index fd1e011bea..4b06ff9b71 100644
--- a/java/org/apache/coyote/http2/StreamProcessor.java
+++ b/java/org/apache/coyote/http2/StreamProcessor.java
@@ -506,17 +506,12 @@ class StreamProcessor extends AbstractProcessor {
 }
 
 // HTTP header names must be tokens.
+// Stream#emitHeader() checks that all the pseudo headers appear first.
 MimeHeaders headers = request.getMimeHeaders();
-boolean previousHeaderWasPseudoHeader = true;
 Enumeration names = headers.names();
 while (names.hasMoreElements()) {
 String name = names.nextElement();
-if (H2_PSEUDO_HEADERS_REQUEST.contains(name)) {
-if (!previousHeaderWasPseudoHeader) {
-return false;
-}
-} else if (!HttpParser.isToken(name)) {
-previousHeaderWasPseudoHeader = false;
+if (!H2_PSEUDO_HEADERS_REQUEST.contains(name) && 
!HttpParser.isToken(name)) {
 return false;
 }
 }


-
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: Remove unnecessary code

2023-07-05 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 2addd8904a Remove unnecessary code
2addd8904a is described below

commit 2addd8904a0034744924e0a0cc3833765bdd1bad
Author: Mark Thomas 
AuthorDate: Wed Jul 5 17:34:03 2023 +0100

Remove unnecessary code

Dead code identified by Coverity Scan
---
 java/org/apache/coyote/http2/StreamProcessor.java | 9 ++---
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/java/org/apache/coyote/http2/StreamProcessor.java 
b/java/org/apache/coyote/http2/StreamProcessor.java
index d08c875cbd..e22afa030d 100644
--- a/java/org/apache/coyote/http2/StreamProcessor.java
+++ b/java/org/apache/coyote/http2/StreamProcessor.java
@@ -505,17 +505,12 @@ class StreamProcessor extends AbstractProcessor {
 }
 
 // HTTP header names must be tokens.
+// Stream#emitHeader() checks that all the pseudo headers appear first.
 MimeHeaders headers = request.getMimeHeaders();
-boolean previousHeaderWasPseudoHeader = true;
 Enumeration names = headers.names();
 while (names.hasMoreElements()) {
 String name = names.nextElement();
-if (H2_PSEUDO_HEADERS_REQUEST.contains(name)) {
-if (!previousHeaderWasPseudoHeader) {
-return false;
-}
-} else if (!HttpParser.isToken(name)) {
-previousHeaderWasPseudoHeader = false;
+if (!H2_PSEUDO_HEADERS_REQUEST.contains(name) && 
!HttpParser.isToken(name)) {
 return false;
 }
 }


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



[tomcat] branch main updated: Remove unnecessary code

2023-07-05 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 8518c54fba Remove unnecessary code
8518c54fba is described below

commit 8518c54fba7edf91c87df4664d7cb20457e4b37d
Author: Mark Thomas 
AuthorDate: Wed Jul 5 17:34:03 2023 +0100

Remove unnecessary code

Dead code identified by Coverity Scan
---
 java/org/apache/coyote/http2/StreamProcessor.java | 9 ++---
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/java/org/apache/coyote/http2/StreamProcessor.java 
b/java/org/apache/coyote/http2/StreamProcessor.java
index 78cb770649..01f5e224ec 100644
--- a/java/org/apache/coyote/http2/StreamProcessor.java
+++ b/java/org/apache/coyote/http2/StreamProcessor.java
@@ -512,17 +512,12 @@ class StreamProcessor extends AbstractProcessor {
 }
 
 // HTTP header names must be tokens.
+// Stream#emitHeader() checks that all the pseudo headers appear first.
 MimeHeaders headers = request.getMimeHeaders();
-boolean previousHeaderWasPseudoHeader = true;
 Enumeration names = headers.names();
 while (names.hasMoreElements()) {
 String name = names.nextElement();
-if (H2_PSEUDO_HEADERS_REQUEST.contains(name)) {
-if (!previousHeaderWasPseudoHeader) {
-return false;
-}
-} else if (!HttpParser.isToken(name)) {
-previousHeaderWasPseudoHeader = false;
+if (!H2_PSEUDO_HEADERS_REQUEST.contains(name) && 
!HttpParser.isToken(name)) {
 return false;
 }
 }


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



Buildbot failure in on tomcat-9.0.x

2023-07-05 Thread buildbot
Build status: BUILD FAILED: failed compile (failure)
Worker used: bb_worker2_ubuntu
URL: https://ci2.apache.org/#builders/37/builds/616
Blamelist: Mark Thomas 
Build Text: failed compile (failure)
Status Detected: new failure
Build Source Stamp: [branch 9.0.x] 0c4e6ee7c32cf211d924c3d4fff5ab68ee47bcc3


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 9.0.x updated: Fix comment typo

2023-07-05 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 117c362047 Fix comment typo
117c362047 is described below

commit 117c3620470f742852692ae47b6904c8003cca61
Author: Mark Thomas 
AuthorDate: Wed Jul 5 16:50:27 2023 +0100

Fix comment typo
---
 java/org/apache/catalina/Manager.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/Manager.java 
b/java/org/apache/catalina/Manager.java
index 589392b974..6ade69155d 100644
--- a/java/org/apache/catalina/Manager.java
+++ b/java/org/apache/catalina/Manager.java
@@ -232,7 +232,7 @@ public interface Manager {
  */
 default String rotateSessionId(Session session) {
 String newSessionId = null;
-// Assume there new Id is a duplicate until we prove it isn't. The
+// Assume the new Id is a duplicate until we prove it isn't. The
 // chances of a duplicate are extremely low but the current ManagerBase
 // code protects against duplicates so this default method does too.
 boolean duplicate = true;


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

2023-07-05 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 dda1f1748f Fix comment typo
dda1f1748f is described below

commit dda1f1748f3e9f02e3224a9532871a26bf75c505
Author: Mark Thomas 
AuthorDate: Wed Jul 5 16:50:27 2023 +0100

Fix comment typo
---
 java/org/apache/catalina/Manager.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/Manager.java 
b/java/org/apache/catalina/Manager.java
index db66fab3a2..41e3211945 100644
--- a/java/org/apache/catalina/Manager.java
+++ b/java/org/apache/catalina/Manager.java
@@ -220,7 +220,7 @@ public interface Manager {
  */
 default String rotateSessionId(Session session) {
 String newSessionId = null;
-// Assume there new Id is a duplicate until we prove it isn't. The
+// Assume the new Id is a duplicate until we prove it isn't. The
 // chances of a duplicate are extremely low but the current ManagerBase
 // code protects against duplicates so this default method does too.
 boolean duplicate = true;


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



[tomcat] branch main updated: Fix comment typo

2023-07-05 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 83ae6c9a2a Fix comment typo
83ae6c9a2a is described below

commit 83ae6c9a2aeb8fd290f6f8caae28ba2f313caba3
Author: Mark Thomas 
AuthorDate: Wed Jul 5 16:50:27 2023 +0100

Fix comment typo
---
 java/org/apache/catalina/Manager.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/Manager.java 
b/java/org/apache/catalina/Manager.java
index db66fab3a2..41e3211945 100644
--- a/java/org/apache/catalina/Manager.java
+++ b/java/org/apache/catalina/Manager.java
@@ -220,7 +220,7 @@ public interface Manager {
  */
 default String rotateSessionId(Session session) {
 String newSessionId = null;
-// Assume there new Id is a duplicate until we prove it isn't. The
+// Assume the new Id is a duplicate until we prove it isn't. The
 // chances of a duplicate are extremely low but the current ManagerBase
 // code protects against duplicates so this default method does too.
 boolean duplicate = true;


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



[tomcat] branch 10.1.x updated: Use try-with-resources to avoid potential resource leak

2023-07-05 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 9fe0c374a9 Use try-with-resources to avoid potential resource leak
9fe0c374a9 is described below

commit 9fe0c374a9b1a6cf98fd92099169ffa9dc2bae4c
Author: Mark Thomas 
AuthorDate: Wed Jul 5 14:27:44 2023 +0100

Use try-with-resources to avoid potential resource leak

Identified by Coverity Scan
---
 java/org/apache/catalina/ssi/SSIServlet.java | 24 
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/java/org/apache/catalina/ssi/SSIServlet.java 
b/java/org/apache/catalina/ssi/SSIServlet.java
index 30cfff4e34..c77ffaac4a 100644
--- a/java/org/apache/catalina/ssi/SSIServlet.java
+++ b/java/org/apache/catalina/ssi/SSIServlet.java
@@ -215,19 +215,19 @@ public class SSIServlet extends HttpServlet {
 } else {
 isr = new InputStreamReader(resourceInputStream, encoding);
 }
-BufferedReader bufferedReader = new BufferedReader(isr);
 
-long lastModified = ssiProcessor.process(bufferedReader,
-resourceInfo.getLastModified(), printWriter);
-if (lastModified > 0) {
-res.setDateHeader("last-modified", lastModified);
+try (BufferedReader bufferedReader = new BufferedReader(isr)) {
+long lastModified = ssiProcessor.process(bufferedReader,
+resourceInfo.getLastModified(), printWriter);
+if (lastModified > 0) {
+res.setDateHeader("last-modified", lastModified);
+}
+if (buffered) {
+printWriter.flush();
+@SuppressWarnings("null")
+String text = stringWriter.toString();
+res.getWriter().write(text);
+}
 }
-if (buffered) {
-printWriter.flush();
-@SuppressWarnings("null")
-String text = stringWriter.toString();
-res.getWriter().write(text);
-}
-bufferedReader.close();
 }
 }


-
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: Use try-with-resources to avoid potential resource leak

2023-07-05 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 32e79883d0 Use try-with-resources to avoid potential resource leak
32e79883d0 is described below

commit 32e79883d075e239a836d3506932b643e4c9f054
Author: Mark Thomas 
AuthorDate: Wed Jul 5 14:27:44 2023 +0100

Use try-with-resources to avoid potential resource leak

Identified by Coverity Scan
---
 java/org/apache/catalina/ssi/SSIServlet.java | 24 
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/java/org/apache/catalina/ssi/SSIServlet.java 
b/java/org/apache/catalina/ssi/SSIServlet.java
index 17cb5e116a..1adb61ed79 100644
--- a/java/org/apache/catalina/ssi/SSIServlet.java
+++ b/java/org/apache/catalina/ssi/SSIServlet.java
@@ -217,19 +217,19 @@ public class SSIServlet extends HttpServlet {
 } else {
 isr = new InputStreamReader(resourceInputStream, encoding);
 }
-BufferedReader bufferedReader = new BufferedReader(isr);
 
-long lastModified = ssiProcessor.process(bufferedReader,
-resourceInfo.getLastModified(), printWriter);
-if (lastModified > 0) {
-res.setDateHeader("last-modified", lastModified);
+try (BufferedReader bufferedReader = new BufferedReader(isr)) {
+long lastModified = ssiProcessor.process(bufferedReader,
+resourceInfo.getLastModified(), printWriter);
+if (lastModified > 0) {
+res.setDateHeader("last-modified", lastModified);
+}
+if (buffered) {
+printWriter.flush();
+@SuppressWarnings("null")
+String text = stringWriter.toString();
+res.getWriter().write(text);
+}
 }
-if (buffered) {
-printWriter.flush();
-@SuppressWarnings("null")
-String text = stringWriter.toString();
-res.getWriter().write(text);
-}
-bufferedReader.close();
 }
 }


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



[tomcat] branch 9.0.x updated: Use try-with-resources to avoid potential resource leak

2023-07-05 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 0c4e6ee7c3 Use try-with-resources to avoid potential resource leak
0c4e6ee7c3 is described below

commit 0c4e6ee7c32cf211d924c3d4fff5ab68ee47bcc3
Author: Mark Thomas 
AuthorDate: Wed Jul 5 14:27:44 2023 +0100

Use try-with-resources to avoid potential resource leak

Identified by Coverity Scan
---
 java/org/apache/catalina/ssi/SSIServlet.java | 24 
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/java/org/apache/catalina/ssi/SSIServlet.java 
b/java/org/apache/catalina/ssi/SSIServlet.java
index 6a21b1cbab..33c192ffd5 100644
--- a/java/org/apache/catalina/ssi/SSIServlet.java
+++ b/java/org/apache/catalina/ssi/SSIServlet.java
@@ -215,19 +215,19 @@ public class SSIServlet extends HttpServlet {
 } else {
 isr = new InputStreamReader(resourceInputStream, encoding);
 }
-BufferedReader bufferedReader = new BufferedReader(isr);
 
-long lastModified = ssiProcessor.process(bufferedReader,
-resourceInfo.getLastModified(), printWriter);
-if (lastModified > 0) {
-res.setDateHeader("last-modified", lastModified);
+try (BufferedReader bufferedReader = new BufferedReader(isr)) {
+long lastModified = ssiProcessor.process(bufferedReader,
+resourceInfo.getLastModified(), printWriter);
+if (lastModified > 0) {
+res.setDateHeader("last-modified", lastModified);
+}
+if (buffered) {
+printWriter.flush();
+@SuppressWarnings("null")
+String text = stringWriter.toString();
+res.getWriter().write(text);
+}
 }
-if (buffered) {
-printWriter.flush();
-@SuppressWarnings("null")
-String text = stringWriter.toString();
-res.getWriter().write(text);
-}
-bufferedReader.close();
 }
 }


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



[tomcat] branch main updated: Use try-with-resources to avoid potential resource leak

2023-07-05 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 c931c84f1a Use try-with-resources to avoid potential resource leak
c931c84f1a is described below

commit c931c84f1ad360aa47bd354ce16d36a6d059498d
Author: Mark Thomas 
AuthorDate: Wed Jul 5 14:27:44 2023 +0100

Use try-with-resources to avoid potential resource leak

Identified by Coverity Scan
---
 java/org/apache/catalina/ssi/SSIServlet.java | 24 
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/java/org/apache/catalina/ssi/SSIServlet.java 
b/java/org/apache/catalina/ssi/SSIServlet.java
index 30cfff4e34..c77ffaac4a 100644
--- a/java/org/apache/catalina/ssi/SSIServlet.java
+++ b/java/org/apache/catalina/ssi/SSIServlet.java
@@ -215,19 +215,19 @@ public class SSIServlet extends HttpServlet {
 } else {
 isr = new InputStreamReader(resourceInputStream, encoding);
 }
-BufferedReader bufferedReader = new BufferedReader(isr);
 
-long lastModified = ssiProcessor.process(bufferedReader,
-resourceInfo.getLastModified(), printWriter);
-if (lastModified > 0) {
-res.setDateHeader("last-modified", lastModified);
+try (BufferedReader bufferedReader = new BufferedReader(isr)) {
+long lastModified = ssiProcessor.process(bufferedReader,
+resourceInfo.getLastModified(), printWriter);
+if (lastModified > 0) {
+res.setDateHeader("last-modified", lastModified);
+}
+if (buffered) {
+printWriter.flush();
+@SuppressWarnings("null")
+String text = stringWriter.toString();
+res.getWriter().write(text);
+}
 }
-if (buffered) {
-printWriter.flush();
-@SuppressWarnings("null")
-String text = stringWriter.toString();
-res.getWriter().write(text);
-}
-bufferedReader.close();
 }
 }


-
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: Re-order to avoid resource leak if invalid timeout specified

2023-07-05 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 8d3ab06f94 Re-order to avoid resource leak if invalid timeout specified
8d3ab06f94 is described below

commit 8d3ab06f94db6bfaaf4e85c1176515a924eff7f6
Author: Mark Thomas 
AuthorDate: Wed Jul 5 14:18:56 2023 +0100

Re-order to avoid resource leak if invalid timeout specified

Identified by Coverity Scan
---
 java/org/apache/tomcat/websocket/WsWebSocketContainer.java | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/java/org/apache/tomcat/websocket/WsWebSocketContainer.java 
b/java/org/apache/tomcat/websocket/WsWebSocketContainer.java
index 75cd966e45..847c77f68c 100644
--- a/java/org/apache/tomcat/websocket/WsWebSocketContainer.java
+++ b/java/org/apache/tomcat/websocket/WsWebSocketContainer.java
@@ -260,13 +260,6 @@ public class WsWebSocketContainer implements 
WebSocketContainer, BackgroundProce
 }
 ByteBuffer request = createRequest(path, reqHeaders);
 
-AsynchronousSocketChannel socketChannel;
-try {
-socketChannel = 
AsynchronousSocketChannel.open(getAsynchronousChannelGroup());
-} catch (IOException ioe) {
-throw new 
DeploymentException(sm.getString("wsWebSocketContainer.asynchronousSocketChannelFail"),
 ioe);
-}
-
 // Get the connection timeout
 long timeout = Constants.IO_TIMEOUT_MS_DEFAULT;
 String timeoutValue = (String) 
userProperties.get(Constants.IO_TIMEOUT_MS_PROPERTY);
@@ -274,6 +267,13 @@ public class WsWebSocketContainer implements 
WebSocketContainer, BackgroundProce
 timeout = Long.valueOf(timeoutValue).intValue();
 }
 
+AsynchronousSocketChannel socketChannel;
+try {
+socketChannel = 
AsynchronousSocketChannel.open(getAsynchronousChannelGroup());
+} catch (IOException ioe) {
+throw new 
DeploymentException(sm.getString("wsWebSocketContainer.asynchronousSocketChannelFail"),
 ioe);
+}
+
 // Set-up
 // Same size as the WsFrame input buffer
 ByteBuffer response = 
ByteBuffer.allocate(getDefaultMaxBinaryMessageBufferSize());


-
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: Re-order to avoid resource leak if invalid timeout specified

2023-07-05 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 3302082915 Re-order to avoid resource leak if invalid timeout specified
3302082915 is described below

commit 3302082915feb2c27171616f63e674c78a02281c
Author: Mark Thomas 
AuthorDate: Wed Jul 5 14:18:56 2023 +0100

Re-order to avoid resource leak if invalid timeout specified

Identified by Coverity Scan
---
 java/org/apache/tomcat/websocket/WsWebSocketContainer.java | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/java/org/apache/tomcat/websocket/WsWebSocketContainer.java 
b/java/org/apache/tomcat/websocket/WsWebSocketContainer.java
index 4292702f11..6655a2cb71 100644
--- a/java/org/apache/tomcat/websocket/WsWebSocketContainer.java
+++ b/java/org/apache/tomcat/websocket/WsWebSocketContainer.java
@@ -260,13 +260,6 @@ public class WsWebSocketContainer implements 
WebSocketContainer, BackgroundProce
 }
 ByteBuffer request = createRequest(path, reqHeaders);
 
-AsynchronousSocketChannel socketChannel;
-try {
-socketChannel = 
AsynchronousSocketChannel.open(getAsynchronousChannelGroup());
-} catch (IOException ioe) {
-throw new 
DeploymentException(sm.getString("wsWebSocketContainer.asynchronousSocketChannelFail"),
 ioe);
-}
-
 // Get the connection timeout
 long timeout = Constants.IO_TIMEOUT_MS_DEFAULT;
 String timeoutValue = (String) 
userProperties.get(Constants.IO_TIMEOUT_MS_PROPERTY);
@@ -274,6 +267,13 @@ public class WsWebSocketContainer implements 
WebSocketContainer, BackgroundProce
 timeout = Long.valueOf(timeoutValue).intValue();
 }
 
+AsynchronousSocketChannel socketChannel;
+try {
+socketChannel = 
AsynchronousSocketChannel.open(getAsynchronousChannelGroup());
+} catch (IOException ioe) {
+throw new 
DeploymentException(sm.getString("wsWebSocketContainer.asynchronousSocketChannelFail"),
 ioe);
+}
+
 // Set-up
 // Same size as the WsFrame input buffer
 ByteBuffer response = 
ByteBuffer.allocate(getDefaultMaxBinaryMessageBufferSize());


-
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: Re-order to avoid resource leak if invalid timeout specified

2023-07-05 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 0499b0d613 Re-order to avoid resource leak if invalid timeout specified
0499b0d613 is described below

commit 0499b0d613737c43c92c00c4e637ea28989108f0
Author: Mark Thomas 
AuthorDate: Wed Jul 5 14:18:56 2023 +0100

Re-order to avoid resource leak if invalid timeout specified

Identified by Coverity Scan
---
 java/org/apache/tomcat/websocket/WsWebSocketContainer.java | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/java/org/apache/tomcat/websocket/WsWebSocketContainer.java 
b/java/org/apache/tomcat/websocket/WsWebSocketContainer.java
index 5b8ac49ba1..2e4d015a5f 100644
--- a/java/org/apache/tomcat/websocket/WsWebSocketContainer.java
+++ b/java/org/apache/tomcat/websocket/WsWebSocketContainer.java
@@ -261,13 +261,6 @@ public class WsWebSocketContainer implements 
WebSocketContainer, BackgroundProce
 }
 ByteBuffer request = createRequest(path, reqHeaders);
 
-AsynchronousSocketChannel socketChannel;
-try {
-socketChannel = 
AsynchronousSocketChannel.open(getAsynchronousChannelGroup());
-} catch (IOException ioe) {
-throw new 
DeploymentException(sm.getString("wsWebSocketContainer.asynchronousSocketChannelFail"),
 ioe);
-}
-
 // Get the connection timeout
 long timeout = Constants.IO_TIMEOUT_MS_DEFAULT;
 String timeoutValue = (String) 
userProperties.get(Constants.IO_TIMEOUT_MS_PROPERTY);
@@ -275,6 +268,13 @@ public class WsWebSocketContainer implements 
WebSocketContainer, BackgroundProce
 timeout = Long.valueOf(timeoutValue).intValue();
 }
 
+AsynchronousSocketChannel socketChannel;
+try {
+socketChannel = 
AsynchronousSocketChannel.open(getAsynchronousChannelGroup());
+} catch (IOException ioe) {
+throw new 
DeploymentException(sm.getString("wsWebSocketContainer.asynchronousSocketChannelFail"),
 ioe);
+}
+
 // Set-up
 // Same size as the WsFrame input buffer
 ByteBuffer response = 
ByteBuffer.allocate(getDefaultMaxBinaryMessageBufferSize());


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



[tomcat] branch main updated: Re-order to avoid resource leak if invalid timeout specified

2023-07-05 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 9ee2a2f63e Re-order to avoid resource leak if invalid timeout specified
9ee2a2f63e is described below

commit 9ee2a2f63ed0b683c8ab79e8038f82d45f316bb9
Author: Mark Thomas 
AuthorDate: Wed Jul 5 14:18:56 2023 +0100

Re-order to avoid resource leak if invalid timeout specified

Identified by Coverity Scan
---
 java/org/apache/tomcat/websocket/WsWebSocketContainer.java | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/java/org/apache/tomcat/websocket/WsWebSocketContainer.java 
b/java/org/apache/tomcat/websocket/WsWebSocketContainer.java
index bb5fd4b00d..0750be7eea 100644
--- a/java/org/apache/tomcat/websocket/WsWebSocketContainer.java
+++ b/java/org/apache/tomcat/websocket/WsWebSocketContainer.java
@@ -255,13 +255,6 @@ public class WsWebSocketContainer implements 
WebSocketContainer, BackgroundProce
 }
 ByteBuffer request = createRequest(path, reqHeaders);
 
-AsynchronousSocketChannel socketChannel;
-try {
-socketChannel = 
AsynchronousSocketChannel.open(getAsynchronousChannelGroup());
-} catch (IOException ioe) {
-throw new 
DeploymentException(sm.getString("wsWebSocketContainer.asynchronousSocketChannelFail"),
 ioe);
-}
-
 // Get the connection timeout
 long timeout = Constants.IO_TIMEOUT_MS_DEFAULT;
 String timeoutValue = (String) 
userProperties.get(Constants.IO_TIMEOUT_MS_PROPERTY);
@@ -269,6 +262,13 @@ public class WsWebSocketContainer implements 
WebSocketContainer, BackgroundProce
 timeout = Long.valueOf(timeoutValue).intValue();
 }
 
+AsynchronousSocketChannel socketChannel;
+try {
+socketChannel = 
AsynchronousSocketChannel.open(getAsynchronousChannelGroup());
+} catch (IOException ioe) {
+throw new 
DeploymentException(sm.getString("wsWebSocketContainer.asynchronousSocketChannelFail"),
 ioe);
+}
+
 // Set-up
 // Same size as the WsFrame input buffer
 ByteBuffer response = 
ByteBuffer.allocate(getDefaultMaxBinaryMessageBufferSize());


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



[tomcat] branch 10.1.x updated: Use try-with-resources

2023-07-05 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 bd1393b71f Use try-with-resources
bd1393b71f is described below

commit bd1393b71ff5d24ab3bea233095506b295fbafce
Author: Mark Thomas 
AuthorDate: Wed Jul 5 14:08:47 2023 +0100

Use try-with-resources

Stop Coverity Scan complaining
---
 .../apache/tomcat/buildutil/MimeTypeMappings.java  | 22 ++
 1 file changed, 10 insertions(+), 12 deletions(-)

diff --git a/java/org/apache/tomcat/buildutil/MimeTypeMappings.java 
b/java/org/apache/tomcat/buildutil/MimeTypeMappings.java
index 1190a628f6..3f467ad7d5 100644
--- a/java/org/apache/tomcat/buildutil/MimeTypeMappings.java
+++ b/java/org/apache/tomcat/buildutil/MimeTypeMappings.java
@@ -52,21 +52,19 @@ public class MimeTypeMappings {
 SortedMap sortedWebXmlMimeMappings = new 
TreeMap<>(webXmlMimeMappings);
 
 File f = new 
File("java/org/apache/catalina/startup/MimeTypeMappings.properties");
-FileOutputStream fos = new FileOutputStream(f);
-Writer w = new OutputStreamWriter(fos, StandardCharsets.US_ASCII);
+try (FileOutputStream fos = new FileOutputStream(f);
+Writer w = new OutputStreamWriter(fos, 
StandardCharsets.US_ASCII)) {
 
-Utils.insertLicense(w);
+Utils.insertLicense(w);
 
-w.write(System.lineSeparator());
-
-for (Map.Entry mapping : 
sortedWebXmlMimeMappings.entrySet()) {
-w.write(mapping.getKey());
-w.write("=");
-w.write(mapping.getValue());
 w.write(System.lineSeparator());
-}
 
-w.close();
-fos.close();
+for (Map.Entry mapping : 
sortedWebXmlMimeMappings.entrySet()) {
+w.write(mapping.getKey());
+w.write("=");
+w.write(mapping.getValue());
+w.write(System.lineSeparator());
+}
+}
 }
 }


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



[tomcat] branch main updated: Use try-with-resources

2023-07-05 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 2d932ec02c Use try-with-resources
2d932ec02c is described below

commit 2d932ec02c19110e20b32b46e29c1aee1d08f7c0
Author: Mark Thomas 
AuthorDate: Wed Jul 5 14:08:47 2023 +0100

Use try-with-resources

Stop Coverity Scan complaining
---
 .../apache/tomcat/buildutil/MimeTypeMappings.java  | 22 ++
 1 file changed, 10 insertions(+), 12 deletions(-)

diff --git a/java/org/apache/tomcat/buildutil/MimeTypeMappings.java 
b/java/org/apache/tomcat/buildutil/MimeTypeMappings.java
index 1190a628f6..3f467ad7d5 100644
--- a/java/org/apache/tomcat/buildutil/MimeTypeMappings.java
+++ b/java/org/apache/tomcat/buildutil/MimeTypeMappings.java
@@ -52,21 +52,19 @@ public class MimeTypeMappings {
 SortedMap sortedWebXmlMimeMappings = new 
TreeMap<>(webXmlMimeMappings);
 
 File f = new 
File("java/org/apache/catalina/startup/MimeTypeMappings.properties");
-FileOutputStream fos = new FileOutputStream(f);
-Writer w = new OutputStreamWriter(fos, StandardCharsets.US_ASCII);
+try (FileOutputStream fos = new FileOutputStream(f);
+Writer w = new OutputStreamWriter(fos, 
StandardCharsets.US_ASCII)) {
 
-Utils.insertLicense(w);
+Utils.insertLicense(w);
 
-w.write(System.lineSeparator());
-
-for (Map.Entry mapping : 
sortedWebXmlMimeMappings.entrySet()) {
-w.write(mapping.getKey());
-w.write("=");
-w.write(mapping.getValue());
 w.write(System.lineSeparator());
-}
 
-w.close();
-fos.close();
+for (Map.Entry mapping : 
sortedWebXmlMimeMappings.entrySet()) {
+w.write(mapping.getKey());
+w.write("=");
+w.write(mapping.getValue());
+w.write(System.lineSeparator());
+}
+}
 }
 }


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



Re: [VOTE] Release Apache Tomcat 11.0.0-M9

2023-07-05 Thread Mark Thomas

On 04/07/2023 12:00, Mark Thomas wrote:


The proposed 11.0.0-M9 release is:
[ ] -1 Broken - do not release
[X] +1 Alpha  - go ahead and release as 11.0.0-M9


Build is reproducible.

Tests pass on Linux, Windows and MacOS.

Mark

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