(tomcat) branch main updated: Add since markers for new EL classes

2024-07-22 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 fe4a8921de Add since markers for new EL classes
fe4a8921de is described below

commit fe4a8921dedd6c2de23db44089011411fdb8479f
Author: Mark Thomas 
AuthorDate: Mon Jul 22 09:45:10 2024 +0100

Add since markers for new EL classes
---
 java/jakarta/el/OptionalELResolver.java | 2 ++
 java/jakarta/el/RecordELResolver.java   | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/java/jakarta/el/OptionalELResolver.java 
b/java/jakarta/el/OptionalELResolver.java
index f8ff316305..5a6880278e 100644
--- a/java/jakarta/el/OptionalELResolver.java
+++ b/java/jakarta/el/OptionalELResolver.java
@@ -25,6 +25,8 @@ import java.util.Optional;
  * This resolver handles base objects that are instances of {@link Optional}.
  * 
  * This resolver is always a read-only resolver since {@link Optional} 
instances are immutable.
+ *
+ * @since EL 6.0
  */
 public class OptionalELResolver extends ELResolver {
 
diff --git a/java/jakarta/el/RecordELResolver.java 
b/java/jakarta/el/RecordELResolver.java
index fcb70fe7e9..e9cbae380f 100644
--- a/java/jakarta/el/RecordELResolver.java
+++ b/java/jakarta/el/RecordELResolver.java
@@ -30,6 +30,8 @@ import java.util.Objects;
  * 
  * {@code ELResolver}s are combined together using {@link 
CompositeELResolver}s to define rich semantics for evaluating
  * an expression. See the javadocs for {@link ELResolver} for details.
+ *
+ * @since EL 6.0
  */
 public class RecordELResolver extends ELResolver {
 


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



(tomcat-tck) branch main updated (85d7b66 -> 87610eb)

2024-07-22 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-tck.git


from 85d7b66  Update to use final rather than staged locations
 new 5d9fac1  Add new module to download TCKs plus a few version updates
 new 836e9cc  Signature tests should use same JAR as the rest of the TCK
 new e59  Use sigtest 2.2 until issue with TCK/sigtest 2.3 is fixed
 new 87610eb  EL TCK has been updated

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


Summary of changes:
 README.md |  55 --
 download/pom.xml  | 193 ++
 jsp-tck/pom.xml   |   4 +-
 pom.xml   |  14 +++-
 servlet-tck/pom.xml   |   6 +-
 websocket-tck/pom.xml |   4 +-
 6 files changed, 211 insertions(+), 65 deletions(-)
 create mode 100644 download/pom.xml


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



(tomcat-tck) 03/04: Use sigtest 2.2 until issue with TCK/sigtest 2.3 is fixed

2024-07-22 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-tck.git

commit e59c0aaf67dc3fa4aee6325ee6bf957b0205
Author: Mark Thomas 
AuthorDate: Sat Jul 20 11:39:37 2024 +0100

Use sigtest 2.2 until issue with TCK/sigtest 2.3 is fixed
---
 el-tck/pom.xml | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/el-tck/pom.xml b/el-tck/pom.xml
index f57fb63..6f4e7d3 100644
--- a/el-tck/pom.xml
+++ b/el-tck/pom.xml
@@ -59,6 +59,12 @@
 
 -->
 
+
+
+jakarta.tck
+sigtest-maven-plugin
+2.2
+
 
 
 


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



(tomcat-tck) 01/04: Add new module to download TCKs plus a few version updates

2024-07-22 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-tck.git

commit 5d9fac152c928971ec36c31465ac1834e5b0b756
Author: Mark Thomas 
AuthorDate: Fri Jul 19 20:59:33 2024 +0100

Add new module to download TCKs plus a few version updates
---
 README.md |  55 --
 download/pom.xml  | 193 ++
 jsp-tck/pom.xml   |   4 +-
 pom.xml   |  14 +++-
 servlet-tck/pom.xml   |   6 +-
 websocket-tck/pom.xml |   2 +-
 6 files changed, 210 insertions(+), 64 deletions(-)

diff --git a/README.md b/README.md
index 9d1c979..6391e0d 100644
--- a/README.md
+++ b/README.md
@@ -37,58 +37,3 @@ At the moment, you will need to manually install the TCKs 
into your local Maven
 1. `cd $TOMCAT_TCK\jsp-tck`
 
 1. `mvn verify`
-
-### Installing the TCKs
-
- Expression Language TCK
-
-1. Download the EL TCK from 
https://download.eclipse.org/jakartaee/expression-language/6.0/jakarta-expression-language-tck-6.0.0.zip
-
-1. Extract the contents
-
-1. `cd el-tck/artifacts`
-
-1. Install the TCK JAR into the local Maven repository
-   `mvn org.apache.Maven.plugins:Maven-install-plugin:3.1.1:install-file 
-Dfile=jakarta-expression-language-tck-6.0.0.jar`
-
-1. Edit the POM created in your local Maven repository to update the version 
for the parent (jakarta.tck:project) from 10.0.0-SNAPSHOT to 11.0.0-M1
-
- WebSocket TCK
-
-1. Download the WebSocket TCK from 
https://download.eclipse.org/jakartaee/websocket/2.2/jakarta-websocket-tck-2.2.0.zip
-
-1. Extract the contents
-
-1. `cd websocket-tck/artifacts`
-
-1. Install the TCK JARs into the local Maven repository
-   `artifact-install.sh`
-
- Pages TCK
-
-1. Download the Pages TCK from 
https://download.eclipse.org/jakartaee/pages/4.0/jakarta-pages-tck-4.0.0.zip
-
-1. Extract the contents
-
-1. `cd pages-tck/artifacts`
-
-1. Install the TCK JARs into the local Maven repository
-   `mvn org.apache.Maven.plugins:Maven-install-plugin:3.1.1:install-file 
-Dfile=jakarta-pages-tck-4.0.0.jar`
-
-1. Check out the https://github.com/jakartaee/platform-tck repository
-
-1. `cd platform-tck\lib`
-
-1. Install the javatest JAR into the local Maven repository
-   `mvn install:install-file -Dfile=javatest.jar -DgroupId=javatest 
-DartifactId=javatest -Dversion=5.0 -Dpackaging=jar`
-
- Servlet TCK
-
-1. Download the Pages TCK from 
https://download.eclipse.org/jakartaee/servlet/6.1/jakarta-servlet-tck-6.1.0.zip
-
-1. Extract the contents
-
-1. `cd servlet-tck/artifacts`
-
-1. Install the TCK JARs into the local Maven repository
-   `artifact-install.sh`
diff --git a/download/pom.xml b/download/pom.xml
new file mode 100644
index 000..8862fed
--- /dev/null
+++ b/download/pom.xml
@@ -0,0 +1,193 @@
+
+
+http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+download
+pom
+4.0.0
+
+
+org.apache.tomcat
+tck
+11.0.0-SNAPSHOT
+../pom.xml
+
+
+
+
+
+com.googlecode.maven-download-plugin
+download-maven-plugin
+${download.maven.plugin.version}
+
+
+download-el-tck
+pre-integration-test
+
+wget
+
+
+
+
+
+
https://download.eclipse.org/ee4j/jakartaee-tck/jakartaee11/staged/eftl/jakarta-expression-language-tck-6.0.1.zip
+true
+
${project.build.directory}
+
bd16049bb853e7e71b75feca9b37f0931f5619694551afc87389267a23ca324f
+
+
+
+download-websocket-tck
+pre-integration-test
+
+wget
+
+
+
https://download.eclipse.org/jakartaee/websocket/2.2/jakarta-websocket-tck-${tck.websocket.version}.zip
+true
+
${project.build.directory}
+
ff50825305bd1318a4e6bdfab21b829cfd8cf89fab8a970f007b52636d3f2629
+
+
+
+download-servlet-tck
+pre-integration-test
+
+wget
+
+
+
https://download.eclipse.org/jakartaee/servlet/6.1/jakarta-servlet-tck-

(tomcat-tck) 04/04: EL TCK has been updated

2024-07-22 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-tck.git

commit 87610eba1c7b4f48337d9b41b8bd43b0e4fbdd9d
Author: Mark Thomas 
AuthorDate: Sat Jul 20 19:48:05 2024 +0100

EL TCK has been updated
---
 download/pom.xml | 2 +-
 el-tck/pom.xml   | 6 --
 2 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/download/pom.xml b/download/pom.xml
index 8862fed..a8cc541 100644
--- a/download/pom.xml
+++ b/download/pom.xml
@@ -50,7 +50,7 @@
 
https://download.eclipse.org/ee4j/jakartaee-tck/jakartaee11/staged/eftl/jakarta-expression-language-tck-6.0.1.zip
 true
 
${project.build.directory}
-
bd16049bb853e7e71b75feca9b37f0931f5619694551afc87389267a23ca324f
+
8ca4339e1b93c8f490c38b5888d8a54d09f7d12257b222bff2d44d665f323cee
 
 
 
diff --git a/el-tck/pom.xml b/el-tck/pom.xml
index 6f4e7d3..f57fb63 100644
--- a/el-tck/pom.xml
+++ b/el-tck/pom.xml
@@ -59,12 +59,6 @@
 
 -->
 
-
-
-jakarta.tck
-sigtest-maven-plugin
-2.2
-
 
 
 


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



(tomcat-tck) 02/04: Signature tests should use same JAR as the rest of the TCK

2024-07-22 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-tck.git

commit 836e9cc04efcf8a138c4fa9e75cf73da865f07bd
Author: Mark Thomas 
AuthorDate: Sat Jul 20 11:39:06 2024 +0100

Signature tests should use same JAR as the rest of the TCK
---
 websocket-tck/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/websocket-tck/pom.xml b/websocket-tck/pom.xml
index 095a7c8..29ac13b 100644
--- a/websocket-tck/pom.xml
+++ b/websocket-tck/pom.xml
@@ -137,7 +137,7 @@
 j2ee
 
com.sun.ts.tests.websocket.lib.implementation.sun.common.SunRIURL
 
0
-
${settings.localRepository}/org/apache/tomcat/tomcat-websocket-api/${tomcat.version}/tomcat-websocket-api-${tomcat.version}.jar:${settings.localRepository}/org/apache/tomcat/tomcat-websocket-client-api/${tomcat.version}/tomcat-websocket-client-api-${tomcat.version}.jar:${env.JAVA_HOME}/jmods/java.base
+
${settings.localRepository}/org/apache/tomcat/embed/tomcat-embed-websocket/${tomcat.version}/tomcat-embed-websocket-${tomcat.version}.jar:${env.JAVA_HOME}/jmods/java.base
 
 
target/failsafe-reports/failsafe-summary-http.xml
 


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



(tomcat-tck) branch main updated: First attempt to run TCKs on a daily basis

2024-07-22 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-tck.git


The following commit(s) were added to refs/heads/main by this push:
 new 6791e95  First attempt to run TCKs on a daily basis
6791e95 is described below

commit 6791e955281fe71b8c4297601f5affd9081771b7
Author: Mark Thomas 
AuthorDate: Mon Jul 22 11:51:29 2024 +0100

First attempt to run TCKs on a daily basis
---
 .github/workflows/ci.yml | 52 
 1 file changed, 52 insertions(+)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 000..f5724e8
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,52 @@
+#Licensed under the Apache License, Version 2.0 (the "License");
+#you may not use this file except in compliance with the License.
+#You may obtain a copy of the License at
+#
+#http://www.apache.org/licenses/LICENSE-2.0
+#
+#Unless required by applicable law or agreed to in writing, software
+#distributed under the License is distributed on an "AS IS" BASIS,
+#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#See the License for the specific language governing permissions and
+#limitations under the License.
+
+name: TCK testing
+
+on:
+  schedule:
+- cron: '5 8 * * *'
+
+env:
+  LC_ALL: en_US.UTF-8
+
+jobs:
+  JDK_OS_Matrix:
+strategy:
+  fail-fast: false
+  matrix:
+java: [ 17, 21 ]
+os: [ ubuntu-latest, windows-latest, macos-latest ]
+name: JDK${{ matrix.java }} ${{ matrix.os }}
+  runs-on: ${{ matrix.os }}
+  steps:
+  - name: Git Checkout
+uses: actions/checkout@v4
+  - name: Set up Java
+uses: actions/setup-java@v4
+with:
+  java-version: ${{ matrix.java }}
+  distribution: zulu
+  - name: Build
+run: mvn verify
+continue-on-error:
+  true
+  - name: Upload logs
+uses: actions/upload-artifact@v4
+with:
+  name: JDK${{ matrix.java }}-${{ matrix.os }}-logs
+  path: |
+el-tck/target/failsafe-reports/*
+jsp-tck/target/failsafe-reports/*
+servlet-tck/target/failsafe-reports/*
+websocket-tck/target/failsafe-reports/*
+  retention-days: 7


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



(tomcat-tck) branch main updated: Fix indent

2024-07-22 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-tck.git


The following commit(s) were added to refs/heads/main by this push:
 new 18ad9bc  Fix indent
18ad9bc is described below

commit 18ad9bcfe63fc48dffa00574145f2f223916fce6
Author: Mark Thomas 
AuthorDate: Mon Jul 22 11:52:56 2024 +0100

Fix indent
---
 .github/workflows/ci.yml | 46 +++---
 1 file changed, 23 insertions(+), 23 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index f5724e8..b94b00c 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -27,26 +27,26 @@ jobs:
 java: [ 17, 21 ]
 os: [ ubuntu-latest, windows-latest, macos-latest ]
 name: JDK${{ matrix.java }} ${{ matrix.os }}
-  runs-on: ${{ matrix.os }}
-  steps:
-  - name: Git Checkout
-uses: actions/checkout@v4
-  - name: Set up Java
-uses: actions/setup-java@v4
-with:
-  java-version: ${{ matrix.java }}
-  distribution: zulu
-  - name: Build
-run: mvn verify
-continue-on-error:
-  true
-  - name: Upload logs
-uses: actions/upload-artifact@v4
-with:
-  name: JDK${{ matrix.java }}-${{ matrix.os }}-logs
-  path: |
-el-tck/target/failsafe-reports/*
-jsp-tck/target/failsafe-reports/*
-servlet-tck/target/failsafe-reports/*
-websocket-tck/target/failsafe-reports/*
-  retention-days: 7
+runs-on: ${{ matrix.os }}
+steps:
+- name: Git Checkout
+  uses: actions/checkout@v4
+- name: Set up Java
+  uses: actions/setup-java@v4
+  with:
+java-version: ${{ matrix.java }}
+distribution: zulu
+- name: Build
+  run: mvn verify
+  continue-on-error:
+true
+- name: Upload logs
+  uses: actions/upload-artifact@v4
+  with:
+name: JDK${{ matrix.java }}-${{ matrix.os }}-logs
+path: |
+  el-tck/target/failsafe-reports/*
+  jsp-tck/target/failsafe-reports/*
+  servlet-tck/target/failsafe-reports/*
+  websocket-tck/target/failsafe-reports/*
+retention-days: 7


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



(tomcat-tck) branch main updated: Enable manual triggering

2024-07-22 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-tck.git


The following commit(s) were added to refs/heads/main by this push:
 new 7e9a079  Enable manual triggering
7e9a079 is described below

commit 7e9a0796086186d8c564a33847d7bcdc64046746
Author: Mark Thomas 
AuthorDate: Mon Jul 22 11:56:06 2024 +0100

Enable manual triggering
---
 .github/workflows/ci.yml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index b94b00c..dc33b98 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -15,7 +15,8 @@ name: TCK testing
 on:
   schedule:
 - cron: '5 8 * * *'
-
+  workflow_dispatch:
+
 env:
   LC_ALL: en_US.UTF-8
 


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



(tomcat-tck) branch main updated: Add the location of the ASF snapshot repository

2024-07-22 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-tck.git


The following commit(s) were added to refs/heads/main by this push:
 new c5d3c58  Add the location of the ASF snapshot repository
c5d3c58 is described below

commit c5d3c5819ab4e09d5e1392a644557191de536605
Author: Mark Thomas 
AuthorDate: Mon Jul 22 11:59:44 2024 +0100

Add the location of the ASF snapshot repository
---
 pom.xml | 4 
 1 file changed, 4 insertions(+)

diff --git a/pom.xml b/pom.xml
index ef282f7..17d2194 100644
--- a/pom.xml
+++ b/pom.xml
@@ -56,6 +56,10 @@
 
 
 
+
+asf-snapshots
+https://repository.apache.org/content/groups/snapshots/
+
 
 jakarta-staging
 
https://jakarta.oss.sonatype.org/content/repositories/staging/


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



(tomcat-tck) branch main updated: Ensure TCK failures fail the job

2024-07-22 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-tck.git


The following commit(s) were added to refs/heads/main by this push:
 new e7c4c16  Ensure TCK failures fail the job
e7c4c16 is described below

commit e7c4c16bc53b52aa35c0b712fbe1390094e1a728
Author: Mark Thomas 
AuthorDate: Mon Jul 22 12:03:24 2024 +0100

Ensure TCK failures fail the job
---
 .github/workflows/ci.yml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index dc33b98..f2fdcbd 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -29,6 +29,7 @@ jobs:
 os: [ ubuntu-latest, windows-latest, macos-latest ]
 name: JDK${{ matrix.java }} ${{ matrix.os }}
 runs-on: ${{ matrix.os }}
+continue-on-error: true
 steps:
 - name: Git Checkout
   uses: actions/checkout@v4
@@ -39,8 +40,6 @@ jobs:
 distribution: zulu
 - name: Build
   run: mvn verify
-  continue-on-error:
-true
 - name: Upload logs
   uses: actions/upload-artifact@v4
   with:


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



(tomcat-tck) 01/02: The signature test requires the modules to be extracted from the image

2024-07-22 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-tck.git

commit 4b8976523a11e98697b9a99401e4eb39c48904ac
Author: Mark Thomas 
AuthorDate: Mon Jul 22 13:44:01 2024 +0100

The signature test requires the modules to be extracted from the image
---
 el-tck/pom.xml| 3 ++-
 jsp-tck/pom.xml   | 3 ++-
 servlet-tck/pom.xml   | 3 ++-
 websocket-tck/pom.xml | 3 ++-
 4 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/el-tck/pom.xml b/el-tck/pom.xml
index f57fb63..ba88f1b 100644
--- a/el-tck/pom.xml
+++ b/el-tck/pom.xml
@@ -78,8 +78,9 @@
 
 
org.apache.el.lang.VariableMapperImpl
 true
+
${project.build.directory}/jimage
 
-
${settings.localRepository}/org/apache/tomcat/tomcat-el-api/${tomcat.version}/tomcat-el-api-${tomcat.version}.jar:${env.JAVA_HOME}/jmods/java.base
+
${settings.localRepository}/org/apache/tomcat/tomcat-el-api/${tomcat.version}/tomcat-el-api-${tomcat.version}.jar:${project.build.directory}/jimage/java.base
 
 

(tomcat-tck) branch main updated (e7c4c16 -> 9c34b0f)

2024-07-22 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-tck.git


from e7c4c16  Ensure TCK failures fail the job
 new 4b89765  The signature test requires the modules to be extracted from 
the image
 new 9c34b0f  Stop IDE complaining about a missing dependency

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:
 el-tck/pom.xml| 7 ++-
 jsp-tck/pom.xml   | 7 ++-
 servlet-tck/pom.xml   | 7 ++-
 websocket-tck/pom.xml | 7 ++-
 4 files changed, 24 insertions(+), 4 deletions(-)


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



(tomcat-tck) 02/02: Stop IDE complaining about a missing dependency

2024-07-22 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-tck.git

commit 9c34b0fd965c8f12236c024a0d06e7d457a93bfd
Author: Mark Thomas 
AuthorDate: Mon Jul 22 13:44:24 2024 +0100

Stop IDE complaining about a missing dependency
---
 el-tck/pom.xml| 4 
 jsp-tck/pom.xml   | 4 
 servlet-tck/pom.xml   | 4 
 websocket-tck/pom.xml | 4 
 4 files changed, 16 insertions(+)

diff --git a/el-tck/pom.xml b/el-tck/pom.xml
index ba88f1b..52ae6d8 100644
--- a/el-tck/pom.xml
+++ b/el-tck/pom.xml
@@ -41,6 +41,10 @@
 jakarta.el
 jakarta.el-api
   
+  
+org.netbeans.tools
+ct-sym
+  
 
 
 
diff --git a/jsp-tck/pom.xml b/jsp-tck/pom.xml
index bcb5171..f6a94c6 100644
--- a/jsp-tck/pom.xml
+++ b/jsp-tck/pom.xml
@@ -39,6 +39,10 @@
 jakarta.servlet.jsp
 jakarta.jsp-api
   
+  
+org.netbeans.tools
+ct-sym
+  
 
 
 
diff --git a/servlet-tck/pom.xml b/servlet-tck/pom.xml
index 825ff6e..127bf5e 100644
--- a/servlet-tck/pom.xml
+++ b/servlet-tck/pom.xml
@@ -39,6 +39,10 @@
 jakarta.servlet
 jakarta.servlet-api
   
+  
+org.netbeans.tools
+ct-sym
+  
 
 
 
diff --git a/websocket-tck/pom.xml b/websocket-tck/pom.xml
index e6b2356..0f90b2a 100644
--- a/websocket-tck/pom.xml
+++ b/websocket-tck/pom.xml
@@ -38,6 +38,10 @@
 jakarta.websocket
 jakarta.websocket-client-api
   
+  
+org.netbeans.tools
+ct-sym
+  
 
 
 

(tomcat-tck) branch main updated: Move exclusion to correct place for WebSocket

2024-07-22 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-tck.git


The following commit(s) were added to refs/heads/main by this push:
 new e219269  Move exclusion to correct place for WebSocket
e219269 is described below

commit e219269fb4aa6c03fc1f0f4d51e480024f12
Author: Mark Thomas 
AuthorDate: Mon Jul 22 14:12:40 2024 +0100

Move exclusion to correct place for WebSocket
---
 websocket-tck/pom.xml | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/websocket-tck/pom.xml b/websocket-tck/pom.xml
index 0f90b2a..b38a6df 100644
--- a/websocket-tck/pom.xml
+++ b/websocket-tck/pom.xml
@@ -38,10 +38,6 @@
 jakarta.websocket
 jakarta.websocket-client-api
   
-  
-org.netbeans.tools
-ct-sym
-  
 
 
 

(tomcat-tck) branch main updated: At least one of the TCKs requires javatest.jar

2024-07-22 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-tck.git


The following commit(s) were added to refs/heads/main by this push:
 new 6101ea8  At least one of the TCKs requires javatest.jar
6101ea8 is described below

commit 6101ea82d58b88e1c76eb2df6b75111f4ba6a790
Author: Mark Thomas 
AuthorDate: Mon Jul 22 14:53:51 2024 +0100

At least one of the TCKs requires javatest.jar

This should really be in Maven Central. It isn't, so...
---
 download/pom.xml | 27 +++
 1 file changed, 27 insertions(+)

diff --git a/download/pom.xml b/download/pom.xml
index a8cc541..8825802 100644
--- a/download/pom.xml
+++ b/download/pom.xml
@@ -92,6 +92,19 @@
 
5446aa866601a7c4c425f74054590cfc7f4fc05592a572d399ecc8694e265489
 
 
+
+download-javatest-jar
+pre-integration-test
+
+wget
+
+
+
https://github.com/jakartaee/platform-tck/raw/040a4f57f87342629da0242d1ced99647ac44676/lib/javatest.jar
+false
+
${project.build.directory}
+
73d0c322e76839c405f2000b568cc8906977b430ba23e83f20d420345e8a13a4
+
+
 
 
 
@@ -186,6 +199,20 @@
 
${project.build.directory}/pages-tck/artifacts/jakarta-pages-tck-${tck.pages.version}.jar
 
 
+
+install-javatest-jar
+pre-integration-test
+
+install-file
+
+
+
${project.build.directory}/javatest.jar
+javatest
+javatest
+5.0
+jar
+
+
 
 
 


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



(tomcat-tck) 02/02: Don't persist credentials by default

2024-07-22 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-tck.git

commit b28e5e1833bf2eca62d461e7e4e93b27b1adcd0d
Author: Mark Thomas 
AuthorDate: Mon Jul 22 15:17:34 2024 +0100

Don't persist credentials by default
---
 .github/workflows/ci.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 8bc23b8..2507aa5 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -32,6 +32,7 @@ jobs:
 steps:
 - name: Git Checkout
   uses: actions/checkout@v4
+  persist-credentials: false
 - name: Set up Java
   uses: actions/setup-java@v4
   with:


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



(tomcat-tck) branch main updated (6101ea8 -> b28e5e1)

2024-07-22 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-tck.git


from 6101ea8  At least one of the TCKs requires javatest.jar
 new d1cf5ba  Alternative approach so workflow is marked as failed if any 
jobs fail
 new b28e5e1  Don't persist credentials by default

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:
 .github/workflows/ci.yml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


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



(tomcat-tck) 01/02: Alternative approach so workflow is marked as failed if any jobs fail

2024-07-22 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-tck.git

commit d1cf5ba7f99952a01d22d5f567056606bb1d807f
Author: Mark Thomas 
AuthorDate: Mon Jul 22 15:17:18 2024 +0100

Alternative approach so workflow is marked as failed if any jobs fail
---
 .github/workflows/ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index f2fdcbd..8bc23b8 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -29,7 +29,6 @@ jobs:
 os: [ ubuntu-latest, windows-latest, macos-latest ]
 name: JDK${{ matrix.java }} ${{ matrix.os }}
 runs-on: ${{ matrix.os }}
-continue-on-error: true
 steps:
 - name: Git Checkout
   uses: actions/checkout@v4
@@ -41,6 +40,7 @@ jobs:
 - name: Build
   run: mvn verify
 - name: Upload logs
+  if: always()
   uses: actions/upload-artifact@v4
   with:
 name: JDK${{ matrix.java }}-${{ matrix.os }}-logs


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



(tomcat-tck) branch main updated: Fix syntax

2024-07-22 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-tck.git


The following commit(s) were added to refs/heads/main by this push:
 new 9ca6b79  Fix syntax
9ca6b79 is described below

commit 9ca6b794703e34cb0241b9c0270e3397b14bd7a7
Author: Mark Thomas 
AuthorDate: Mon Jul 22 15:28:24 2024 +0100

Fix syntax
---
 .github/workflows/ci.yml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 2507aa5..64ada7c 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -32,7 +32,8 @@ jobs:
 steps:
 - name: Git Checkout
   uses: actions/checkout@v4
-  persist-credentials: false
+  with:
+persist-credentials: false
 - name: Set up Java
   uses: actions/setup-java@v4
   with:


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



(tomcat-tck) branch main updated: Use ${path.separator} for cross-platform support

2024-07-22 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-tck.git


The following commit(s) were added to refs/heads/main by this push:
 new 8cb95ec  Use ${path.separator} for cross-platform support
8cb95ec is described below

commit 8cb95ecab74cb9783fb385586524f403e5e5b1d6
Author: Mark Thomas 
AuthorDate: Mon Jul 22 15:42:12 2024 +0100

Use ${path.separator} for cross-platform support
---
 el-tck/pom.xml| 4 ++--
 jsp-tck/pom.xml   | 2 +-
 servlet-tck/pom.xml   | 2 +-
 websocket-tck/pom.xml | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/el-tck/pom.xml b/el-tck/pom.xml
index 52ae6d8..5954e61 100644
--- a/el-tck/pom.xml
+++ b/el-tck/pom.xml
@@ -84,10 +84,10 @@
 true
 
${project.build.directory}/jimage
 
-
${settings.localRepository}/org/apache/tomcat/tomcat-el-api/${tomcat.version}/tomcat-el-api-${tomcat.version}.jar:${project.build.directory}/jimage/java.base
+
${settings.localRepository}/org/apache/tomcat/tomcat-el-api/${tomcat.version}/tomcat-el-api-${tomcat.version}.jar${path.separator}${project.build.directory}/jimage/java.base
 
 
 
 
diff --git a/jsp-tck/pom.xml b/jsp-tck/pom.xml
index f6a94c6..a19e488 100644
--- a/jsp-tck/pom.xml
+++ b/jsp-tck/pom.xml
@@ -124,7 +124,7 @@
 true
 
ee.jakarta.tck.pages.lib.implementation.sun.common.SunRIURL
 
${project.build.directory}/jimage
-
${settings.localRepository}/org/apache/tomcat/tomcat-jsp-api/${tomcat.version}/tomcat-jsp-api-${tomcat.version}.jar:${settings.localRepository}/org/apache/tomcat/tomcat-el-api/${tomcat.version}/tomcat-el-api-${tomcat.version}.jar:${settings.localRepository}/org/apache/tomcat/tomcat-servlet-api/${tomcat.version}/tomcat-servlet-api-${tomcat.version}.jar:${project.build.directory}/jimage/java.base
+
${settings.localRepository}/org/apache/tomcat/tomcat-jsp-api/${tomcat.version}/tomcat-jsp-api-${tomcat.version}.jar${path.separator}${settings.localRepository}/org/apache/tomcat/tomcat-el-api/${tomcat.version}/tomcat-el-api-${tomcat.version}.jar${path.separator}${settings.localRepository}/org/apache/tomcat/tomcat-servlet-api/${tomcat.version}/tomcat-servlet-api-${tomcat.version}.jar${path.separator}${project.build.directory}/jimage/java.b
 [...]
 j2ee
 j2ee
 javajoe
diff --git a/servlet-tck/pom.xml b/servlet-tck/pom.xml
index 127bf5e..369868d 100644
--- a/servlet-tck/pom.xml
+++ b/servlet-tck/pom.xml
@@ -126,7 +126,7 @@
 
false
 http
 
${project.build.directory}/jimage
-
${settings.localRepository}/org/apache/tomcat/tomcat-servlet-api/${tomcat.version}/tomcat-servlet-api-${tomcat.version}.jar:${project.build.directory}/jimage/java.base
+
${settings.localRepository}/org/apache/tomcat/tomcat-servlet-api/${tomcat.version}/tomcat-servlet-api-${tomcat.version}.jar${path.separator}${project.build.directory}/jimage/java.base
 
 
target/failsafe-reports/failsafe-summary-http.xml
 
diff --git a/websocket-tck/pom.xml b/websocket-tck/pom.xml
index b38a6df..a9a8e80 100644
--- a/websocket-tck/pom.xml
+++ b/websocket-tck/pom.xml
@@ -144,7 +144,7 @@
 
com.sun.ts.tests.websocket.lib.implementation.sun.common.SunRIURL
 
0
 
${project.build.directory}/jimage
-
${settings.localRepository}/org/apache/tomcat/embed/tomcat-embed-websocket/${tomcat.version}/tomcat-embed-websocket-${tomcat.version}.jar:${project.build.directory}/jimage/java.base
+
${settings.localRepository}/org/apache/tomcat/embed/tomcat-embed-websocket/${tomcat.version}/tomcat-embed-websocket-${tomcat.version}.jar${path.separator}${project.build.directory}/jimage/java.base
 
 
target/failsafe-reports/failsafe-summary-http.xml
 


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



(tomcat-tck) branch main updated: Reduce default fork.count to 4

2024-07-22 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-tck.git


The following commit(s) were added to refs/heads/main by this push:
 new 515ba8e  Reduce default fork.count to 4
515ba8e is described below

commit 515ba8e11063ae9ff7328a9dd8eb90a38f869358
Author: Mark Thomas 
AuthorDate: Mon Jul 22 17:05:12 2024 +0100

Reduce default fork.count to 4

Standard GitHub runners have 4 cores. Have observed one test failing due
to a timeout that might be related to too high a concurrency level
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 17d2194..1d37105 100644
--- a/pom.xml
+++ b/pom.xml
@@ -34,7 +34,7 @@
 11.0.0-M23-SNAPSHOT
 
 
-5
+4
 
 
 6.0.1


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



(tomcat) branch main updated: Code clean-up. No functional change.

2024-07-22 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 55ab87135b Code clean-up. No functional change.
55ab87135b is described below

commit 55ab87135b2d962dcd1cc67c321ab57fed653081
Author: Mark Thomas 
AuthorDate: Mon Jul 22 17:10:12 2024 +0100

Code clean-up. No functional change.
---
 .../apache/coyote/http11/Http11InputBuffer.java|  2 ++
 java/org/apache/coyote/http11/Http11Processor.java | 10 +++---
 .../coyote/http11/filters/BufferedInputFilter.java |  9 +++--
 .../coyote/http11/filters/ChunkedInputFilter.java  | 36 ++--
 .../coyote/http11/filters/ChunkedOutputFilter.java | 38 ++
 .../coyote/http11/filters/GzipOutputFilter.java| 22 +++--
 .../coyote/http11/filters/IdentityInputFilter.java |  8 ++---
 .../http11/filters/SavedRequestInputFilter.java| 10 +++---
 .../coyote/http11/filters/VoidInputFilter.java |  6 ++--
 .../coyote/http11/filters/VoidOutputFilter.java|  5 ++-
 .../http11/upgrade/InternalHttpUpgradeHandler.java |  9 +++--
 .../upgrade/UpgradeApplicationBufferHandler.java   |  4 +--
 .../coyote/http11/upgrade/UpgradeGroupInfo.java|  6 +++-
 .../apache/coyote/http11/upgrade/UpgradeInfo.java  | 19 +++
 .../http11/upgrade/UpgradeProcessorExternal.java   |  3 +-
 .../http11/upgrade/UpgradeServletInputStream.java  | 16 +++--
 .../http11/upgrade/UpgradeServletOutputStream.java | 15 +++--
 17 files changed, 107 insertions(+), 111 deletions(-)

diff --git a/java/org/apache/coyote/http11/Http11InputBuffer.java 
b/java/org/apache/coyote/http11/Http11InputBuffer.java
index 1a3eb5072c..22232913ac 100644
--- a/java/org/apache/coyote/http11/Http11InputBuffer.java
+++ b/java/org/apache/coyote/http11/Http11InputBuffer.java
@@ -647,6 +647,7 @@ public class Http11InputBuffer implements InputBuffer, 
ApplicationBufferHandler,
 /**
  * Available bytes in the buffers for the current request. Note that when 
requests are pipelined, the data in
  * byteBuffer may relate to the next request rather than this one.
+ *
  * @return the amount of bytes available, 0 if none, and 1 if there was an 
IO error to trigger a read
  */
 int available(boolean read) {
@@ -690,6 +691,7 @@ public class Http11InputBuffer implements InputBuffer, 
ApplicationBufferHandler,
 /**
  * Has all of the request body been read? There are subtle differences 
between this and available() > 0 primarily
  * because of having to handle faking non-blocking reads with the blocking 
IO connector.
+ *
  * @return {@code true} if the request has been fully read
  */
 boolean isFinished() {
diff --git a/java/org/apache/coyote/http11/Http11Processor.java 
b/java/org/apache/coyote/http11/Http11Processor.java
index 7d1b2e0431..e17bdc2518 100644
--- a/java/org/apache/coyote/http11/Http11Processor.java
+++ b/java/org/apache/coyote/http11/Http11Processor.java
@@ -166,9 +166,9 @@ public class Http11Processor extends AbstractProcessor {
 outputBuffer.addFilter(new IdentityOutputFilter());
 
 // Create and add the chunked filters.
-inputBuffer.addFilter(
-new ChunkedInputFilter(request, protocol.getMaxTrailerSize(), 
protocol.getAllowedTrailerHeadersInternal(),
-protocol.getMaxExtensionSize(), 
protocol.getMaxSwallowSize()));
+inputBuffer.addFilter(new ChunkedInputFilter(request, 
protocol.getMaxTrailerSize(),
+protocol.getAllowedTrailerHeadersInternal(), 
protocol.getMaxExtensionSize(),
+protocol.getMaxSwallowSize()));
 outputBuffer.addFilter(new ChunkedOutputFilter());
 
 // Create and add the void filters.
@@ -988,8 +988,8 @@ public class Http11Processor extends AbstractProcessor {
 }
 
 if (protocol.getUseKeepAliveResponseHeader()) {
-boolean connectionKeepAlivePresent = 
isConnectionToken(request.getMimeHeaders(),
-Constants.KEEP_ALIVE_HEADER_VALUE_TOKEN);
+boolean connectionKeepAlivePresent =
+isConnectionToken(request.getMimeHeaders(), 
Constants.KEEP_ALIVE_HEADER_VALUE_TOKEN);
 
 if (connectionKeepAlivePresent) {
 int keepAliveTimeout = protocol.getKeepAliveTimeout();
diff --git a/java/org/apache/coyote/http11/filters/BufferedInputFilter.java 
b/java/org/apache/coyote/http11/filters/BufferedInputFilter.java
index 8727f4d1a6..455ffb882a 100644
--- a/java/org/apache/coyote/http11/filters/BufferedInputFilter.java
+++ b/java/org/apache/coyote/http11/filters/BufferedInputFilter.java
@@ -29,8 +29,8 @@ import org.apache.tomcat.util.net.ApplicationBufferHandler;
 import org.apache.tomcat.util.res.StringManager;
 
 /**
- * Input filter responsible for reading and buffering the r

(tomcat) branch main updated: Pull up common method

2024-07-22 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 169aa4042d Pull up common method
169aa4042d is described below

commit 169aa4042d04bcc1171a9ea00654ef499455b1e5
Author: Mark Thomas 
AuthorDate: Mon Jul 22 17:29:21 2024 +0100

Pull up common method

The refactoring was originally implemented to support the experimental
and now deleted loom module.
---
 java/org/apache/coyote/http11/AbstractHttp11Protocol.java | 5 -
 java/org/apache/coyote/http11/Http11Nio2Protocol.java | 7 ---
 java/org/apache/coyote/http11/Http11NioProtocol.java  | 7 ---
 3 files changed, 4 insertions(+), 15 deletions(-)

diff --git a/java/org/apache/coyote/http11/AbstractHttp11Protocol.java 
b/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
index fe4380dbe2..9e6d358d62 100644
--- a/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
+++ b/java/org/apache/coyote/http11/AbstractHttp11Protocol.java
@@ -751,7 +751,10 @@ public abstract class AbstractHttp11Protocol extends 
AbstractProtocol {
 // - Common 
code
 
 @Override
-protected abstract Processor createProcessor();
+protected Processor createProcessor() {
+Http11Processor processor = new Http11Processor(this, adapter);
+return processor;
+}
 
 
 @Override
diff --git a/java/org/apache/coyote/http11/Http11Nio2Protocol.java 
b/java/org/apache/coyote/http11/Http11Nio2Protocol.java
index 798c02431c..9eb346f126 100644
--- a/java/org/apache/coyote/http11/Http11Nio2Protocol.java
+++ b/java/org/apache/coyote/http11/Http11Nio2Protocol.java
@@ -16,7 +16,6 @@
  */
 package org.apache.coyote.http11;
 
-import org.apache.coyote.Processor;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 import org.apache.tomcat.util.net.Nio2Channel;
@@ -47,12 +46,6 @@ public class Http11Nio2Protocol extends 
AbstractHttp11Protocol {
 }
 
 
-@Override
-protected Processor createProcessor() {
-return new Http11Processor(this, adapter);
-}
-
-
 @Override
 protected String getNamePrefix() {
 if (isSSLEnabled()) {
diff --git a/java/org/apache/coyote/http11/Http11NioProtocol.java 
b/java/org/apache/coyote/http11/Http11NioProtocol.java
index 57068d795e..39a43b9890 100644
--- a/java/org/apache/coyote/http11/Http11NioProtocol.java
+++ b/java/org/apache/coyote/http11/Http11NioProtocol.java
@@ -16,7 +16,6 @@
  */
 package org.apache.coyote.http11;
 
-import org.apache.coyote.Processor;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 import org.apache.tomcat.util.net.NioChannel;
@@ -66,12 +65,6 @@ public class Http11NioProtocol extends 
AbstractHttp11Protocol {
 }
 
 
-@Override
-protected Processor createProcessor() {
-return new Http11Processor(this, adapter);
-}
-
-
 @Override
 protected String getNamePrefix() {
 if (isSSLEnabled()) {


-
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: Code clean-up. No functional change.

2024-07-22 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 f37694f2cf Code clean-up. No functional change.
f37694f2cf is described below

commit f37694f2cfdd07e228df472bd749f8be3d7bf901
Author: Mark Thomas 
AuthorDate: Mon Jul 22 17:13:03 2024 +0100

Code clean-up. No functional change.
---
 .../coyote/http11/AbstractHttp11JsseProtocol.java  |  6 ++--
 .../apache/coyote/http11/Http11InputBuffer.java|  2 ++
 java/org/apache/coyote/http11/Http11Processor.java | 10 +++---
 .../coyote/http11/filters/BufferedInputFilter.java |  9 +++--
 .../coyote/http11/filters/ChunkedInputFilter.java  | 36 ++--
 .../coyote/http11/filters/ChunkedOutputFilter.java | 38 ++
 .../coyote/http11/filters/GzipOutputFilter.java| 22 +++--
 .../coyote/http11/filters/IdentityInputFilter.java |  8 ++---
 .../http11/filters/SavedRequestInputFilter.java| 10 +++---
 .../coyote/http11/filters/VoidInputFilter.java |  6 ++--
 .../coyote/http11/filters/VoidOutputFilter.java|  5 ++-
 .../http11/upgrade/InternalHttpUpgradeHandler.java |  9 +++--
 .../upgrade/UpgradeApplicationBufferHandler.java   |  4 +--
 .../coyote/http11/upgrade/UpgradeGroupInfo.java|  6 +++-
 .../apache/coyote/http11/upgrade/UpgradeInfo.java  | 19 +++
 .../http11/upgrade/UpgradeProcessorExternal.java   |  3 +-
 .../http11/upgrade/UpgradeServletInputStream.java  | 16 +++--
 .../http11/upgrade/UpgradeServletOutputStream.java | 15 +++--
 18 files changed, 110 insertions(+), 114 deletions(-)

diff --git a/java/org/apache/coyote/http11/AbstractHttp11JsseProtocol.java 
b/java/org/apache/coyote/http11/AbstractHttp11JsseProtocol.java
index 2ea65972fd..e8e1cc3941 100644
--- a/java/org/apache/coyote/http11/AbstractHttp11JsseProtocol.java
+++ b/java/org/apache/coyote/http11/AbstractHttp11JsseProtocol.java
@@ -21,15 +21,15 @@ import 
org.apache.tomcat.util.net.openssl.OpenSSLImplementation;
 
 public abstract class AbstractHttp11JsseProtocol extends 
AbstractHttp11Protocol {
 
-public AbstractHttp11JsseProtocol(AbstractJsseEndpoint endpoint) {
+public AbstractHttp11JsseProtocol(AbstractJsseEndpoint endpoint) {
 super(endpoint);
 }
 
 
 @Override
-protected AbstractJsseEndpoint getEndpoint() {
+protected AbstractJsseEndpoint getEndpoint() {
 // Over-ridden to add cast
-return (AbstractJsseEndpoint) super.getEndpoint();
+return (AbstractJsseEndpoint) super.getEndpoint();
 }
 
 
diff --git a/java/org/apache/coyote/http11/Http11InputBuffer.java 
b/java/org/apache/coyote/http11/Http11InputBuffer.java
index 3e4137d1aa..2416824b3d 100644
--- a/java/org/apache/coyote/http11/Http11InputBuffer.java
+++ b/java/org/apache/coyote/http11/Http11InputBuffer.java
@@ -658,6 +658,7 @@ public class Http11InputBuffer implements InputBuffer, 
ApplicationBufferHandler
 /**
  * Available bytes in the buffers for the current request. Note that when 
requests are pipelined, the data in
  * byteBuffer may relate to the next request rather than this one.
+ *
  * @return the amount of bytes available, 0 if none, and 1 if there was an 
IO error to trigger a read
  */
 int available(boolean read) {
@@ -701,6 +702,7 @@ public class Http11InputBuffer implements InputBuffer, 
ApplicationBufferHandler
 /**
  * Has all of the request body been read? There are subtle differences 
between this and available() > 0 primarily
  * because of having to handle faking non-blocking reads with the blocking 
IO connector.
+ *
  * @return {@code true} if the request has been fully read
  */
 boolean isFinished() {
diff --git a/java/org/apache/coyote/http11/Http11Processor.java 
b/java/org/apache/coyote/http11/Http11Processor.java
index 1389185e90..a388e89007 100644
--- a/java/org/apache/coyote/http11/Http11Processor.java
+++ b/java/org/apache/coyote/http11/Http11Processor.java
@@ -167,9 +167,9 @@ public class Http11Processor extends AbstractProcessor {
 outputBuffer.addFilter(new IdentityOutputFilter());
 
 // Create and add the chunked filters.
-inputBuffer.addFilter(
-new ChunkedInputFilter(request, protocol.getMaxTrailerSize(), 
protocol.getAllowedTrailerHeadersInternal(),
-protocol.getMaxExtensionSize(), 
protocol.getMaxSwallowSize()));
+inputBuffer.addFilter(new ChunkedInputFilter(request, 
protocol.getMaxTrailerSize(),
+protocol.getAllowedTrailerHeadersInternal(), 
protocol.getMaxExtensionSize(),
+protocol.getMaxSwallowSize()));
 outputBuffer.addFilter(new ChunkedOutputFilter());
 
 // Create and add the void filters.
@@ -998,8 +998,8 @@ public class Http11Processor extends AbstractProcessor {
 }
 
 if (p

(tomcat) branch 10.1.x updated: Code clean-up. No functional change.

2024-07-22 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 ee9bbf30e6 Code clean-up. No functional change.
ee9bbf30e6 is described below

commit ee9bbf30e6bb9a17a642d16ac4dbb03cbf415d16
Author: Mark Thomas 
AuthorDate: Mon Jul 22 17:11:36 2024 +0100

Code clean-up. No functional change.
---
 .../coyote/http11/AbstractHttp11JsseProtocol.java  |  6 ++--
 .../apache/coyote/http11/Http11InputBuffer.java|  2 ++
 java/org/apache/coyote/http11/Http11Processor.java | 10 +++---
 .../coyote/http11/filters/BufferedInputFilter.java |  9 +++--
 .../coyote/http11/filters/ChunkedInputFilter.java  | 36 ++--
 .../coyote/http11/filters/ChunkedOutputFilter.java | 38 ++
 .../coyote/http11/filters/GzipOutputFilter.java| 22 +++--
 .../coyote/http11/filters/IdentityInputFilter.java |  8 ++---
 .../http11/filters/SavedRequestInputFilter.java| 10 +++---
 .../coyote/http11/filters/VoidInputFilter.java |  6 ++--
 .../coyote/http11/filters/VoidOutputFilter.java|  5 ++-
 .../http11/upgrade/InternalHttpUpgradeHandler.java |  9 +++--
 .../upgrade/UpgradeApplicationBufferHandler.java   |  4 +--
 .../coyote/http11/upgrade/UpgradeGroupInfo.java|  6 +++-
 .../apache/coyote/http11/upgrade/UpgradeInfo.java  | 19 +++
 .../http11/upgrade/UpgradeProcessorExternal.java   |  3 +-
 .../http11/upgrade/UpgradeServletInputStream.java  | 16 +++--
 .../http11/upgrade/UpgradeServletOutputStream.java | 15 +++--
 18 files changed, 110 insertions(+), 114 deletions(-)

diff --git a/java/org/apache/coyote/http11/AbstractHttp11JsseProtocol.java 
b/java/org/apache/coyote/http11/AbstractHttp11JsseProtocol.java
index 2ea65972fd..e8e1cc3941 100644
--- a/java/org/apache/coyote/http11/AbstractHttp11JsseProtocol.java
+++ b/java/org/apache/coyote/http11/AbstractHttp11JsseProtocol.java
@@ -21,15 +21,15 @@ import 
org.apache.tomcat.util.net.openssl.OpenSSLImplementation;
 
 public abstract class AbstractHttp11JsseProtocol extends 
AbstractHttp11Protocol {
 
-public AbstractHttp11JsseProtocol(AbstractJsseEndpoint endpoint) {
+public AbstractHttp11JsseProtocol(AbstractJsseEndpoint endpoint) {
 super(endpoint);
 }
 
 
 @Override
-protected AbstractJsseEndpoint getEndpoint() {
+protected AbstractJsseEndpoint getEndpoint() {
 // Over-ridden to add cast
-return (AbstractJsseEndpoint) super.getEndpoint();
+return (AbstractJsseEndpoint) super.getEndpoint();
 }
 
 
diff --git a/java/org/apache/coyote/http11/Http11InputBuffer.java 
b/java/org/apache/coyote/http11/Http11InputBuffer.java
index e03d7628d7..615f7f2903 100644
--- a/java/org/apache/coyote/http11/Http11InputBuffer.java
+++ b/java/org/apache/coyote/http11/Http11InputBuffer.java
@@ -658,6 +658,7 @@ public class Http11InputBuffer implements InputBuffer, 
ApplicationBufferHandler
 /**
  * Available bytes in the buffers for the current request. Note that when 
requests are pipelined, the data in
  * byteBuffer may relate to the next request rather than this one.
+ *
  * @return the amount of bytes available, 0 if none, and 1 if there was an 
IO error to trigger a read
  */
 int available(boolean read) {
@@ -701,6 +702,7 @@ public class Http11InputBuffer implements InputBuffer, 
ApplicationBufferHandler
 /**
  * Has all of the request body been read? There are subtle differences 
between this and available() > 0 primarily
  * because of having to handle faking non-blocking reads with the blocking 
IO connector.
+ *
  * @return {@code true} if the request has been fully read
  */
 boolean isFinished() {
diff --git a/java/org/apache/coyote/http11/Http11Processor.java 
b/java/org/apache/coyote/http11/Http11Processor.java
index 7522962304..fd7d94664c 100644
--- a/java/org/apache/coyote/http11/Http11Processor.java
+++ b/java/org/apache/coyote/http11/Http11Processor.java
@@ -168,9 +168,9 @@ public class Http11Processor extends AbstractProcessor {
 outputBuffer.addFilter(new IdentityOutputFilter());
 
 // Create and add the chunked filters.
-inputBuffer.addFilter(
-new ChunkedInputFilter(request, protocol.getMaxTrailerSize(), 
protocol.getAllowedTrailerHeadersInternal(),
-protocol.getMaxExtensionSize(), 
protocol.getMaxSwallowSize()));
+inputBuffer.addFilter(new ChunkedInputFilter(request, 
protocol.getMaxTrailerSize(),
+protocol.getAllowedTrailerHeadersInternal(), 
protocol.getMaxExtensionSize(),
+protocol.getMaxSwallowSize()));
 outputBuffer.addFilter(new ChunkedOutputFilter());
 
 // Create and add the void filters.
@@ -999,8 +999,8 @@ public class Http11Processor extends AbstractProcessor {
 }
 
 if 

(tomcat) branch 10.1.x updated: Align comments with 11.0.x. No functional change.

2024-07-22 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 875fff3abf Align comments with 11.0.x. No functional change.
875fff3abf is described below

commit 875fff3abfba99eb0159a509a0da7d075fa0a253
Author: Mark Thomas 
AuthorDate: Mon Jul 22 17:41:55 2024 +0100

Align comments with 11.0.x. No functional change.
---
 java/org/apache/coyote/http11/Http11InputBuffer.java  | 6 --
 java/org/apache/coyote/http11/Http11Nio2Protocol.java | 2 --
 java/org/apache/coyote/http11/Http11NioProtocol.java  | 2 --
 3 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/java/org/apache/coyote/http11/Http11InputBuffer.java 
b/java/org/apache/coyote/http11/Http11InputBuffer.java
index 615f7f2903..af34736a2d 100644
--- a/java/org/apache/coyote/http11/Http11InputBuffer.java
+++ b/java/org/apache/coyote/http11/Http11InputBuffer.java
@@ -751,12 +751,14 @@ public class Http11InputBuffer implements InputBuffer, 
ApplicationBufferHandler
 }
 
 
-// - Private 
Methods
-
 /**
  * Attempts to read some data into the input buffer.
  *
+ * @param block Should blocking IO be used when filling the input buffer
+ *
  * @return true if more data was added to the input buffer 
otherwise false
+ *
+ * @throws IOException if an IO error occurs while filling the input buffer
  */
 private boolean fill(boolean block) throws IOException {
 
diff --git a/java/org/apache/coyote/http11/Http11Nio2Protocol.java 
b/java/org/apache/coyote/http11/Http11Nio2Protocol.java
index 2d0bbfa844..ea53005ed7 100644
--- a/java/org/apache/coyote/http11/Http11Nio2Protocol.java
+++ b/java/org/apache/coyote/http11/Http11Nio2Protocol.java
@@ -46,8 +46,6 @@ public class Http11Nio2Protocol extends 
AbstractHttp11JsseProtocol
 }
 
 
-// - JMX related 
methods
-
 @Override
 protected String getNamePrefix() {
 if (isSSLEnabled()) {
diff --git a/java/org/apache/coyote/http11/Http11NioProtocol.java 
b/java/org/apache/coyote/http11/Http11NioProtocol.java
index 98b5ccd71b..20ff79b052 100644
--- a/java/org/apache/coyote/http11/Http11NioProtocol.java
+++ b/java/org/apache/coyote/http11/Http11NioProtocol.java
@@ -65,8 +65,6 @@ public class Http11NioProtocol extends 
AbstractHttp11JsseProtocol {
 }
 
 
-// - JMX related 
methods
-
 @Override
 protected String getNamePrefix() {
 if (isSSLEnabled()) {


-
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: Align comments with 10.1.x/11.0.x. No functional change.

2024-07-22 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 2c46b8d037 Align comments with 10.1.x/11.0.x. No functional change.
2c46b8d037 is described below

commit 2c46b8d0374289516ff0156942336b62a7dfd12e
Author: Mark Thomas 
AuthorDate: Mon Jul 22 17:42:27 2024 +0100

Align comments with 10.1.x/11.0.x. No functional change.
---
 java/org/apache/coyote/http11/Http11InputBuffer.java  | 6 --
 java/org/apache/coyote/http11/Http11Nio2Protocol.java | 2 --
 java/org/apache/coyote/http11/Http11NioProtocol.java  | 2 --
 3 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/java/org/apache/coyote/http11/Http11InputBuffer.java 
b/java/org/apache/coyote/http11/Http11InputBuffer.java
index 2416824b3d..689885edb4 100644
--- a/java/org/apache/coyote/http11/Http11InputBuffer.java
+++ b/java/org/apache/coyote/http11/Http11InputBuffer.java
@@ -751,12 +751,14 @@ public class Http11InputBuffer implements InputBuffer, 
ApplicationBufferHandler
 }
 
 
-// - Private 
Methods
-
 /**
  * Attempts to read some data into the input buffer.
  *
+ * @param block Should blocking IO be used when filling the input buffer
+ *
  * @return true if more data was added to the input buffer 
otherwise false
+ *
+ * @throws IOException if an IO error occurs while filling the input buffer
  */
 private boolean fill(boolean block) throws IOException {
 
diff --git a/java/org/apache/coyote/http11/Http11Nio2Protocol.java 
b/java/org/apache/coyote/http11/Http11Nio2Protocol.java
index 2d0bbfa844..ea53005ed7 100644
--- a/java/org/apache/coyote/http11/Http11Nio2Protocol.java
+++ b/java/org/apache/coyote/http11/Http11Nio2Protocol.java
@@ -46,8 +46,6 @@ public class Http11Nio2Protocol extends 
AbstractHttp11JsseProtocol
 }
 
 
-// - JMX related 
methods
-
 @Override
 protected String getNamePrefix() {
 if (isSSLEnabled()) {
diff --git a/java/org/apache/coyote/http11/Http11NioProtocol.java 
b/java/org/apache/coyote/http11/Http11NioProtocol.java
index 2d2b9a7758..13b25e71ac 100644
--- a/java/org/apache/coyote/http11/Http11NioProtocol.java
+++ b/java/org/apache/coyote/http11/Http11NioProtocol.java
@@ -88,8 +88,6 @@ public class Http11NioProtocol extends 
AbstractHttp11JsseProtocol {
 }
 
 
-// - JMX related 
methods
-
 @Override
 protected String getNamePrefix() {
 if (isSSLEnabled()) {


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



TCK CI runs

2024-07-22 Thread Mark Thomas

All,

Today I have configured the tomcat-tck repository to run the EL, 
Servlet, Pages and WebSocket TCKs once every day for all combinations of 
JDK 17 & 21, Ubuntu latest, MacOS latest and Windows latest using GitHub 
actions.


There were a few issues to iron out but these should now all be resolved.

The TCK will run at just after 08.00 UTC every day and it will use the 
latest Tomcat 11 SNAPSHOT (these are updated on every commit by buildbot).


Windows seems to take a little longer than the others but the full TCK 
run (all four TCKs) is complete in just under 25 minutes. Considering it 
used to take longer than that to run any of the old TCKs, kudos to the 
Jakarta EE folks that have been working on the refactoring.


Tomcat 11.0.x currently passes the TCK (as it should).

I have no plans to formally certify Tomcat as passing the TCK over and 
above what I have already completed as part of the release process for 
each of the specifications (the specification release process requires 
at least one compatible implementation).


Mark

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



[Bug 69214] New: CORSFilter prevent requests with POST method with no content type

2024-07-22 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=69214

Bug ID: 69214
   Summary: CORSFilter prevent requests with POST method with no
content type
   Product: Tomcat 10
   Version: 10.1.26
  Hardware: PC
OS: Mac OS X 10.1
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: thebluemount...@gmail.com
  Target Milestone: --

i have a web application that accepts POST requests with no supplied data (no
Content-Type nor Content_Length) and that can handle client calls.

When the client makes the same call though CORS, the CORSFilter detects and
error and return HTTP 403 code.

Looking at some Q/A regarding POST ... we can see that it is legitimate to
implement POST calls with no content (body)
https://lists.w3.org/Archives/Public/ietf-http-wg/2010JulSep/0275.html

In the CorsFilter.checkRequestType () method, though, it seems no having any
content type prevent from updating the requestType, initialized with
CORSRequestType.INVALID_CORS.

Q: shouldn't we return in such case CORSRequestType.SIMPLE or
CORSRequestType.ACTUAL ?

ie: (see 'set the request type then ...')

protected CORSRequestType checkRequestType(final HttpServletRequest request) {
   CORSRequestType requestType = CORSRequestType.INVALID_CORS;
...
} else if ("POST".equals(method)) {
String mediaType =
getMediaType(request.getContentType());
if (mediaType != null) {
if
(SIMPLE_HTTP_REQUEST_CONTENT_TYPE_VALUES.contains(mediaType)) {
requestType = CORSRequestType.SIMPLE;
} else {
requestType = CORSRequestType.ACTUAL;
}
} else {
// sets the request type then ...
requestType = CORSRequestType.SIMPLE;
}

} else {
...
return requestType;
}

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



(tomcat) branch main updated: The annotations TCK expects a specific order

2024-07-22 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 9c7b5f78a3 The annotations TCK expects a specific order
9c7b5f78a3 is described below

commit 9c7b5f78a3b8f5326decb84327354208d0f3dd8a
Author: Mark Thomas 
AuthorDate: Mon Jul 22 19:18:17 2024 +0100

The annotations TCK expects a specific order

I could raise a TCK challenge but this is the simpler solution.
---
 java/jakarta/annotation/Generated.java| 4 ++--
 java/jakarta/annotation/Resource.java | 2 +-
 java/jakarta/annotation/security/DenyAll.java | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/java/jakarta/annotation/Generated.java 
b/java/jakarta/annotation/Generated.java
index 4997cdf44b..19cbed8bc6 100644
--- a/java/jakarta/annotation/Generated.java
+++ b/java/jakarta/annotation/Generated.java
@@ -28,8 +28,8 @@ import java.lang.annotation.Target;
  * @since Common Annotations 1.0
  */
 @Documented
-@Target({ ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR, 
ElementType.FIELD, ElementType.LOCAL_VARIABLE,
-ElementType.METHOD, ElementType.PACKAGE, ElementType.PARAMETER, 
ElementType.TYPE })
+@Target({ ElementType.PACKAGE, ElementType.TYPE, ElementType.ANNOTATION_TYPE, 
ElementType.METHOD,
+ElementType.CONSTRUCTOR, ElementType.FIELD, 
ElementType.LOCAL_VARIABLE, ElementType.PARAMETER })
 @Retention(RetentionPolicy.SOURCE)
 public @interface Generated {
 /**
diff --git a/java/jakarta/annotation/Resource.java 
b/java/jakarta/annotation/Resource.java
index a86d4cf7df..692d13418e 100644
--- a/java/jakarta/annotation/Resource.java
+++ b/java/jakarta/annotation/Resource.java
@@ -28,7 +28,7 @@ import java.lang.annotation.Target;
  *
  * @since Common Annotations 1.0
  */
-@Target({ ElementType.TYPE, ElementType.METHOD, ElementType.FIELD })
+@Target({ ElementType.TYPE, ElementType.FIELD, ElementType.METHOD })
 @Retention(RetentionPolicy.RUNTIME)
 @Repeatable(Resources.class)
 public @interface Resource {
diff --git a/java/jakarta/annotation/security/DenyAll.java 
b/java/jakarta/annotation/security/DenyAll.java
index 347d5e6161..9944210ce7 100644
--- a/java/jakarta/annotation/security/DenyAll.java
+++ b/java/jakarta/annotation/security/DenyAll.java
@@ -26,7 +26,7 @@ import java.lang.annotation.Target;
  * @since Common Annotations 1.0
  */
 @Documented
-@Target({ ElementType.METHOD, ElementType.TYPE })
+@Target({ ElementType.TYPE, ElementType.METHOD })
 @Retention(RetentionPolicy.RUNTIME)
 public @interface DenyAll {
 // No attributes


-
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: Align with 11.0.x

2024-07-22 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 0d97e10e9d Align with 11.0.x
0d97e10e9d is described below

commit 0d97e10e9d521a12922a00ca1cbcaccadfb6ed2b
Author: Mark Thomas 
AuthorDate: Mon Jul 22 19:19:33 2024 +0100

Align with 11.0.x
---
 java/jakarta/annotation/Generated.java| 4 ++--
 java/jakarta/annotation/Resource.java | 2 +-
 java/jakarta/annotation/security/DenyAll.java | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/java/jakarta/annotation/Generated.java 
b/java/jakarta/annotation/Generated.java
index 4997cdf44b..19cbed8bc6 100644
--- a/java/jakarta/annotation/Generated.java
+++ b/java/jakarta/annotation/Generated.java
@@ -28,8 +28,8 @@ import java.lang.annotation.Target;
  * @since Common Annotations 1.0
  */
 @Documented
-@Target({ ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR, 
ElementType.FIELD, ElementType.LOCAL_VARIABLE,
-ElementType.METHOD, ElementType.PACKAGE, ElementType.PARAMETER, 
ElementType.TYPE })
+@Target({ ElementType.PACKAGE, ElementType.TYPE, ElementType.ANNOTATION_TYPE, 
ElementType.METHOD,
+ElementType.CONSTRUCTOR, ElementType.FIELD, 
ElementType.LOCAL_VARIABLE, ElementType.PARAMETER })
 @Retention(RetentionPolicy.SOURCE)
 public @interface Generated {
 /**
diff --git a/java/jakarta/annotation/Resource.java 
b/java/jakarta/annotation/Resource.java
index a86d4cf7df..692d13418e 100644
--- a/java/jakarta/annotation/Resource.java
+++ b/java/jakarta/annotation/Resource.java
@@ -28,7 +28,7 @@ import java.lang.annotation.Target;
  *
  * @since Common Annotations 1.0
  */
-@Target({ ElementType.TYPE, ElementType.METHOD, ElementType.FIELD })
+@Target({ ElementType.TYPE, ElementType.FIELD, ElementType.METHOD })
 @Retention(RetentionPolicy.RUNTIME)
 @Repeatable(Resources.class)
 public @interface Resource {
diff --git a/java/jakarta/annotation/security/DenyAll.java 
b/java/jakarta/annotation/security/DenyAll.java
index 347d5e6161..9944210ce7 100644
--- a/java/jakarta/annotation/security/DenyAll.java
+++ b/java/jakarta/annotation/security/DenyAll.java
@@ -26,7 +26,7 @@ import java.lang.annotation.Target;
  * @since Common Annotations 1.0
  */
 @Documented
-@Target({ ElementType.METHOD, ElementType.TYPE })
+@Target({ ElementType.TYPE, ElementType.METHOD })
 @Retention(RetentionPolicy.RUNTIME)
 public @interface DenyAll {
 // No attributes


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



[Bug 69214] CORSFilter prevent requests with POST method with no content type

2024-07-22 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=69214

thebluemount...@gmail.com changed:

   What|Removed |Added

Version|10.1.26 |10.1.20

-- 
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 69214] CORSFilter prevent requests with POST method with no content type

2024-07-22 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=69214

--- Comment #1 from Mark Thomas  ---
Agreed. Thanks for reporting this and for doing the research to figure out the
root cause and a potential fix.

The fix is correct but it triggers a test failure but that is because the test
is testing the wrong thing. I'm working on fixing that too and should have
something to commit later today.

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



(tomcat) branch 9.0.x updated: Rename method for clarity

2024-07-22 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 a3a4fac952 Rename method for clarity
a3a4fac952 is described below

commit a3a4fac952a98e9c08e9a5a2fb1a7adf9ef089f1
Author: Mark Thomas 
AuthorDate: Mon Jul 22 20:27:13 2024 +0100

Rename method for clarity
---
 test/org/apache/catalina/filters/TestCorsFilter.java | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/test/org/apache/catalina/filters/TestCorsFilter.java 
b/test/org/apache/catalina/filters/TestCorsFilter.java
index 7b0ad2e734..dc6affb3b8 100644
--- a/test/org/apache/catalina/filters/TestCorsFilter.java
+++ b/test/org/apache/catalina/filters/TestCorsFilter.java
@@ -418,40 +418,40 @@ public class TestCorsFilter {
  */
 @Test
 public void testDoFilterSameHostWithOrigin01() throws IOException, 
ServletException {
-doTestDoFilterSameHostWithOrigin01("http://localhost:8080";, "http", 
"localhost", 8080, false);
+doTestDoFilterSameHostWithOrigin("http://localhost:8080";, "http", 
"localhost", 8080, false);
 }
 
 @Test
 public void testDoFilterSameHostWithOrigin02() throws IOException, 
ServletException {
-doTestDoFilterSameHostWithOrigin01("http://localhost:8080";, "https", 
"localhost", 8080, true);
+doTestDoFilterSameHostWithOrigin("http://localhost:8080";, "https", 
"localhost", 8080, true);
 }
 
 @Test
 public void testDoFilterSameHostWithOrigin03() throws IOException, 
ServletException {
-doTestDoFilterSameHostWithOrigin01("http://localhost:8080";, "http", 
"localhost", 8081, true);
+doTestDoFilterSameHostWithOrigin("http://localhost:8080";, "http", 
"localhost", 8081, true);
 }
 
 @Test
 public void testDoFilterSameHostWithOrigin04() throws IOException, 
ServletException {
-doTestDoFilterSameHostWithOrigin01("http://localhost:8080";, "http", 
"foo.dev.local", 8080, true);
+doTestDoFilterSameHostWithOrigin("http://localhost:8080";, "http", 
"foo.dev.local", 8080, true);
 }
 
 @Test
 public void testDoFilterSameHostWithOrigin05() throws IOException, 
ServletException {
-doTestDoFilterSameHostWithOrigin01("https://localhost:8443";, "https", 
"localhost", 8443, false);
+doTestDoFilterSameHostWithOrigin("https://localhost:8443";, "https", 
"localhost", 8443, false);
 }
 
 @Test
 public void testDoFilterSameHostWithOrigin06() throws IOException, 
ServletException {
-doTestDoFilterSameHostWithOrigin01("https://localhost";, "https", 
"localhost", 443, false);
+doTestDoFilterSameHostWithOrigin("https://localhost";, "https", 
"localhost", 443, false);
 }
 
 @Test
 public void testDoFilterSameHostWithOrigin07() throws IOException, 
ServletException {
-doTestDoFilterSameHostWithOrigin01("http://localhost";, "http", 
"localhost", 80, false);
+doTestDoFilterSameHostWithOrigin("http://localhost";, "http", 
"localhost", 80, false);
 }
 
-private void doTestDoFilterSameHostWithOrigin01(String origin, String 
scheme, String host, int port, boolean isCors)
+private void doTestDoFilterSameHostWithOrigin(String origin, String 
scheme, String host, int port, boolean isCors)
 throws IOException, ServletException {
 
 TesterHttpServletRequest request = new TesterHttpServletRequest();


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



(tomcat) branch main updated: Rename method for clarity

2024-07-22 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 39e74e949b Rename method for clarity
39e74e949b is described below

commit 39e74e949b21f3a30faff8cc34a56c6fda64e0c3
Author: Mark Thomas 
AuthorDate: Mon Jul 22 20:27:13 2024 +0100

Rename method for clarity
---
 test/org/apache/catalina/filters/TestCorsFilter.java | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/test/org/apache/catalina/filters/TestCorsFilter.java 
b/test/org/apache/catalina/filters/TestCorsFilter.java
index c5f68b1b81..c78854da96 100644
--- a/test/org/apache/catalina/filters/TestCorsFilter.java
+++ b/test/org/apache/catalina/filters/TestCorsFilter.java
@@ -418,40 +418,40 @@ public class TestCorsFilter {
  */
 @Test
 public void testDoFilterSameHostWithOrigin01() throws IOException, 
ServletException {
-doTestDoFilterSameHostWithOrigin01("http://localhost:8080";, "http", 
"localhost", 8080, false);
+doTestDoFilterSameHostWithOrigin("http://localhost:8080";, "http", 
"localhost", 8080, false);
 }
 
 @Test
 public void testDoFilterSameHostWithOrigin02() throws IOException, 
ServletException {
-doTestDoFilterSameHostWithOrigin01("http://localhost:8080";, "https", 
"localhost", 8080, true);
+doTestDoFilterSameHostWithOrigin("http://localhost:8080";, "https", 
"localhost", 8080, true);
 }
 
 @Test
 public void testDoFilterSameHostWithOrigin03() throws IOException, 
ServletException {
-doTestDoFilterSameHostWithOrigin01("http://localhost:8080";, "http", 
"localhost", 8081, true);
+doTestDoFilterSameHostWithOrigin("http://localhost:8080";, "http", 
"localhost", 8081, true);
 }
 
 @Test
 public void testDoFilterSameHostWithOrigin04() throws IOException, 
ServletException {
-doTestDoFilterSameHostWithOrigin01("http://localhost:8080";, "http", 
"foo.dev.local", 8080, true);
+doTestDoFilterSameHostWithOrigin("http://localhost:8080";, "http", 
"foo.dev.local", 8080, true);
 }
 
 @Test
 public void testDoFilterSameHostWithOrigin05() throws IOException, 
ServletException {
-doTestDoFilterSameHostWithOrigin01("https://localhost:8443";, "https", 
"localhost", 8443, false);
+doTestDoFilterSameHostWithOrigin("https://localhost:8443";, "https", 
"localhost", 8443, false);
 }
 
 @Test
 public void testDoFilterSameHostWithOrigin06() throws IOException, 
ServletException {
-doTestDoFilterSameHostWithOrigin01("https://localhost";, "https", 
"localhost", 443, false);
+doTestDoFilterSameHostWithOrigin("https://localhost";, "https", 
"localhost", 443, false);
 }
 
 @Test
 public void testDoFilterSameHostWithOrigin07() throws IOException, 
ServletException {
-doTestDoFilterSameHostWithOrigin01("http://localhost";, "http", 
"localhost", 80, false);
+doTestDoFilterSameHostWithOrigin("http://localhost";, "http", 
"localhost", 80, false);
 }
 
-private void doTestDoFilterSameHostWithOrigin01(String origin, String 
scheme, String host, int port, boolean isCors)
+private void doTestDoFilterSameHostWithOrigin(String origin, String 
scheme, String host, int port, boolean isCors)
 throws IOException, ServletException {
 
 TesterHttpServletRequest request = new TesterHttpServletRequest();


-
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: Rename method for clarity

2024-07-22 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 a7bfce552e Rename method for clarity
a7bfce552e is described below

commit a7bfce552efdf60ac35d2d0fbc7699f34ed1ad2b
Author: Mark Thomas 
AuthorDate: Mon Jul 22 20:27:13 2024 +0100

Rename method for clarity
---
 test/org/apache/catalina/filters/TestCorsFilter.java | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/test/org/apache/catalina/filters/TestCorsFilter.java 
b/test/org/apache/catalina/filters/TestCorsFilter.java
index c5f68b1b81..c78854da96 100644
--- a/test/org/apache/catalina/filters/TestCorsFilter.java
+++ b/test/org/apache/catalina/filters/TestCorsFilter.java
@@ -418,40 +418,40 @@ public class TestCorsFilter {
  */
 @Test
 public void testDoFilterSameHostWithOrigin01() throws IOException, 
ServletException {
-doTestDoFilterSameHostWithOrigin01("http://localhost:8080";, "http", 
"localhost", 8080, false);
+doTestDoFilterSameHostWithOrigin("http://localhost:8080";, "http", 
"localhost", 8080, false);
 }
 
 @Test
 public void testDoFilterSameHostWithOrigin02() throws IOException, 
ServletException {
-doTestDoFilterSameHostWithOrigin01("http://localhost:8080";, "https", 
"localhost", 8080, true);
+doTestDoFilterSameHostWithOrigin("http://localhost:8080";, "https", 
"localhost", 8080, true);
 }
 
 @Test
 public void testDoFilterSameHostWithOrigin03() throws IOException, 
ServletException {
-doTestDoFilterSameHostWithOrigin01("http://localhost:8080";, "http", 
"localhost", 8081, true);
+doTestDoFilterSameHostWithOrigin("http://localhost:8080";, "http", 
"localhost", 8081, true);
 }
 
 @Test
 public void testDoFilterSameHostWithOrigin04() throws IOException, 
ServletException {
-doTestDoFilterSameHostWithOrigin01("http://localhost:8080";, "http", 
"foo.dev.local", 8080, true);
+doTestDoFilterSameHostWithOrigin("http://localhost:8080";, "http", 
"foo.dev.local", 8080, true);
 }
 
 @Test
 public void testDoFilterSameHostWithOrigin05() throws IOException, 
ServletException {
-doTestDoFilterSameHostWithOrigin01("https://localhost:8443";, "https", 
"localhost", 8443, false);
+doTestDoFilterSameHostWithOrigin("https://localhost:8443";, "https", 
"localhost", 8443, false);
 }
 
 @Test
 public void testDoFilterSameHostWithOrigin06() throws IOException, 
ServletException {
-doTestDoFilterSameHostWithOrigin01("https://localhost";, "https", 
"localhost", 443, false);
+doTestDoFilterSameHostWithOrigin("https://localhost";, "https", 
"localhost", 443, false);
 }
 
 @Test
 public void testDoFilterSameHostWithOrigin07() throws IOException, 
ServletException {
-doTestDoFilterSameHostWithOrigin01("http://localhost";, "http", 
"localhost", 80, false);
+doTestDoFilterSameHostWithOrigin("http://localhost";, "http", 
"localhost", 80, false);
 }
 
-private void doTestDoFilterSameHostWithOrigin01(String origin, String 
scheme, String host, int port, boolean isCors)
+private void doTestDoFilterSameHostWithOrigin(String origin, String 
scheme, String host, int port, boolean isCors)
 throws IOException, ServletException {
 
 TesterHttpServletRequest request = new TesterHttpServletRequest();


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



(tomcat) branch main updated: Align scheme variance test implementation with port variance

2024-07-22 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 86d538015c Align scheme variance test implementation with port variance
86d538015c is described below

commit 86d538015c0533df852826eecc51332fc6364b32
Author: Mark Thomas 
AuthorDate: Mon Jul 22 20:31:57 2024 +0100

Align scheme variance test implementation with port variance

Without this change, this test will incorrectly fail when BZ 69214 is
fixed
---
 test/org/apache/catalina/filters/TestCorsFilter.java | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/test/org/apache/catalina/filters/TestCorsFilter.java 
b/test/org/apache/catalina/filters/TestCorsFilter.java
index c78854da96..e1c6233fbe 100644
--- a/test/org/apache/catalina/filters/TestCorsFilter.java
+++ b/test/org/apache/catalina/filters/TestCorsFilter.java
@@ -1036,14 +1036,15 @@ public class TestCorsFilter {
  * @throws ServletException
  */
 @Test
-public void testCheckForSchemeVariance() throws ServletException {
+public void testCheckForSchemeVariance() throws ServletException, 
IOException {
 TesterHttpServletRequest request = new TesterHttpServletRequest();
+TesterHttpServletResponse response = new TesterHttpServletResponse();
 request.setHeader(CorsFilter.REQUEST_HEADER_ORIGIN, 
"https://tomcat.apache.org";);
 request.setMethod("POST");
 CorsFilter corsFilter = new CorsFilter();
 corsFilter.init(TesterFilterConfigs.getSpecificOriginFilterConfig());
-CorsFilter.CORSRequestType requestType = 
corsFilter.checkRequestType(request);
-Assert.assertEquals(CorsFilter.CORSRequestType.INVALID_CORS, 
requestType);
+corsFilter.doFilter(request, response, filterChain);
+Assert.assertEquals(HttpServletResponse.SC_FORBIDDEN, 
response.getStatus());
 }
 
 /*


-
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: Align scheme variance test implementation with port variance

2024-07-22 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 690788cf81 Align scheme variance test implementation with port variance
690788cf81 is described below

commit 690788cf8190e05cdf201bfec16d9d8de7ccf529
Author: Mark Thomas 
AuthorDate: Mon Jul 22 20:31:57 2024 +0100

Align scheme variance test implementation with port variance

Without this change, this test will incorrectly fail when BZ 69214 is
fixed
---
 test/org/apache/catalina/filters/TestCorsFilter.java | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/test/org/apache/catalina/filters/TestCorsFilter.java 
b/test/org/apache/catalina/filters/TestCorsFilter.java
index c78854da96..e1c6233fbe 100644
--- a/test/org/apache/catalina/filters/TestCorsFilter.java
+++ b/test/org/apache/catalina/filters/TestCorsFilter.java
@@ -1036,14 +1036,15 @@ public class TestCorsFilter {
  * @throws ServletException
  */
 @Test
-public void testCheckForSchemeVariance() throws ServletException {
+public void testCheckForSchemeVariance() throws ServletException, 
IOException {
 TesterHttpServletRequest request = new TesterHttpServletRequest();
+TesterHttpServletResponse response = new TesterHttpServletResponse();
 request.setHeader(CorsFilter.REQUEST_HEADER_ORIGIN, 
"https://tomcat.apache.org";);
 request.setMethod("POST");
 CorsFilter corsFilter = new CorsFilter();
 corsFilter.init(TesterFilterConfigs.getSpecificOriginFilterConfig());
-CorsFilter.CORSRequestType requestType = 
corsFilter.checkRequestType(request);
-Assert.assertEquals(CorsFilter.CORSRequestType.INVALID_CORS, 
requestType);
+corsFilter.doFilter(request, response, filterChain);
+Assert.assertEquals(HttpServletResponse.SC_FORBIDDEN, 
response.getStatus());
 }
 
 /*


-
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: Align scheme variance test implementation with port variance

2024-07-22 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 4e6c7141ec Align scheme variance test implementation with port variance
4e6c7141ec is described below

commit 4e6c7141ec0e7f86d57b117a667eb0dd8d423e81
Author: Mark Thomas 
AuthorDate: Mon Jul 22 20:31:57 2024 +0100

Align scheme variance test implementation with port variance

Without this change, this test will incorrectly fail when BZ 69214 is
fixed
---
 test/org/apache/catalina/filters/TestCorsFilter.java | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/test/org/apache/catalina/filters/TestCorsFilter.java 
b/test/org/apache/catalina/filters/TestCorsFilter.java
index dc6affb3b8..7989a85145 100644
--- a/test/org/apache/catalina/filters/TestCorsFilter.java
+++ b/test/org/apache/catalina/filters/TestCorsFilter.java
@@ -1036,14 +1036,15 @@ public class TestCorsFilter {
  * @throws ServletException
  */
 @Test
-public void testCheckForSchemeVariance() throws ServletException {
+public void testCheckForSchemeVariance() throws ServletException, 
IOException {
 TesterHttpServletRequest request = new TesterHttpServletRequest();
+TesterHttpServletResponse response = new TesterHttpServletResponse();
 request.setHeader(CorsFilter.REQUEST_HEADER_ORIGIN, 
"https://tomcat.apache.org";);
 request.setMethod("POST");
 CorsFilter corsFilter = new CorsFilter();
 corsFilter.init(TesterFilterConfigs.getSpecificOriginFilterConfig());
-CorsFilter.CORSRequestType requestType = 
corsFilter.checkRequestType(request);
-Assert.assertEquals(CorsFilter.CORSRequestType.INVALID_CORS, 
requestType);
+corsFilter.doFilter(request, response, filterChain);
+Assert.assertEquals(HttpServletResponse.SC_FORBIDDEN, 
response.getStatus());
 }
 
 /*


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



(tomcat-tck) branch main updated: Add the Jakarta Annotations TCK 3.0.0

2024-07-22 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-tck.git


The following commit(s) were added to refs/heads/main by this push:
 new 1beb5f6  Add the Jakarta Annotations TCK 3.0.0
1beb5f6 is described below

commit 1beb5f6e7ef5a11bde636f29b1ad61e1146c69e1
Author: Mark Thomas 
AuthorDate: Mon Jul 22 20:37:36 2024 +0100

Add the Jakarta Annotations TCK 3.0.0
---
 README.md   |  8 +++-
 annotations-tck/pom.xml | 99 +
 download/pom.xml| 23 
 pom.xml |  2 +
 4 files changed, 131 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 6391e0d..95ac6cf 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,13 @@
 
 This is a Maven project that can be used to run the refactored TCK (Jakarta 11 
onwards) with Tomcat 11.
 
-At the moment, you will need to manually install the TCKs into your local 
Maven repository (see below).
+### Running the Annotations TCK
+
+1. Review the component TCK and Tomcat versions in `$TCK_TOMCAT/pom.xml` and 
edit as required.
+
+1. `cd $TOMCAT_TCK\annotations-tck`
+
+1. `mvn verify`
 
 ### Running the EL TCK
 
diff --git a/annotations-tck/pom.xml b/annotations-tck/pom.xml
new file mode 100644
index 000..945cd87
--- /dev/null
+++ b/annotations-tck/pom.xml
@@ -0,0 +1,99 @@
+
+
+http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+annotations-tck
+jar
+4.0.0
+
+
+org.apache.tomcat
+tck
+11.0.0-SNAPSHOT
+../pom.xml
+
+
+
+
+jakarta.annotation
+jakarta-annotations-tck
+${tck.annotations.version}
+
+  
+jakarta.annotations
+jakarta.annotations-api
+  
+
+
+
+jakarta.tck
+sigtest-maven-plugin
+2.1
+
+  
+org.netbeans.tools
+ct-sym
+  
+
+
+
+org.apache.tomcat
+tomcat-annotations-api
+${tomcat.version}
+
+
+
+
+
+
+org.apache.maven.plugins
+maven-failsafe-plugin
+${failsafe.plugin.version}
+
+
+
+integration-test
+verify
+
+
+
jakarta.annotation:jakarta-annotations-tck
+
+true
+
${project.build.directory}/jimage
+
${settings.localRepository}/org/apache/tomcat/tomcat-annotations-api/${tomcat.version}/tomcat-annotations-api-${tomcat.version}.jar${path.separator}${project.build.directory}/jimage/java.base
+true
+
true
+true
+true
+true
+true
+
true
+
true
+
true
+
true
+
true
+
true
+
true
+
+
+
+
+
+
+
+
diff --git a/download/pom.xml b/download/pom.xml
index 8825802..bedc40b 100644
--- a/download/pom.xml
+++ b/download/pom.xml
@@ -35,6 +35,19 @@
 download-maven-plugin
 ${download.maven.plugin.version}
 
+
+download-annotations-tck
+pre-integration-test
+
+wget
+
+
+
https://download.eclipse.org/jakartaee/annotations/3.0/jakarta-annotations-tck-${tck.annotations.version}.zip
+true
+
${project.build.directory}
+
9421c6ca66274d32dfb408848f75a42d57f120599fe0d8403c5c5c1141d5ac4d
+
+
 
 download-el-tck
 pre-integration-test
@@ -111,6 +124,16 @@
 maven-install-plugin
 ${maven.install.plugin.version}
 
+
+install-annotations-tck
+   

(tomcat) branch main updated: Fix BZ 69214. CORS. POST with no content-type is not a reason to reject

2024-07-22 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 5c63d0f17d Fix BZ 69214. CORS. POST with no content-type is not a 
reason to reject
5c63d0f17d is described below

commit 5c63d0f17d3437c40fb72bc154104e7797dda2c5
Author: Mark Thomas 
AuthorDate: Mon Jul 22 20:44:25 2024 +0100

Fix BZ 69214. CORS. POST with no content-type is not a reason to reject

https://bz.apache.org/bugzilla/show_bug.cgi?id=69214
---
 java/org/apache/catalina/filters/CorsFilter.java |  4 +++-
 test/org/apache/catalina/filters/TestCorsFilter.java | 18 +-
 webapps/docs/changelog.xml   |  6 ++
 3 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/filters/CorsFilter.java 
b/java/org/apache/catalina/filters/CorsFilter.java
index 4fb910c533..504af77dcf 100644
--- a/java/org/apache/catalina/filters/CorsFilter.java
+++ b/java/org/apache/catalina/filters/CorsFilter.java
@@ -567,7 +567,9 @@ public class CorsFilter extends GenericFilter {
 requestType = CORSRequestType.SIMPLE;
 } else if ("POST".equals(method)) {
 String mediaType = 
getMediaType(request.getContentType());
-if (mediaType != null) {
+if (mediaType == null) {
+requestType = CORSRequestType.SIMPLE;
+} else {
 if 
(SIMPLE_HTTP_REQUEST_CONTENT_TYPE_VALUES.contains(mediaType)) {
 requestType = CORSRequestType.SIMPLE;
 } else {
diff --git a/test/org/apache/catalina/filters/TestCorsFilter.java 
b/test/org/apache/catalina/filters/TestCorsFilter.java
index e1c6233fbe..f05af1beaf 100644
--- a/test/org/apache/catalina/filters/TestCorsFilter.java
+++ b/test/org/apache/catalina/filters/TestCorsFilter.java
@@ -703,7 +703,7 @@ public class TestCorsFilter {
  * @throws ServletException
  */
 @Test
-public void testCheckSimpleRequestType() throws ServletException {
+public void testCheckSimpleRequestTypeGet() throws ServletException {
 TesterHttpServletRequest request = new TesterHttpServletRequest();
 request.setHeader(CorsFilter.REQUEST_HEADER_ORIGIN, 
TesterFilterConfigs.HTTP_TOMCAT_APACHE_ORG);
 request.setMethod("GET");
@@ -713,6 +713,22 @@ public class TestCorsFilter {
 Assert.assertEquals(CorsFilter.CORSRequestType.SIMPLE, requestType);
 }
 
+/*
+ * Happy path test, when a valid CORS Simple request arrives.
+ *
+ * @throws ServletException
+ */
+@Test
+public void testCheckSimpleRequestTypePost() throws ServletException {
+TesterHttpServletRequest request = new TesterHttpServletRequest();
+request.setHeader(CorsFilter.REQUEST_HEADER_ORIGIN, 
TesterFilterConfigs.HTTP_TOMCAT_APACHE_ORG);
+request.setMethod("POST");
+CorsFilter corsFilter = new CorsFilter();
+corsFilter.init(TesterFilterConfigs.getDefaultFilterConfig());
+CorsFilter.CORSRequestType requestType = 
corsFilter.checkRequestType(request);
+Assert.assertEquals(CorsFilter.CORSRequestType.SIMPLE, requestType);
+}
+
 /*
  * Happy path test, when a valid CORS Simple request arrives.
  *
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 0fa7268704..f36677baf7 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -115,6 +115,12 @@
 the Servlet API (removing the need for the cast) in Servlet 6.2 
onwards.
 (markt)
   
+  
+69214: Do not reject a CORS request that uses POST but does
+not include a content-type header. Tomcat now correctly
+processes this as a simple CORS request. Based on a patch suggested by
+thebluemountain. (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: Fix BZ 69214. CORS. POST with no content-type is not a reason to reject

2024-07-22 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 a2da7fbf8b Fix BZ 69214. CORS. POST with no content-type is not a 
reason to reject
a2da7fbf8b is described below

commit a2da7fbf8b119fc3b06b4b514483e3eae8d1fbb7
Author: Mark Thomas 
AuthorDate: Mon Jul 22 20:44:25 2024 +0100

Fix BZ 69214. CORS. POST with no content-type is not a reason to reject

https://bz.apache.org/bugzilla/show_bug.cgi?id=69214
---
 java/org/apache/catalina/filters/CorsFilter.java |  4 +++-
 test/org/apache/catalina/filters/TestCorsFilter.java | 18 +-
 webapps/docs/changelog.xml   |  6 ++
 3 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/filters/CorsFilter.java 
b/java/org/apache/catalina/filters/CorsFilter.java
index 6fb793ad3f..05dee30c9f 100644
--- a/java/org/apache/catalina/filters/CorsFilter.java
+++ b/java/org/apache/catalina/filters/CorsFilter.java
@@ -567,7 +567,9 @@ public class CorsFilter extends GenericFilter {
 requestType = CORSRequestType.SIMPLE;
 } else if ("POST".equals(method)) {
 String mediaType = 
getMediaType(request.getContentType());
-if (mediaType != null) {
+if (mediaType == null) {
+requestType = CORSRequestType.SIMPLE;
+} else {
 if 
(SIMPLE_HTTP_REQUEST_CONTENT_TYPE_VALUES.contains(mediaType)) {
 requestType = CORSRequestType.SIMPLE;
 } else {
diff --git a/test/org/apache/catalina/filters/TestCorsFilter.java 
b/test/org/apache/catalina/filters/TestCorsFilter.java
index 7989a85145..d4b6694d35 100644
--- a/test/org/apache/catalina/filters/TestCorsFilter.java
+++ b/test/org/apache/catalina/filters/TestCorsFilter.java
@@ -703,7 +703,7 @@ public class TestCorsFilter {
  * @throws ServletException
  */
 @Test
-public void testCheckSimpleRequestType() throws ServletException {
+public void testCheckSimpleRequestTypeGet() throws ServletException {
 TesterHttpServletRequest request = new TesterHttpServletRequest();
 request.setHeader(CorsFilter.REQUEST_HEADER_ORIGIN, 
TesterFilterConfigs.HTTP_TOMCAT_APACHE_ORG);
 request.setMethod("GET");
@@ -713,6 +713,22 @@ public class TestCorsFilter {
 Assert.assertEquals(CorsFilter.CORSRequestType.SIMPLE, requestType);
 }
 
+/*
+ * Happy path test, when a valid CORS Simple request arrives.
+ *
+ * @throws ServletException
+ */
+@Test
+public void testCheckSimpleRequestTypePost() throws ServletException {
+TesterHttpServletRequest request = new TesterHttpServletRequest();
+request.setHeader(CorsFilter.REQUEST_HEADER_ORIGIN, 
TesterFilterConfigs.HTTP_TOMCAT_APACHE_ORG);
+request.setMethod("POST");
+CorsFilter corsFilter = new CorsFilter();
+corsFilter.init(TesterFilterConfigs.getDefaultFilterConfig());
+CorsFilter.CORSRequestType requestType = 
corsFilter.checkRequestType(request);
+Assert.assertEquals(CorsFilter.CORSRequestType.SIMPLE, requestType);
+}
+
 /*
  * Happy path test, when a valid CORS Simple request arrives.
  *
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 9d098de379..fad32fca8c 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -115,6 +115,12 @@
 the Servlet API (removing the need for the cast) in Servlet 6.2 
onwards.
 (markt)
   
+  
+69214: Do not reject a CORS request that uses POST but does
+not include a content-type header. Tomcat now correctly
+processes this as a simple CORS request. Based on a patch suggested by
+thebluemountain. (markt)
+  
 
   
   


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



[Bug 69214] CORSFilter prevent requests with POST method with no content type

2024-07-22 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=69214

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-M23 onwards
- 10.1.x for 10.1.27 onwards
-  9.0.x for  9.0.92 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



(tomcat) branch 10.1.x updated: Fix BZ 69214. CORS. POST with no content-type is not a reason to reject

2024-07-22 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 9e1aebd2d1 Fix BZ 69214. CORS. POST with no content-type is not a 
reason to reject
9e1aebd2d1 is described below

commit 9e1aebd2d166bb9216776c6e934ad279d2ea2cbb
Author: Mark Thomas 
AuthorDate: Mon Jul 22 20:44:25 2024 +0100

Fix BZ 69214. CORS. POST with no content-type is not a reason to reject

https://bz.apache.org/bugzilla/show_bug.cgi?id=69214
---
 java/org/apache/catalina/filters/CorsFilter.java |  4 +++-
 test/org/apache/catalina/filters/TestCorsFilter.java | 18 +-
 webapps/docs/changelog.xml   |  6 ++
 3 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/filters/CorsFilter.java 
b/java/org/apache/catalina/filters/CorsFilter.java
index 4fb910c533..504af77dcf 100644
--- a/java/org/apache/catalina/filters/CorsFilter.java
+++ b/java/org/apache/catalina/filters/CorsFilter.java
@@ -567,7 +567,9 @@ public class CorsFilter extends GenericFilter {
 requestType = CORSRequestType.SIMPLE;
 } else if ("POST".equals(method)) {
 String mediaType = 
getMediaType(request.getContentType());
-if (mediaType != null) {
+if (mediaType == null) {
+requestType = CORSRequestType.SIMPLE;
+} else {
 if 
(SIMPLE_HTTP_REQUEST_CONTENT_TYPE_VALUES.contains(mediaType)) {
 requestType = CORSRequestType.SIMPLE;
 } else {
diff --git a/test/org/apache/catalina/filters/TestCorsFilter.java 
b/test/org/apache/catalina/filters/TestCorsFilter.java
index e1c6233fbe..f05af1beaf 100644
--- a/test/org/apache/catalina/filters/TestCorsFilter.java
+++ b/test/org/apache/catalina/filters/TestCorsFilter.java
@@ -703,7 +703,7 @@ public class TestCorsFilter {
  * @throws ServletException
  */
 @Test
-public void testCheckSimpleRequestType() throws ServletException {
+public void testCheckSimpleRequestTypeGet() throws ServletException {
 TesterHttpServletRequest request = new TesterHttpServletRequest();
 request.setHeader(CorsFilter.REQUEST_HEADER_ORIGIN, 
TesterFilterConfigs.HTTP_TOMCAT_APACHE_ORG);
 request.setMethod("GET");
@@ -713,6 +713,22 @@ public class TestCorsFilter {
 Assert.assertEquals(CorsFilter.CORSRequestType.SIMPLE, requestType);
 }
 
+/*
+ * Happy path test, when a valid CORS Simple request arrives.
+ *
+ * @throws ServletException
+ */
+@Test
+public void testCheckSimpleRequestTypePost() throws ServletException {
+TesterHttpServletRequest request = new TesterHttpServletRequest();
+request.setHeader(CorsFilter.REQUEST_HEADER_ORIGIN, 
TesterFilterConfigs.HTTP_TOMCAT_APACHE_ORG);
+request.setMethod("POST");
+CorsFilter corsFilter = new CorsFilter();
+corsFilter.init(TesterFilterConfigs.getDefaultFilterConfig());
+CorsFilter.CORSRequestType requestType = 
corsFilter.checkRequestType(request);
+Assert.assertEquals(CorsFilter.CORSRequestType.SIMPLE, requestType);
+}
+
 /*
  * Happy path test, when a valid CORS Simple request arrives.
  *
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 9511034e32..ea44079cc0 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -115,6 +115,12 @@
 the Servlet API (removing the need for the cast) in Servlet 6.2 
onwards.
 (markt)
   
+  
+69214: Do not reject a CORS request that uses POST but does
+not include a content-type header. Tomcat now correctly
+processes this as a simple CORS request. Based on a patch suggested by
+thebluemountain. (markt)
+  
 
   
   


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



Re: TCK CI runs

2024-07-22 Thread Christopher Schultz

Mark,

On 7/22/24 12:53, Mark Thomas wrote:

All,

Today I have configured the tomcat-tck repository to run the EL, 
Servlet, Pages and WebSocket TCKs once every day for all combinations of 
JDK 17 & 21, Ubuntu latest, MacOS latest and Windows latest using GitHub 
actions.


There were a few issues to iron out but these should now all be resolved.

The TCK will run at just after 08.00 UTC every day and it will use the 
latest Tomcat 11 SNAPSHOT (these are updated on every commit by buildbot).


Windows seems to take a little longer than the others but the full TCK 
run (all four TCKs) is complete in just under 25 minutes. Considering it 
used to take longer than that to run any of the old TCKs, kudos to the 
Jakarta EE folks that have been working on the refactoring.


Tomcat 11.0.x currently passes the TCK (as it should).

I have no plans to formally certify Tomcat as passing the TCK over and 
above what I have already completed as part of the release process for 
each of the specifications (the specification release process requires 
at least one compatible implementation).


Nice work.

My guess is that getting Tomcat to be formally-certified would take (1) 
money (2) politics and (3) other stuff nobody wants to deal with any 
time soon.


I wonder if we made it so easy to certify (e.g. automated builds and 
automated TCK executions) that someone else might just do it for us (I'm 
looking at you, /Eclipse Foundation/.. I seem to remember a conference 
presentation about how important Tomcat was to Eclipse).


When the TCK runs, does it produce a report which includes the 
identities of the files that were used to run produce that report? 
Specifically, I'm wondering if the TCK report can be used to verify that 
a *specific release* has passed and TCK and that can be verified by an 
external observer.


I'm not volunteering to add TCK runs as part of the standard release 
process but if "anyone" could produce a TCK report which shows the 
entirely-reproducible build that is Tomcat x.y.z is what has been 
tested, that would be really great.


Instead of just "trust me, I ran it on my machine and this report says 
it passed", anyone could verify that the same artifacts we released were 
the ones the TCK was run on.


-chris

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