[tomcat] branch main updated (a09ce7c -> 8424677)

2021-06-07 Thread remm
This is an automated email from the ASF dual-hosted git repository.

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


from a09ce7c  Update Korean translations
 add 8424677  Update version numbers

No new revisions were added by this update.

Summary of changes:
 modules/stuffed/pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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



[tomcat] branch 10.0.x updated: Packaging on main only

2021-06-07 Thread remm
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/10.0.x by this push:
 new 89c2474  Packaging on main only
89c2474 is described below

commit 89c2474ca9cc3452a5ce45f33d099edfa6d3dbf2
Author: remm 
AuthorDate: Mon Jun 7 09:30:48 2021 +0200

Packaging on main only

The packaging is only needed on the main branch (as long as it is
compatible of course).
---
 modules/stuffed/Dockerfile |  56 --
 modules/stuffed/DockerfileGraal|  41 ---
 modules/stuffed/README.md  |  88 --
 modules/stuffed/pom.xml| 130 -
 modules/stuffed/tomcat-jni.json|   7 --
 modules/stuffed/tomcat-reflection.json |  51 -
 modules/stuffed/tomcat-resource.json   |  82 -
 modules/stuffed/tomcat.yaml|  51 -
 modules/stuffed/webapp-jspc.ant.xml|  50 -
 9 files changed, 556 deletions(-)

diff --git a/modules/stuffed/Dockerfile b/modules/stuffed/Dockerfile
deleted file mode 100644
index 5055dc4..000
--- a/modules/stuffed/Dockerfile
+++ /dev/null
@@ -1,56 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-FROM openjdk:8-jre
-VOLUME /tmp
-
-USER root
-RUN mkdir -m 777 -p /deployments
-
-ADD target/tomcat-stuffed-1.0.jar /deployments/app.jar
-ADD conf /deployments/conf
-ADD webapps /deployments/webapps
-RUN chmod 777 /deployments/webapps
-
-WORKDIR /deployments
-
-ARG namespace=tomcat
-ENV KUBERNETES_NAMESPACE=$namespace
-ARG port=8080
-EXPOSE $port
-
-ENV JAVA_OPTS="-Dcatalina.base=. -Djava.security.egd=file:/dev/urandom"
-
-# Add JULI logging configuration
-ENV JAVA_OPTS="${JAVA_OPTS} 
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 
-Djava.util.logging.config.file=conf/logging.properties"
-
-RUN sh -c 'touch app.jar'
-
-RUN mkdir -p /opt
-
-# Optional: Add Jolokia agent for JMX monitoring and management
-# RUN mkdir /opt/jolokia && wget 
https://repo.maven.apache.org/maven2/org/jolokia/jolokia-jvm/1.6.2/jolokia-jvm-1.6.2-agent.jar
 -O /opt/jolokia/jolokia.jar
-# ARG jolokiaport=8778
-# ENV 
JAVA_OPTS="-javaagent:/opt/jolokia/jolokia.jar=host=*,port=$jolokiaport,protocol=https,authIgnoreCerts=true
 ${JAVA_OPTS}"
-# EXPOSE $jolokiaport
-
-# Optional: Add Prometheus agent for JMX monitoring
-# RUN mkdir /opt/prometheus && wget 
https://repo.maven.apache.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/0.15.0/jmx_prometheus_javaagent-0.15.0.jar
 -O /opt/prometheus/prometheus.jar && wget 
https://raw.githubusercontent.com/prometheus/jmx_exporter/master/example_configs/tomcat.yml
 -O conf/prometheus.yaml
-# ARG prometheusport=9404
-# ENV 
JAVA_OPTS="-javaagent:/opt/prometheus/prometheus.jar=$prometheusport:conf/prometheus.yaml
 ${JAVA_OPTS}"
-# EXPOSE $prometheusport
-
-ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -jar app.jar" ]
diff --git a/modules/stuffed/DockerfileGraal b/modules/stuffed/DockerfileGraal
deleted file mode 100644
index 19e2353..000
--- a/modules/stuffed/DockerfileGraal
+++ /dev/null
@@ -1,41 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-FROM busybox:glibc
-
-VOLUME /tmp
-
-USER root
-RUN mkdir -m 777 -p /deployments
-
-ADD tomcat-stuffed-1.0 /deployments/app
-ADD conf /deployments/conf
-ADD webapps /deployments/webapps
-
-WORKDIR /

[Bug 65362] New: Missing uses-Directives in JPMS descriptor of tomcat-embed-websocket.jar

2021-06-07 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=65362

Bug ID: 65362
   Summary: Missing uses-Directives in JPMS descriptor of
tomcat-embed-websocket.jar
   Product: Tomcat 9
   Version: 9.0.46
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: Packaging
  Assignee: dev@tomcat.apache.org
  Reporter: michael.kai...@invaris.com
  Target Milestone: -

The module-info.class of tomcat-embed-websocket.jar is missing the following
two uses directives to be able to be used in a project that enables the JPMS.

uses javax.websocket.ContainerProvider;
uses javax.websocket.server.ServerEndpointConfig.Configurator;

The first one is required because
javax.websocket.ContainerProvider#getWebSocketContainer() calls
ServiceLoader.load(ContainerProvider.class).

The second one is required because
javax.websocket.server.ServerEndpointConfig.Configurator#loadDefault() calls
ServiceLoader.load(ServerEndpointConfig.Configurator.class).

Both calls fail with a ServiceConfigurationError if the uses directives are
missing. I managed to fix this issue locally by patching the JAR in such a way,
that both uses directives are included.

This bug is analogous to #64751.

I believe (but did not verify) that the same bug occurs in Tomcat 10 as well.

-- 
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: Fix BZ 65358 - Improve EL matching of varargs methods.

2021-06-07 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 a915ed9  Fix BZ 65358 - Improve EL matching of varargs methods.
a915ed9 is described below

commit a915ed99eca67cab13d3ed0d1269bf1594a0f605
Author: Mark Thomas 
AuthorDate: Mon Jun 7 14:37:49 2021 +0100

Fix BZ 65358 - Improve EL matching of varargs methods.

https://bz.apache.org/bugzilla/show_bug.cgi?id=65358
---
 java/jakarta/el/Util.java|  58 +++---
 java/org/apache/el/util/ReflectionUtil.java  |  74 
 test/jakarta/el/TestBeanELResolver.java  |   8 +-
 test/org/apache/el/TestMethodExpressionImpl.java | 214 +++
 test/org/apache/el/TesterBeanF.java  |  82 +
 test/org/apache/el/TesterBeanG.java  |  42 +
 test/org/apache/el/TesterBeanH.java  |  29 +++
 webapps/docs/changelog.xml   |   6 +
 8 files changed, 455 insertions(+), 58 deletions(-)

diff --git a/java/jakarta/el/Util.java b/java/jakarta/el/Util.java
index 66a1ca5..03a687a 100644
--- a/java/jakarta/el/Util.java
+++ b/java/jakarta/el/Util.java
@@ -269,19 +269,22 @@ class Util {
 int exactMatch = 0;
 int assignableMatch = 0;
 int coercibleMatch = 0;
+int varArgsMatch = 0;
 boolean noMatch = false;
 for (int i = 0; i < mParamCount; i++) {
 // Can't be null
 if (w.isVarArgs() && i == (mParamCount - 1)) {
 if (i == paramCount || (paramValues != null && 
paramValues.length == i)) {
-// Nothing is passed as varargs
-assignableMatch++;
+// Var args defined but nothing is passed as varargs
+// Use MAX_VALUE so this matches only if nothing else 
does
+varArgsMatch = Integer.MAX_VALUE;
 break;
 }
 Class varType = mParamTypes[i].getComponentType();
 for (int j = i; j < paramCount; j++) {
 if (isAssignableFrom(paramTypes[j], varType)) {
 assignableMatch++;
+varArgsMatch++;
 } else {
 if (paramValues == null) {
 noMatch = true;
@@ -289,6 +292,7 @@ class Util {
 } else {
 if (isCoercibleFrom(paramValues[j], varType)) {
 coercibleMatch++;
+varArgsMatch++;
 } else {
 noMatch = true;
 break;
@@ -324,18 +328,17 @@ class Util {
 }
 
 // If a method is found where every parameter matches exactly,
-// return it
-if (exactMatch == paramCount) {
+// and no vars args are present, return it
+if (exactMatch == paramCount && varArgsMatch == 0) {
 return w;
 }
 
-candidates.put(w, new MatchResult(
-exactMatch, assignableMatch, coercibleMatch, 
w.isBridge()));
+candidates.put(w, new MatchResult(exactMatch, assignableMatch, 
coercibleMatch, varArgsMatch, w.isBridge()));
 }
 
 // Look for the method that has the highest number of parameters where
 // the type matches exactly
-MatchResult bestMatch = new MatchResult(0, 0, 0, false);
+MatchResult bestMatch = new MatchResult(0, 0, 0, 0, false);
 Wrapper match = null;
 boolean multiple = false;
 for (Map.Entry, MatchResult> entry : candidates.entrySet()) 
{
@@ -753,12 +756,14 @@ class Util {
 private final int exact;
 private final int assignable;
 private final int coercible;
+private final int varArgs;
 private final boolean bridge;
 
-public MatchResult(int exact, int assignable, int coercible, boolean 
bridge) {
+public MatchResult(int exact, int assignable, int coercible, int 
varArgs, boolean bridge) {
 this.exact = exact;
 this.assignable = assignable;
 this.coercible = coercible;
+this.varArgs = varArgs;
 this.bridge = bridge;
 }
 
@@ -774,6 +779,10 @@ class Util {
 return coercible;
 }
 
+public int getVarArgs() {
+return varArgs;
+}
+
 public boolean isBridge() {
 return bridge;
 }
@@ -786,11 +795,15 @@ class Util {
 if (cmp == 0) {
 cmp = Integer.compare(this.getCoercible(), 
o.getCoercible()

[tomcat] branch 10.0.x updated: Fix BZ 65358 - Improve EL matching of varargs methods.

2021-06-07 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/10.0.x by this push:
 new d44931e  Fix BZ 65358 - Improve EL matching of varargs methods.
d44931e is described below

commit d44931e389255dccf574f1ca940fba40337ec229
Author: Mark Thomas 
AuthorDate: Mon Jun 7 14:37:49 2021 +0100

Fix BZ 65358 - Improve EL matching of varargs methods.

https://bz.apache.org/bugzilla/show_bug.cgi?id=65358
---
 java/jakarta/el/Util.java|  58 +++---
 java/org/apache/el/util/ReflectionUtil.java  |  74 
 test/jakarta/el/TestBeanELResolver.java  |   8 +-
 test/org/apache/el/TestMethodExpressionImpl.java | 214 +++
 test/org/apache/el/TesterBeanF.java  |  82 +
 test/org/apache/el/TesterBeanG.java  |  42 +
 test/org/apache/el/TesterBeanH.java  |  29 +++
 webapps/docs/changelog.xml   |   6 +
 8 files changed, 455 insertions(+), 58 deletions(-)

diff --git a/java/jakarta/el/Util.java b/java/jakarta/el/Util.java
index 66a1ca5..03a687a 100644
--- a/java/jakarta/el/Util.java
+++ b/java/jakarta/el/Util.java
@@ -269,19 +269,22 @@ class Util {
 int exactMatch = 0;
 int assignableMatch = 0;
 int coercibleMatch = 0;
+int varArgsMatch = 0;
 boolean noMatch = false;
 for (int i = 0; i < mParamCount; i++) {
 // Can't be null
 if (w.isVarArgs() && i == (mParamCount - 1)) {
 if (i == paramCount || (paramValues != null && 
paramValues.length == i)) {
-// Nothing is passed as varargs
-assignableMatch++;
+// Var args defined but nothing is passed as varargs
+// Use MAX_VALUE so this matches only if nothing else 
does
+varArgsMatch = Integer.MAX_VALUE;
 break;
 }
 Class varType = mParamTypes[i].getComponentType();
 for (int j = i; j < paramCount; j++) {
 if (isAssignableFrom(paramTypes[j], varType)) {
 assignableMatch++;
+varArgsMatch++;
 } else {
 if (paramValues == null) {
 noMatch = true;
@@ -289,6 +292,7 @@ class Util {
 } else {
 if (isCoercibleFrom(paramValues[j], varType)) {
 coercibleMatch++;
+varArgsMatch++;
 } else {
 noMatch = true;
 break;
@@ -324,18 +328,17 @@ class Util {
 }
 
 // If a method is found where every parameter matches exactly,
-// return it
-if (exactMatch == paramCount) {
+// and no vars args are present, return it
+if (exactMatch == paramCount && varArgsMatch == 0) {
 return w;
 }
 
-candidates.put(w, new MatchResult(
-exactMatch, assignableMatch, coercibleMatch, 
w.isBridge()));
+candidates.put(w, new MatchResult(exactMatch, assignableMatch, 
coercibleMatch, varArgsMatch, w.isBridge()));
 }
 
 // Look for the method that has the highest number of parameters where
 // the type matches exactly
-MatchResult bestMatch = new MatchResult(0, 0, 0, false);
+MatchResult bestMatch = new MatchResult(0, 0, 0, 0, false);
 Wrapper match = null;
 boolean multiple = false;
 for (Map.Entry, MatchResult> entry : candidates.entrySet()) 
{
@@ -753,12 +756,14 @@ class Util {
 private final int exact;
 private final int assignable;
 private final int coercible;
+private final int varArgs;
 private final boolean bridge;
 
-public MatchResult(int exact, int assignable, int coercible, boolean 
bridge) {
+public MatchResult(int exact, int assignable, int coercible, int 
varArgs, boolean bridge) {
 this.exact = exact;
 this.assignable = assignable;
 this.coercible = coercible;
+this.varArgs = varArgs;
 this.bridge = bridge;
 }
 
@@ -774,6 +779,10 @@ class Util {
 return coercible;
 }
 
+public int getVarArgs() {
+return varArgs;
+}
+
 public boolean isBridge() {
 return bridge;
 }
@@ -786,11 +795,15 @@ class Util {
 if (cmp == 0) {
 cmp = Integer.compare(this.getCoercible(), 
o.getCoercib

[tomcat] branch 9.0.x updated: Fix BZ 65358 - Improve EL matching of varargs methods.

2021-06-07 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 4f5a355  Fix BZ 65358 - Improve EL matching of varargs methods.
4f5a355 is described below

commit 4f5a35563f83e28aa341f69c9dd7a856a0aed895
Author: Mark Thomas 
AuthorDate: Mon Jun 7 14:37:49 2021 +0100

Fix BZ 65358 - Improve EL matching of varargs methods.

https://bz.apache.org/bugzilla/show_bug.cgi?id=65358
---
 java/javax/el/Util.java  |  58 +++---
 java/org/apache/el/util/ReflectionUtil.java  |  74 
 test/javax/el/TestBeanELResolver.java|   8 +-
 test/org/apache/el/TestMethodExpressionImpl.java | 214 +++
 test/org/apache/el/TesterBeanF.java  |  82 +
 test/org/apache/el/TesterBeanG.java  |  42 +
 test/org/apache/el/TesterBeanH.java  |  29 +++
 webapps/docs/changelog.xml   |   6 +
 8 files changed, 455 insertions(+), 58 deletions(-)

diff --git a/java/javax/el/Util.java b/java/javax/el/Util.java
index c478e54..b9a9cd3 100644
--- a/java/javax/el/Util.java
+++ b/java/javax/el/Util.java
@@ -269,19 +269,22 @@ class Util {
 int exactMatch = 0;
 int assignableMatch = 0;
 int coercibleMatch = 0;
+int varArgsMatch = 0;
 boolean noMatch = false;
 for (int i = 0; i < mParamCount; i++) {
 // Can't be null
 if (w.isVarArgs() && i == (mParamCount - 1)) {
 if (i == paramCount || (paramValues != null && 
paramValues.length == i)) {
-// Nothing is passed as varargs
-assignableMatch++;
+// Var args defined but nothing is passed as varargs
+// Use MAX_VALUE so this matches only if nothing else 
does
+varArgsMatch = Integer.MAX_VALUE;
 break;
 }
 Class varType = mParamTypes[i].getComponentType();
 for (int j = i; j < paramCount; j++) {
 if (isAssignableFrom(paramTypes[j], varType)) {
 assignableMatch++;
+varArgsMatch++;
 } else {
 if (paramValues == null) {
 noMatch = true;
@@ -289,6 +292,7 @@ class Util {
 } else {
 if (isCoercibleFrom(paramValues[j], varType)) {
 coercibleMatch++;
+varArgsMatch++;
 } else {
 noMatch = true;
 break;
@@ -324,18 +328,17 @@ class Util {
 }
 
 // If a method is found where every parameter matches exactly,
-// return it
-if (exactMatch == paramCount) {
+// and no vars args are present, return it
+if (exactMatch == paramCount && varArgsMatch == 0) {
 return w;
 }
 
-candidates.put(w, new MatchResult(
-exactMatch, assignableMatch, coercibleMatch, 
w.isBridge()));
+candidates.put(w, new MatchResult(exactMatch, assignableMatch, 
coercibleMatch, varArgsMatch, w.isBridge()));
 }
 
 // Look for the method that has the highest number of parameters where
 // the type matches exactly
-MatchResult bestMatch = new MatchResult(0, 0, 0, false);
+MatchResult bestMatch = new MatchResult(0, 0, 0, 0, false);
 Wrapper match = null;
 boolean multiple = false;
 for (Map.Entry, MatchResult> entry : candidates.entrySet()) 
{
@@ -753,12 +756,14 @@ class Util {
 private final int exact;
 private final int assignable;
 private final int coercible;
+private final int varArgs;
 private final boolean bridge;
 
-public MatchResult(int exact, int assignable, int coercible, boolean 
bridge) {
+public MatchResult(int exact, int assignable, int coercible, int 
varArgs, boolean bridge) {
 this.exact = exact;
 this.assignable = assignable;
 this.coercible = coercible;
+this.varArgs = varArgs;
 this.bridge = bridge;
 }
 
@@ -774,6 +779,10 @@ class Util {
 return coercible;
 }
 
+public int getVarArgs() {
+return varArgs;
+}
+
 public boolean isBridge() {
 return bridge;
 }
@@ -786,11 +795,15 @@ class Util {
 if (cmp == 0) {
 cmp = Integer.compare(this.getCoercible(), 
o.getCoercible());
   

[tomcat] branch 8.5.x updated: Fix BZ 65358 - Improve EL matching of varargs methods.

2021-06-07 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/8.5.x by this push:
 new 35daf4e  Fix BZ 65358 - Improve EL matching of varargs methods.
35daf4e is described below

commit 35daf4e70b2cffeeef48d0873fe0de5c62df0df0
Author: Mark Thomas 
AuthorDate: Mon Jun 7 14:37:49 2021 +0100

Fix BZ 65358 - Improve EL matching of varargs methods.

https://bz.apache.org/bugzilla/show_bug.cgi?id=65358
---
 java/javax/el/Util.java  |  58 ++--
 java/org/apache/el/util/ReflectionUtil.java  |  74 +++--
 test/javax/el/TestBeanELResolver.java|   8 +-
 test/org/apache/el/TestMethodExpressionImpl.java | 365 +++
 test/org/apache/el/TesterBeanF.java  |  82 +
 test/org/apache/el/TesterBeanG.java  |  42 +++
 test/org/apache/el/TesterBeanH.java  |  29 ++
 webapps/docs/changelog.xml   |   6 +
 8 files changed, 606 insertions(+), 58 deletions(-)

diff --git a/java/javax/el/Util.java b/java/javax/el/Util.java
index 7a30b75..383e9b5 100644
--- a/java/javax/el/Util.java
+++ b/java/javax/el/Util.java
@@ -271,19 +271,22 @@ class Util {
 int exactMatch = 0;
 int assignableMatch = 0;
 int coercibleMatch = 0;
+int varArgsMatch = 0;
 boolean noMatch = false;
 for (int i = 0; i < mParamCount; i++) {
 // Can't be null
 if (w.isVarArgs() && i == (mParamCount - 1)) {
 if (i == paramCount || (paramValues != null && 
paramValues.length == i)) {
-// Nothing is passed as varargs
-assignableMatch++;
+// Var args defined but nothing is passed as varargs
+// Use MAX_VALUE so this matches only if nothing else 
does
+varArgsMatch = Integer.MAX_VALUE;
 break;
 }
 Class varType = mParamTypes[i].getComponentType();
 for (int j = i; j < paramCount; j++) {
 if (isAssignableFrom(paramTypes[j], varType)) {
 assignableMatch++;
+varArgsMatch++;
 } else {
 if (paramValues == null) {
 noMatch = true;
@@ -291,6 +294,7 @@ class Util {
 } else {
 if (isCoercibleFrom(paramValues[j], varType)) {
 coercibleMatch++;
+varArgsMatch++;
 } else {
 noMatch = true;
 break;
@@ -326,18 +330,17 @@ class Util {
 }
 
 // If a method is found where every parameter matches exactly,
-// return it
-if (exactMatch == paramCount) {
+// and no vars args are present, return it
+if (exactMatch == paramCount && varArgsMatch == 0) {
 return w;
 }
 
-candidates.put(w, new MatchResult(
-exactMatch, assignableMatch, coercibleMatch, 
w.isBridge()));
+candidates.put(w, new MatchResult(exactMatch, assignableMatch, 
coercibleMatch, varArgsMatch, w.isBridge()));
 }
 
 // Look for the method that has the highest number of parameters where
 // the type matches exactly
-MatchResult bestMatch = new MatchResult(0, 0, 0, false);
+MatchResult bestMatch = new MatchResult(0, 0, 0, 0, false);
 Wrapper match = null;
 boolean multiple = false;
 for (Map.Entry, MatchResult> entry : candidates.entrySet()) 
{
@@ -755,12 +758,14 @@ class Util {
 private final int exact;
 private final int assignable;
 private final int coercible;
+private final int varArgs;
 private final boolean bridge;
 
-public MatchResult(int exact, int assignable, int coercible, boolean 
bridge) {
+public MatchResult(int exact, int assignable, int coercible, int 
varArgs, boolean bridge) {
 this.exact = exact;
 this.assignable = assignable;
 this.coercible = coercible;
+this.varArgs = varArgs;
 this.bridge = bridge;
 }
 
@@ -776,6 +781,10 @@ class Util {
 return coercible;
 }
 
+public int getVarArgs() {
+return varArgs;
+}
+
 public boolean isBridge() {
 return bridge;
 }
@@ -788,11 +797,15 @@ class Util {
 if (cmp == 0) {
 cmp = Integer.compare(this.getCoercible(), 
o.getCoercible());
   

[Bug 65358] Possible EL Bug — Method Matching with Varargs

2021-06-07 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=65358

Mark Thomas  changed:

   What|Removed |Added

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

--- Comment #4 from Mark Thomas  ---
The one-line fix wasn't sufficient. A broader fix was required that in essence
looked at the number of varargs used and preferred the method that matched
using fewest varargs.

Fixed in:
- 10.1.x for 10.1.0-M1 onwards
- 10.0.x for 10.0.7 onwards
- 9.0.x for 9.0.47 onwards
- 8.5.x for 8.5.67 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



Re: [tomcat] branch main updated: Fix BZ 65358 - Improve EL matching of varargs methods.

2021-06-07 Thread Christopher Schultz

Mark,

On 6/7/21 09:38, ma...@apache.org wrote:

 Fix BZ 65358 - Improve EL matching of varargs methods.
 
 https://bz.apache.org/bugzilla/show_bug.cgi?id=65358


I wonder if there is any appetite in the EL EG for establishing a 
reference implementation of this kind of thing. If the expectation is 
that the EL matching will follow the same matching rules as javac, then 
literally every EL implementation in the world will need the same code 
to say "given this method name, these arguments and this object 
instance, tell me which method I should call".


-chris


---
  java/jakarta/el/Util.java|  58 +++---
  java/org/apache/el/util/ReflectionUtil.java  |  74 
  test/jakarta/el/TestBeanELResolver.java  |   8 +-
  test/org/apache/el/TestMethodExpressionImpl.java | 214 +++
  test/org/apache/el/TesterBeanF.java  |  82 +
  test/org/apache/el/TesterBeanG.java  |  42 +
  test/org/apache/el/TesterBeanH.java  |  29 +++
  webapps/docs/changelog.xml   |   6 +
  8 files changed, 455 insertions(+), 58 deletions(-)

diff --git a/java/jakarta/el/Util.java b/java/jakarta/el/Util.java
index 66a1ca5..03a687a 100644
--- a/java/jakarta/el/Util.java
+++ b/java/jakarta/el/Util.java
@@ -269,19 +269,22 @@ class Util {
  int exactMatch = 0;
  int assignableMatch = 0;
  int coercibleMatch = 0;
+int varArgsMatch = 0;
  boolean noMatch = false;
  for (int i = 0; i < mParamCount; i++) {
  // Can't be null
  if (w.isVarArgs() && i == (mParamCount - 1)) {
  if (i == paramCount || (paramValues != null && 
paramValues.length == i)) {
-// Nothing is passed as varargs
-assignableMatch++;
+// Var args defined but nothing is passed as varargs
+// Use MAX_VALUE so this matches only if nothing else 
does
+varArgsMatch = Integer.MAX_VALUE;
  break;
  }
  Class varType = mParamTypes[i].getComponentType();
  for (int j = i; j < paramCount; j++) {
  if (isAssignableFrom(paramTypes[j], varType)) {
  assignableMatch++;
+varArgsMatch++;
  } else {
  if (paramValues == null) {
  noMatch = true;
@@ -289,6 +292,7 @@ class Util {
  } else {
  if (isCoercibleFrom(paramValues[j], varType)) 
{
  coercibleMatch++;
+varArgsMatch++;
  } else {
  noMatch = true;
  break;
@@ -324,18 +328,17 @@ class Util {
  }
  
  // If a method is found where every parameter matches exactly,

-// return it
-if (exactMatch == paramCount) {
+// and no vars args are present, return it
+if (exactMatch == paramCount && varArgsMatch == 0) {
  return w;
  }
  
-candidates.put(w, new MatchResult(

-exactMatch, assignableMatch, coercibleMatch, 
w.isBridge()));
+candidates.put(w, new MatchResult(exactMatch, assignableMatch, 
coercibleMatch, varArgsMatch, w.isBridge()));
  }
  
  // Look for the method that has the highest number of parameters where

  // the type matches exactly
-MatchResult bestMatch = new MatchResult(0, 0, 0, false);
+MatchResult bestMatch = new MatchResult(0, 0, 0, 0, false);
  Wrapper match = null;
  boolean multiple = false;
  for (Map.Entry, MatchResult> entry : 
candidates.entrySet()) {
@@ -753,12 +756,14 @@ class Util {
  private final int exact;
  private final int assignable;
  private final int coercible;
+private final int varArgs;
  private final boolean bridge;
  
-public MatchResult(int exact, int assignable, int coercible, boolean bridge) {

+public MatchResult(int exact, int assignable, int coercible, int 
varArgs, boolean bridge) {
  this.exact = exact;
  this.assignable = assignable;
  this.coercible = coercible;
+this.varArgs = varArgs;
  this.bridge = bridge;
  }
  
@@ -774,6 +779,10 @@ class Util {

  return coercible;
  }
  
+public int getVarArgs() {

+return varArgs;
+}
+
  public boolean isBridge() {
  return bridge;
  }
@@ -786,11 +795,15 @@ class Util {
  if (cmp == 0) {
 

Re: [tomcat] branch main updated: Fix BZ 65358 - Improve EL matching of varargs methods.

2021-06-07 Thread Mark Thomas

On 07/06/2021 14:55, Christopher Schultz wrote:

Mark,

On 6/7/21 09:38, ma...@apache.org wrote:

 Fix BZ 65358 - Improve EL matching of varargs methods.
 https://bz.apache.org/bugzilla/show_bug.cgi?id=65358


I wonder if there is any appetite in the EL EG for establishing a 
reference implementation of this kind of thing. If the expectation is 
that the EL matching will follow the same matching rules as javac, then 
literally every EL implementation in the world will need the same code 
to say "given this method name, these arguments and this object 
instance, tell me which method I should call".


The logical conclusion of that argument is that we'd only need one EL 
implementation.


One thing the EG certainly can do is clarify the expected behaviour and 
add some tests to confirm it. There may well be more than one way to 
implement method matching. I've created 
https://github.com/eclipse-ee4j/el-ri/issues/159


Mark




-chris


---
  java/jakarta/el/Util.java    |  58 +++---
  java/org/apache/el/util/ReflectionUtil.java  |  74 
  test/jakarta/el/TestBeanELResolver.java  |   8 +-
  test/org/apache/el/TestMethodExpressionImpl.java | 214 
+++

  test/org/apache/el/TesterBeanF.java  |  82 +
  test/org/apache/el/TesterBeanG.java  |  42 +
  test/org/apache/el/TesterBeanH.java  |  29 +++
  webapps/docs/changelog.xml   |   6 +
  8 files changed, 455 insertions(+), 58 deletions(-)

diff --git a/java/jakarta/el/Util.java b/java/jakarta/el/Util.java
index 66a1ca5..03a687a 100644
--- a/java/jakarta/el/Util.java
+++ b/java/jakarta/el/Util.java
@@ -269,19 +269,22 @@ class Util {
  int exactMatch = 0;
  int assignableMatch = 0;
  int coercibleMatch = 0;
+    int varArgsMatch = 0;
  boolean noMatch = false;
  for (int i = 0; i < mParamCount; i++) {
  // Can't be null
  if (w.isVarArgs() && i == (mParamCount - 1)) {
  if (i == paramCount || (paramValues != null && 
paramValues.length == i)) {

-    // Nothing is passed as varargs
-    assignableMatch++;
+    // Var args defined but nothing is passed as 
varargs
+    // Use MAX_VALUE so this matches only if 
nothing else does

+    varArgsMatch = Integer.MAX_VALUE;
  break;
  }
  Class varType = 
mParamTypes[i].getComponentType();

  for (int j = i; j < paramCount; j++) {
  if (isAssignableFrom(paramTypes[j], varType)) {
  assignableMatch++;
+    varArgsMatch++;
  } else {
  if (paramValues == null) {
  noMatch = true;
@@ -289,6 +292,7 @@ class Util {
  } else {
  if (isCoercibleFrom(paramValues[j], 
varType)) {

  coercibleMatch++;
+    varArgsMatch++;
  } else {
  noMatch = true;
  break;
@@ -324,18 +328,17 @@ class Util {
  }
  // If a method is found where every parameter matches 
exactly,

-    // return it
-    if (exactMatch == paramCount) {
+    // and no vars args are present, return it
+    if (exactMatch == paramCount && varArgsMatch == 0) {
  return w;
  }
-    candidates.put(w, new MatchResult(
-    exactMatch, assignableMatch, coercibleMatch, 
w.isBridge()));
+    candidates.put(w, new MatchResult(exactMatch, 
assignableMatch, coercibleMatch, varArgsMatch, w.isBridge()));

  }
  // Look for the method that has the highest number of 
parameters where

  // the type matches exactly
-    MatchResult bestMatch = new MatchResult(0, 0, 0, false);
+    MatchResult bestMatch = new MatchResult(0, 0, 0, 0, false);
  Wrapper match = null;
  boolean multiple = false;
  for (Map.Entry, MatchResult> entry : 
candidates.entrySet()) {

@@ -753,12 +756,14 @@ class Util {
  private final int exact;
  private final int assignable;
  private final int coercible;
+    private final int varArgs;
  private final boolean bridge;
-    public MatchResult(int exact, int assignable, int coercible, 
boolean bridge) {
+    public MatchResult(int exact, int assignable, int coercible, 
int varArgs, boolean bridge) {

  this.exact = exact;
  this.assignable = assignable;
  this.coercible = coercible;
+    this.var

svn commit: r1890569 - in /tomcat/site/trunk/docs/native-doc: index.html miscellaneous/changelog.html news/2021.html

2021-06-07 Thread markt
Author: markt
Date: Mon Jun  7 15:36:27 2021
New Revision: 1890569

URL: http://svn.apache.org/viewvc?rev=1890569&view=rev
Log:
Update Native docs for 1.2.30 release

Modified:
tomcat/site/trunk/docs/native-doc/index.html
tomcat/site/trunk/docs/native-doc/miscellaneous/changelog.html
tomcat/site/trunk/docs/native-doc/news/2021.html

Modified: tomcat/site/trunk/docs/native-doc/index.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/native-doc/index.html?rev=1890569&r1=1890568&r2=1890569&view=diff
==
--- tomcat/site/trunk/docs/native-doc/index.html (original)
+++ tomcat/site/trunk/docs/native-doc/index.html Mon Jun  7 15:36:27 2021
@@ -28,10 +28,10 @@
 Headlines
 
 
-6 Apr 2021 - TC-Native-1.2.28
+4 Jun 2021 - TC-Native-1.2.30
 released
 The Apache Tomcat team is proud to announce the immediate availability of
-Tomcat Native 1.2.28 Stable.
+Tomcat Native 1.2.30 Stable.
 
 The sources and the binaries for selected platforms are available from the
 Download page.

Modified: tomcat/site/trunk/docs/native-doc/miscellaneous/changelog.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/native-doc/miscellaneous/changelog.html?rev=1890569&r1=1890568&r2=1890569&view=diff
==
--- tomcat/site/trunk/docs/native-doc/miscellaneous/changelog.html (original)
+++ tomcat/site/trunk/docs/native-doc/miscellaneous/changelog.html Mon Jun  7 
15:36:27 2021
@@ -3,6 +3,28 @@
   
   This is the Changelog for Tomcat Native 1.2.
   
+Changes in 1.2.30
+
+  https://bz.apache.org/bugzilla/show_bug.cgi?id=65181";>65181: 
Additional changes required to provided support for
+  using OpenSSL Engines that use proprietary key formats. Based on a patch
+  provided by Edin Hodzic. (markt)
+
+
+  https://bz.apache.org/bugzilla/show_bug.cgi?id=65329";>65329: Correct 
handling of WINVER in make file to
+  use correct constant for Windows 7. Add constants for Windows 8,
+  Windows 8.1 and Windows 10. Rename WINNT to
+  WIN2k as it is used for Windows 2000 upwards, not Windows NT
+  upwards. (markt)
+
+Changes in 1.2.29 (not 
released)
+  
+
+  Add a patch for APR that fixes an issue where some Windows systems in 
some
+  configurations would only listen on IPv6 addresses on dual stack systems
+  even though configured to listen on both IPv6 and IPv4 addresses.
+  (michaelo)
+
+  
 Changes in 1.2.28
   
 

Modified: tomcat/site/trunk/docs/native-doc/news/2021.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/native-doc/news/2021.html?rev=1890569&r1=1890568&r2=1890569&view=diff
==
--- tomcat/site/trunk/docs/native-doc/news/2021.html (original)
+++ tomcat/site/trunk/docs/native-doc/news/2021.html Mon Jun  7 15:36:27 2021
@@ -1,11 +1,15 @@
 
 The Apache Tomcat Native - News - 2021 News and 
Statushttp://tomcat.apache.org/";>http://www.apache.org/"; target="_blank">The Apache Tomcat Native - 
NewsLinksDocs Home
 Miscellaneous 
DocumentationChangelogNews202120202019201820172016201520142013201220112010200920082021 News and Status2021 News & Status
+ 4 Jun 2021 - TC-Native-1.2.30 
released
+  The Apache Tomcat team is proud to announce the immediate availability of
+  Tomcat Native 1.2.30. This is a bugfix release.
+  
+ 
  6 Apr 2021 - TC-Native-1.2.28 
released
   The Apache Tomcat team is proud to announce the immediate availability of
   Tomcat Native 1.2.28. This is a bugfix release.
   
  
-2021 News & Status
  29 Mar 2021 - TC-Native-1.2.27 
released
   The Apache Tomcat team is proud to announce the immediate availability of
   Tomcat Native 1.2.27. This is a bugfix release.
@@ -13,4 +17,4 @@
  
 
 Copyright © 2008-2020, The Apache Software Foundation
-  
\ No newline at end of file
+  



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



[tomcat-native] branch main updated: Fix copy/paste

2021-06-07 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-native.git


The following commit(s) were added to refs/heads/main by this push:
 new 9170841  Fix copy/paste
9170841 is described below

commit 9170841c23c3be4e83bf93b6c15eb9465d8f34a7
Author: Mark Thomas 
AuthorDate: Mon Jun 7 16:35:42 2021 +0100

Fix copy/paste
---
 xdocs/news/2021.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xdocs/news/2021.xml b/xdocs/news/2021.xml
index 15fca2c..e2e17e8 100644
--- a/xdocs/news/2021.xml
+++ b/xdocs/news/2021.xml
@@ -31,7 +31,7 @@
 
  
   The Apache Tomcat team is proud to announce the immediate availability of
-  Tomcat Native 1.2.28. This is a bugfix release.
+  Tomcat Native 1.2.30. This is a bugfix release.
   
  
  

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



svn commit: r1890570 - in /tomcat/site/trunk: docs/download-native.html docs/index.html docs/oldnews.html xdocs/download-native.xml xdocs/index.xml xdocs/oldnews.xml

2021-06-07 Thread markt
Author: markt
Date: Mon Jun  7 15:44:44 2021
New Revision: 1890570

URL: http://svn.apache.org/viewvc?rev=1890570&view=rev
Log:
Update site for Tomcat Native 1.2.30 release

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

Modified: tomcat/site/trunk/docs/download-native.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/download-native.html?rev=1890570&r1=1890569&r2=1890570&view=diff
==
--- tomcat/site/trunk/docs/download-native.html (original)
+++ tomcat/site/trunk/docs/download-native.html Mon Jun  7 15:44:44 2021
@@ -49,22 +49,22 @@
   Source (please choose the 
correct format for your platform)
   
 
-  
-Native 1.2.28 Source Release tar.gz (e.g. Unix, Linux, Mac 
OS)
+  
+Native 1.2.30 Source Release tar.gz (e.g. Unix, Linux, Mac 
OS)
 
   
-[https://downloads.apache.org/tomcat/tomcat-connectors/native/1.2.28/source/tomcat-native-1.2.28-src.tar.gz.asc";>PGP],
-[https://downloads.apache.org/tomcat/tomcat-connectors/native/1.2.28/source/tomcat-native-1.2.28-src.tar.gz.sha512";>SHA512]
+[https://downloads.apache.org/tomcat/tomcat-connectors/native/1.2.30/source/tomcat-native-1.2.30-src.tar.gz.asc";>PGP],
+[https://downloads.apache.org/tomcat/tomcat-connectors/native/1.2.30/source/tomcat-native-1.2.30-src.tar.gz.sha512";>SHA512]
   
 
 
 
-  
-Native 1.2.28 Source Release zip (e.g. Windows)
+  
+Native 1.2.30 Source Release zip (e.g. Windows)
 
   
-[https://downloads.apache.org/tomcat/tomcat-connectors/native/1.2.28/source/tomcat-native-1.2.28-win32-src.zip.asc";>PGP],
-[https://downloads.apache.org/tomcat/tomcat-connectors/native/1.2.28/source/tomcat-native-1.2.28-win32-src.zip.sha512";>SHA512]
+[https://downloads.apache.org/tomcat/tomcat-connectors/native/1.2.30/source/tomcat-native-1.2.30-win32-src.zip.asc";>PGP],
+[https://downloads.apache.org/tomcat/tomcat-connectors/native/1.2.30/source/tomcat-native-1.2.30-win32-src.zip.sha512";>SHA512]
   
 
 
@@ -73,7 +73,7 @@
 
 You can find binaries release too.
 You may download them from
-  HERE
+  HERE
 
 
   
@@ -91,22 +91,22 @@
 Binaries for Microsoft Windows built with 
OpenSSL 1.1.1k
 
   
-
-  Native 1.2.28 Windows Binaries zip (recommended)
+
+  Native 1.2.30 Windows Binaries zip (recommended)
   
 
-  [https://downloads.apache.org/tomcat/tomcat-connectors/native/1.2.28/binaries/tomcat-native-1.2.28-openssl-1.1.1k-win32-bin.zip.asc";>PGP],
-  [https://downloads.apache.org/tomcat/tomcat-connectors/native/1.2.28/binaries/tomcat-native-1.2.28-openssl-1.1.1k-win32-bin.zip.sha512";>SHA512]
+  [https://downloads.apache.org/tomcat/tomcat-connectors/native/1.2.30/binaries/tomcat-native-1.2.30-openssl-1.1.1k-win32-bin.zip.asc";>PGP],
+  [https://downloads.apache.org/tomcat/tomcat-connectors/native/1.2.30/binaries/tomcat-native-1.2.30-openssl-1.1.1k-win32-bin.zip.sha512";>SHA512]
 
   
   
   
-
-  Native 1.2.28 Windows OCSP-enabled Binaries zip
+
+  Native 1.2.30 Windows OCSP-enabled Binaries zip
   
 
-  [https://downloads.apache.org/tomcat/tomcat-connectors/native/1.2.28/binaries/tomcat-native-1.2.28-openssl-1.1.1k-ocsp-win32-bin.zip.asc";>PGP],
-  [https://downloads.apache.org/tomcat/tomcat-connectors/native/1.2.28/binaries/tomcat-native-1.2.28-openssl-1.1.1k-ocsp-win32-bin.zip.sha512";>SHA512]
+  [https://downloads.apache.org/tomcat/tomcat-connectors/native/1.2.30/binaries/tomcat-native-1.2.30-openssl-1.1.1k-ocsp-win32-bin.zip.asc";>PGP],
+  [https://downloads.apache.org/tomcat/tomcat-connectors/native/1.2.30/binaries/tomcat-native-1.2.30-openssl-1.1.1k-ocsp-win32-bin.zip.sha512";>SHA512]
 
   
   

Modified: tomcat/site/trunk/docs/index.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/index.html?rev=1890570&r1=1890569&r2=1890570&view=diff
==
--- tomcat/site/trunk/docs/index.html (ori

svn commit: r1890571 - in /tomcat/site/trunk: docs/index.html xdocs/index.xml

2021-06-07 Thread markt
Author: markt
Date: Mon Jun  7 15:45:16 2021
New Revision: 1890571

URL: http://svn.apache.org/viewvc?rev=1890571&view=rev
Log:
Missed a version update

Modified:
tomcat/site/trunk/docs/index.html
tomcat/site/trunk/xdocs/index.xml

Modified: tomcat/site/trunk/docs/index.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/index.html?rev=1890571&r1=1890570&r2=1890571&view=diff
==
--- tomcat/site/trunk/docs/index.html (original)
+++ tomcat/site/trunk/docs/index.html Mon Jun  7 15:45:16 2021
@@ -50,7 +50,7 @@ Tomcat Native. The notable changes since
 
 
 https://tomcat.apache.org/download-native.cgi";>Download |
-ChangeLog for 1.2.28
+ChangeLog for 1.2.30
 
 2021-05-12 Tomcat 10.0.6 Released
 

Modified: tomcat/site/trunk/xdocs/index.xml
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/index.xml?rev=1890571&r1=1890570&r2=1890571&view=diff
==
--- tomcat/site/trunk/xdocs/index.xml (original)
+++ tomcat/site/trunk/xdocs/index.xml Mon Jun  7 15:45:16 2021
@@ -69,7 +69,7 @@ Tomcat Native. The notable changes since
 
 
 Download |
-ChangeLog for 1.2.28
+ChangeLog for 1.2.30
 
 
 



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



svn commit: r1890572 - /tomcat/site/trunk/docs/native-doc/miscellaneous/changelog.html

2021-06-07 Thread markt
Author: markt
Date: Mon Jun  7 15:47:48 2021
New Revision: 1890572

URL: http://svn.apache.org/viewvc?rev=1890572&view=rev
Log:
Fix formatting

Modified:
tomcat/site/trunk/docs/native-doc/miscellaneous/changelog.html

Modified: tomcat/site/trunk/docs/native-doc/miscellaneous/changelog.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/native-doc/miscellaneous/changelog.html?rev=1890572&r1=1890571&r2=1890572&view=diff
==
--- tomcat/site/trunk/docs/native-doc/miscellaneous/changelog.html (original)
+++ tomcat/site/trunk/docs/native-doc/miscellaneous/changelog.html Mon Jun  7 
15:47:48 2021
@@ -4,18 +4,20 @@
   This is the Changelog for Tomcat Native 1.2.
   
 Changes in 1.2.30
-
+  
+
   https://bz.apache.org/bugzilla/show_bug.cgi?id=65181";>65181: 
Additional changes required to provided support for
   using OpenSSL Engines that use proprietary key formats. Based on a patch
   provided by Edin Hodzic. (markt)
-
-
+
+
   https://bz.apache.org/bugzilla/show_bug.cgi?id=65329";>65329: Correct 
handling of WINVER in make file to
   use correct constant for Windows 7. Add constants for Windows 8,
   Windows 8.1 and Windows 10. Rename WINNT to
   WIN2k as it is used for Windows 2000 upwards, not Windows NT
   upwards. (markt)
-
+
+  
 Changes in 1.2.29 (not 
released)
   
 



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



[ANN] Apache Tomcat Native 1.2.30 released

2021-06-07 Thread Mark Thomas

The Apache Tomcat team announces the immediate availability of Apache
Tomcat Native 1.2.30 stable.

The key features of this release are:
- Windows binaries built using OpenSSL 1.1.1k
- Fix an issue where some Windows systems in some configurations would
   only listen on IPv6 addresses on dual stack systems even though
   configured to listen on both IPv6 and IPv4 addresses.
- Additional fix for bug 65181 (support loading private keys in
   proprietary formats)

Please refer to the change log for the complete list of changes:
http://tomcat.apache.org/native-doc/miscellaneous/changelog.html

Downloads:
http://tomcat.apache.org/download-native.cgi

The Apache Tomcat Native Library provides portable API for features
not found in contemporary JDK's. It uses Apache Portable Runtime as
operating system abstraction layer and OpenSSL for SSL networking and
allows optimal performance in production environments.



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



[tomcat-native] branch main updated: Add missing tags

2021-06-07 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-native.git


The following commit(s) were added to refs/heads/main by this push:
 new b3832de  Add missing tags
b3832de is described below

commit b3832decf5ba69fce3eae13160f7b445f4d680ed
Author: Mark Thomas 
AuthorDate: Mon Jun 7 16:46:36 2021 +0100

Add missing tags
---
 xdocs/miscellaneous/changelog.xml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xdocs/miscellaneous/changelog.xml 
b/xdocs/miscellaneous/changelog.xml
index c5a2245..f1ce4e3 100644
--- a/xdocs/miscellaneous/changelog.xml
+++ b/xdocs/miscellaneous/changelog.xml
@@ -35,6 +35,7 @@
   
 
 
+  
 
   65181: Additional changes required to provided support for
   using OpenSSL Engines that use proprietary key formats. Based on a patch
@@ -47,6 +48,7 @@
   WIN2k as it is used for Windows 2000 upwards, not Windows NT
   upwards. (markt)
 
+  
 
 
   

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



[tomcat-native] branch main updated: Increment version for next development cycle

2021-06-07 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-native.git


The following commit(s) were added to refs/heads/main by this push:
 new 726433a  Increment version for next development cycle
726433a is described below

commit 726433a0f2ff1eba74c90ec196063b35bf8ad7b3
Author: Mark Thomas 
AuthorDate: Mon Jun 7 16:54:50 2021 +0100

Increment version for next development cycle
---
 build.properties.default  | 2 +-
 native/include/tcn_version.h  | 2 +-
 native/os/win32/libtcnative.rc| 6 +++---
 xdocs/miscellaneous/changelog.xml | 4 
 4 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/build.properties.default b/build.properties.default
index f9dcfb9..b59dfa1 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -18,7 +18,7 @@
 # - Version Control Flags -
 version.major=1
 version.minor=2
-version.build=30
+version.build=31
 version.patch=0
 version.suffix=-dev
 
diff --git a/native/include/tcn_version.h b/native/include/tcn_version.h
index a44bae4..742ef0d 100644
--- a/native/include/tcn_version.h
+++ b/native/include/tcn_version.h
@@ -63,7 +63,7 @@ extern "C" {
 #define TCN_MINOR_VERSION   2
 
 /** patch level */
-#define TCN_PATCH_VERSION   30
+#define TCN_PATCH_VERSION   31
 
 /**
  *  This symbol is defined for internal, "development" copies of TCN. This
diff --git a/native/os/win32/libtcnative.rc b/native/os/win32/libtcnative.rc
index 4727a3f..f05d981 100644
--- a/native/os/win32/libtcnative.rc
+++ b/native/os/win32/libtcnative.rc
@@ -20,7 +20,7 @@ LANGUAGE 0x9,0x1
  "See the License for the specific language governing " \
  "permissions and limitations under the License."
 
-#define TCN_VERSION "1.2.30"
+#define TCN_VERSION "1.2.31"
 1000 ICON "apache.ico"
 
 1001 DIALOGEX 0, 0, 252, 51
@@ -36,8 +36,8 @@ BEGIN
 END
 
 1 VERSIONINFO
- FILEVERSION 1,2,30,0
- PRODUCTVERSION 1,2,30,0
+ FILEVERSION 1,2,31,0
+ PRODUCTVERSION 1,2,31,0
  FILEFLAGSMASK 0x3fL
 #ifdef _DEBUG
  FILEFLAGS 0x1L
diff --git a/xdocs/miscellaneous/changelog.xml 
b/xdocs/miscellaneous/changelog.xml
index f1ce4e3..39737cc 100644
--- a/xdocs/miscellaneous/changelog.xml
+++ b/xdocs/miscellaneous/changelog.xml
@@ -34,6 +34,10 @@
   This is the Changelog for Tomcat Native 1.2.
   
 
+
+  
+  
+
 
   
 

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



[Bug 65365] New: HTTP Tunneling (Forward Proxy) Support

2021-06-07 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=65365

Bug ID: 65365
   Summary: HTTP Tunneling (Forward Proxy) Support
   Product: Tomcat 9
   Version: 9.0.26
  Hardware: PC
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: fuweic...@gmail.com
  Target Milestone: -

Created attachment 37893
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37893&action=edit
HTTP Tunneling messages

Currently Tomcat 9.0 rejects CONNECT request

> HTTP Status 400 â Bad Request
> Message: Invalid URI
> Description: The server cannot or will not process the request due to 
> something that is perceived to be a client error (e.g., malformed request 
> syntax, invalid request message framing, or deceptive request routing).

Node.js "http" module supports CONNECT method natively.

Here are my thought to enable HTTP Tunneling capability.

Basic ideas:

1). Update HTTP/1.1 parser, to support request line like

```http
CONNECT example.com:443 HTTP/1.1
```
or
```http
OTHERMETHOD http://example.com/ HTTP/1.1
```

2). Update `HttpServletRequest#getRequestURI()` implementation, as commented

> Returns the part of this request's URL from the protocol name up to the query 
> string in the first line of the HTTP request

That means `getRequestURI()` may return raw URI value like
"http://example.com/";.

 "example.com:443"

3). A forward proxy SHOULD have the capability to abort connection of a
request. rather than responds 200, 400 or 500, since HTTP client don't know who
generates the HTTP response. respond with no response, if upstream server
cannot be reached.

For such reason, We need a mechanism to close HTTP connection before status
code sent to client. e.g. update `HttpServletResponse#setStatus()`, if status
was set to some value like 0 or -1. then at `HttpServletRequest#flushBuffer()`
or same phase, close underlying socket connection.

See similar question
https://stackoverflow.com/questions/3107631/how-to-close-a-http-connection-from-the-httpservlet


Security Consideration:

Apply above changes only when `allowTunneling="true"` configured in
`server.xml`

```xml

```


Logging Consideration:
N/A

With above changes, Web Developers can write their own forward proxy based on
Tomcat and Servlet API.

See specification https://datatracker.ietf.org/doc/html/rfc7231#section-4.3.6

-- 
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 65365] HTTP Tunneling (Forward Proxy) Support

2021-06-07 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=65365

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX
 OS||All

--- Comment #1 from Mark Thomas  ---
There is no need to update the HTTP parser. Custom HTTP methods are already
supported. CONNECT can be supported the same way. The users list is the place
to ask for help if you do not know how to implement this.

The HttpServletRequest#getRequestURI() cannot be changed. The behaviour of that
method is defined by the specification. You can obtain the information required
from the Host header.

My reading of RFC 7231 does not support the need to close the connection
without a status code.

-- 
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 65362] Missing uses-Directives in JPMS descriptor of tomcat-embed-websocket.jar

2021-06-07 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=65362

--- Comment #1 from Mark Thomas  ---
This looks a side-effect of removing the BND annotations from the API classes
because they broke the TCK (arguably the TCK should have ignored them but the
TCK team disagreed).

The fix should - hopefully - be as simple as adding the same manual entries to
the embed JARs.

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



[GitHub] [tomcat-native] michael-o commented on pull request #9: Simplify Address#getInfo() native implementation

2021-06-07 Thread GitBox


michael-o commented on pull request #9:
URL: https://github.com/apache/tomcat-native/pull/9#issuecomment-856140048


   @mturk You still owe me an explanation what will break for you.


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

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



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



[tomcat] branch main updated: Fix 65362. Add JPMS entries to embedded JARs removed in previous release

2021-06-07 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 01500b4  Fix 65362. Add JPMS entries to embedded JARs removed in 
previous release
01500b4 is described below

commit 01500b47b57da3ebfa50e7e2965db3f328e49118
Author: Mark Thomas 
AuthorDate: Mon Jun 7 18:55:53 2021 +0100

Fix 65362. Add JPMS entries to embedded JARs removed in previous release

https://bz.apache.org/bugzilla/show_bug.cgi?id=65362
---
 res/bnd/tomcat-embed-el.jar.tmp.bnd|  9 +
 res/bnd/tomcat-embed-websocket.jar.tmp.bnd | 12 
 webapps/docs/changelog.xml |  6 ++
 3 files changed, 27 insertions(+)

diff --git a/res/bnd/tomcat-embed-el.jar.tmp.bnd 
b/res/bnd/tomcat-embed-el.jar.tmp.bnd
index c302756..1567ec9 100644
--- a/res/bnd/tomcat-embed-el.jar.tmp.bnd
+++ b/res/bnd/tomcat-embed-el.jar.tmp.bnd
@@ -35,6 +35,15 @@ Provide-Capability: \
 version:Version=${el.spec.version};\
 uses:='${packages;NAMED;jakarta.el.*}'
 
+Require-Capability: \
+osgi.extender;\
+
filter:="(&(osgi.extender=osgi.serviceloader.processor)(version>=1.0.0)(!(version>=2.0.0)))",\
+osgi.serviceloader;\
+filter:="(osgi.serviceloader=jakarta.el.ExpressionFactory)";\
+osgi.serviceloader="jakarta.el.ExpressionFactory",\
+osgi.ee;\
+filter:="(&(osgi.ee=JavaSE)(version=1.8))"
+
 -namesection: jakarta/el*/;\
 Specification-Title=Jakarta Expression Language;\
 Specification-Version=${el.spec.version};\
diff --git a/res/bnd/tomcat-embed-websocket.jar.tmp.bnd 
b/res/bnd/tomcat-embed-websocket.jar.tmp.bnd
index 413b216..b175946 100644
--- a/res/bnd/tomcat-embed-websocket.jar.tmp.bnd
+++ b/res/bnd/tomcat-embed-websocket.jar.tmp.bnd
@@ -33,6 +33,18 @@ Provide-Capability: \
 version:Version=${websocket.spec.version};\
 uses:='${packages;NAMED;jakarta.websocket.*}'
 
+Require-Capability: \
+osgi.extender;\
+
filter:="(&(osgi.extender=osgi.serviceloader.processor)(version>=1.0.0)(!(version>=2.0.0)))",\
+osgi.serviceloader;\
+filter:="(osgi.serviceloader=jakarta.websocket.ContainerProvider)";\
+osgi.serviceloader="jakarta.websocket.ContainerProvider",\
+osgi.serviceloader;\
+
filter:="(osgi.serviceloader=jakarta.websocket.server.ServerEndpointConfig$Configurator)";\
+
osgi.serviceloader="jakarta.websocket.server.ServerEndpointConfig$Configurator",\
+osgi.ee;\
+filter:="(&(osgi.ee=JavaSE)(version=1.8))"
+
 -namesection: jakarta/websocket*/;\
 Specification-Title=Jakarta WebSocket;\
 Specification-Version=${websocket.spec.version};\
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index ea3fdd3..dd7d5a3 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -288,6 +288,12 @@
   
 Improvements to Korean translations. (woonsan)
   
+  
+65362: Correct a regression in the previous release. The
+change to create OSGi Require-Capability sections in
+manifests for Jakarta API JARs manually rather bnd annotations did not
+add the necessary manual entries to the embedded JARs. (markt)
+  
 
   
 

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



[Bug 65362] Missing uses-Directives in JPMS descriptor of tomcat-embed-websocket.jar

2021-06-07 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=65362

Mark Thomas  changed:

   What|Removed |Added

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

--- Comment #2 from Mark Thomas  ---
Fixed in:
- 10.1.x for 10.1.0-M1 onwards
- 10.0.x for 10.0.7 onwards
- 9.0.x for 9.0.47 onwards

8.5.x does not include JPMS metadata

-- 
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.0.x updated: Fix 65362. Add JPMS entries to embedded JARs removed in previous release

2021-06-07 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/10.0.x by this push:
 new 64d73d6  Fix 65362. Add JPMS entries to embedded JARs removed in 
previous release
64d73d6 is described below

commit 64d73d6e453fc09a580eb86e8951f16245ea8d43
Author: Mark Thomas 
AuthorDate: Mon Jun 7 18:55:53 2021 +0100

Fix 65362. Add JPMS entries to embedded JARs removed in previous release

https://bz.apache.org/bugzilla/show_bug.cgi?id=65362
---
 res/bnd/tomcat-embed-el.jar.tmp.bnd|  9 +
 res/bnd/tomcat-embed-websocket.jar.tmp.bnd | 12 
 webapps/docs/changelog.xml |  6 ++
 3 files changed, 27 insertions(+)

diff --git a/res/bnd/tomcat-embed-el.jar.tmp.bnd 
b/res/bnd/tomcat-embed-el.jar.tmp.bnd
index c302756..1567ec9 100644
--- a/res/bnd/tomcat-embed-el.jar.tmp.bnd
+++ b/res/bnd/tomcat-embed-el.jar.tmp.bnd
@@ -35,6 +35,15 @@ Provide-Capability: \
 version:Version=${el.spec.version};\
 uses:='${packages;NAMED;jakarta.el.*}'
 
+Require-Capability: \
+osgi.extender;\
+
filter:="(&(osgi.extender=osgi.serviceloader.processor)(version>=1.0.0)(!(version>=2.0.0)))",\
+osgi.serviceloader;\
+filter:="(osgi.serviceloader=jakarta.el.ExpressionFactory)";\
+osgi.serviceloader="jakarta.el.ExpressionFactory",\
+osgi.ee;\
+filter:="(&(osgi.ee=JavaSE)(version=1.8))"
+
 -namesection: jakarta/el*/;\
 Specification-Title=Jakarta Expression Language;\
 Specification-Version=${el.spec.version};\
diff --git a/res/bnd/tomcat-embed-websocket.jar.tmp.bnd 
b/res/bnd/tomcat-embed-websocket.jar.tmp.bnd
index 413b216..b175946 100644
--- a/res/bnd/tomcat-embed-websocket.jar.tmp.bnd
+++ b/res/bnd/tomcat-embed-websocket.jar.tmp.bnd
@@ -33,6 +33,18 @@ Provide-Capability: \
 version:Version=${websocket.spec.version};\
 uses:='${packages;NAMED;jakarta.websocket.*}'
 
+Require-Capability: \
+osgi.extender;\
+
filter:="(&(osgi.extender=osgi.serviceloader.processor)(version>=1.0.0)(!(version>=2.0.0)))",\
+osgi.serviceloader;\
+filter:="(osgi.serviceloader=jakarta.websocket.ContainerProvider)";\
+osgi.serviceloader="jakarta.websocket.ContainerProvider",\
+osgi.serviceloader;\
+
filter:="(osgi.serviceloader=jakarta.websocket.server.ServerEndpointConfig$Configurator)";\
+
osgi.serviceloader="jakarta.websocket.server.ServerEndpointConfig$Configurator",\
+osgi.ee;\
+filter:="(&(osgi.ee=JavaSE)(version=1.8))"
+
 -namesection: jakarta/websocket*/;\
 Specification-Title=Jakarta WebSocket;\
 Specification-Version=${websocket.spec.version};\
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index b95233f..dba11e9 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -253,6 +253,12 @@
   
 Improvements to Korean translations. (woonsan)
   
+  
+65362: Correct a regression in the previous release. The
+change to create OSGi Require-Capability sections in
+manifests for Jakarta API JARs manually rather bnd annotations did not
+add the necessary manual entries to the embedded JARs. (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 65362. Add JPMS entries to embedded JARs removed in previous release

2021-06-07 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 f367a29  Fix 65362. Add JPMS entries to embedded JARs removed in 
previous release
f367a29 is described below

commit f367a2991f117a1ff07e356f4be2dc1d8b2e2288
Author: Mark Thomas 
AuthorDate: Mon Jun 7 18:55:53 2021 +0100

Fix 65362. Add JPMS entries to embedded JARs removed in previous release

https://bz.apache.org/bugzilla/show_bug.cgi?id=65362
---
 res/bnd/tomcat-embed-el.jar.tmp.bnd|  9 +
 res/bnd/tomcat-embed-websocket.jar.tmp.bnd | 12 
 webapps/docs/changelog.xml |  6 ++
 3 files changed, 27 insertions(+)

diff --git a/res/bnd/tomcat-embed-el.jar.tmp.bnd 
b/res/bnd/tomcat-embed-el.jar.tmp.bnd
index 4b2760e..6e38d0f 100644
--- a/res/bnd/tomcat-embed-el.jar.tmp.bnd
+++ b/res/bnd/tomcat-embed-el.jar.tmp.bnd
@@ -35,6 +35,15 @@ Provide-Capability: \
 version:List="3.0,2.2,2.1";\
 uses:='${packages;NAMED;javax.el.*}'
 
+Require-Capability: \
+osgi.extender;\
+
filter:="(&(osgi.extender=osgi.serviceloader.processor)(version>=1.0.0)(!(version>=2.0.0)))",\
+osgi.serviceloader;\
+filter:="(osgi.serviceloader=javax.el.ExpressionFactory)";\
+osgi.serviceloader="javax.el.ExpressionFactory",\
+osgi.ee;\
+filter:="(&(osgi.ee=JavaSE)(version=1.8))"
+
 -namesection: javax/el*/;\
 Specification-Title='Expression Language';\
 Specification-Version=3.0;\
diff --git a/res/bnd/tomcat-embed-websocket.jar.tmp.bnd 
b/res/bnd/tomcat-embed-websocket.jar.tmp.bnd
index 8072256..924fdd4 100644
--- a/res/bnd/tomcat-embed-websocket.jar.tmp.bnd
+++ b/res/bnd/tomcat-embed-websocket.jar.tmp.bnd
@@ -41,6 +41,18 @@ Provide-Capability: \
 Implementation-Version=1.1.${websocket.revision};\
 Implementation-Vendor='Apache Software Foundation'
 
+Require-Capability: \
+osgi.extender;\
+
filter:="(&(osgi.extender=osgi.serviceloader.processor)(version>=1.0.0)(!(version>=2.0.0)))",\
+osgi.serviceloader;\
+filter:="(osgi.serviceloader=javax.websocket.ContainerProvider)";\
+osgi.serviceloader="javax.websocket.ContainerProvider",\
+osgi.serviceloader;\
+
filter:="(osgi.serviceloader=javax.websocket.server.ServerEndpointConfig$Configurator)";\
+
osgi.serviceloader="javax.websocket.server.ServerEndpointConfig$Configurator",\
+osgi.ee;\
+filter:="(&(osgi.ee=JavaSE)(version=1.8))"
+
 -jpms-module-info: \
 ${module.name};\
 access=32;\
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 63975fd..1991dd7 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -261,6 +261,12 @@
   
 Improvements to Korean translations. (woonsan)
   
+  
+65362: Correct a regression in the previous release. The
+change to create OSGi Require-Capability sections in
+manifests for Jakarta API JARs manually rather bnd annotations did not
+add the necessary manual entries to the embedded JARs. (markt)
+  
 
   
 

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



svn commit: r1890575 - in /tomcat/site/trunk: docs/migration-10.html xdocs/migration-10.xml

2021-06-07 Thread markt
Author: markt
Date: Mon Jun  7 18:07:16 2021
New Revision: 1890575

URL: http://svn.apache.org/viewvc?rev=1890575&view=rev
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=65356 - Note change to %D in 
ALV for Tomact 10 onwards.

Modified:
tomcat/site/trunk/docs/migration-10.html
tomcat/site/trunk/xdocs/migration-10.xml

Modified: tomcat/site/trunk/docs/migration-10.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/migration-10.html?rev=1890575&r1=1890574&r2=1890575&view=diff
==
--- tomcat/site/trunk/docs/migration-10.html (original)
+++ tomcat/site/trunk/docs/migration-10.html Mon Jun  7 18:07:16 2021
@@ -2,7 +2,7 @@
 Apache Tomcat® - Migration Guide - Tomcat 
10.0.xhttp://tomcat.apache.org/";>Apache 
Tomcat®https://www.apache.org/foundation/contributing.html"; target="_blank" 
class="pull-left">https://www.apache.org/images/SupportApache-small.png"; class="support-asf" 
alt="Support Apache">http://www.apache.org/"; target="_blank" class="pull-left">https://www.google.com/search"; method="get">GOhttps://www.apache.org/events/current-event.html";>https://www.apache.org/events/current-event-234x60.png"; alt="Next ASF 
event">
   Save the date!
 Apache TomcatHomeTaglibsMaven 
PluginDownloadWhich version?https://tomcat.apache.org/download-10.cgi";>Tomcat 10https://tomcat.apache.org/download-90.cgi";>Tomcat 9https://tomcat.apache.org/download-80.cgi";>Tomcat 8https://tomcat.apache.org/download-70.cgi";>Tomcat 7https://tomcat.apache.org/download-migration.cgi";>Tomcat Migration Tool 
for Jakarta EEhttps://tomcat.apache.org/download-connectors.cgi";>Tomcat 
Connectorshttps://tomcat.apache.org/download-native.cgi";>Tomcat 
Nativehttps://tomcat.apache.org/download-taglibs.cgi";>Taglibshttps://archive.apache.org/dist/tomcat/";>A
 rchivesDocumentationTomcat 10.0Tomcat 9.0Tomcat 8.5Tomcat 7.0Tomcat ConnectorsTomcat Nativehttps://cwiki.apache.org/confluence/display/TOMCAT";>WikiMigration GuidePresentationshttps://cwiki.apache.org/confluence/x/Bi8lBg";>SpecificationsProblems?Security ReportsFind helphttps://cwiki.apache.org/confluence/display/TOMCAT/FAQ";>FAQMailing ListsBug 
Databas
 eIRCGet 
InvolvedOverviewSource codeBuildbothttps://cwiki.apache.org/confluence/x/vIPzBQ";>TranslationsToolsMediahttps://twitter.com/theapachetomcat";>Twitterhttps://www.youtube.com/c/ApacheTomcatOfficial";>YouTubehttps://blogs.apache.org/tomcat/";>BlogMiscWho We Arehttps://www.redbubble.com/people/comdev/works/30885254-apache-tomcat";>SwagHeritagehttp://www.apache.org";>Apache HomeResourcesContactLegal<
 /li>https://www.apache.org/foundation/contributing.html";>Support 
Apachehttps://www.apache.org/foundation/sponsorship.html";>Sponsorshiphttp://www.apache.org/foundation/thanks.html";>Thankshttp://www.apache.org/licenses/";>LicenseContentTable of Contents
-GeneralMigrating from 9.0.x to 
10.0.xJava 8 requiredSpecification APIsServlet 5.0 APIServer Pages 3.0Expression Language 4.0WebSocket 2.0Authentication 4.0Internal APIsweb.xml defaultsSession managementHTTP/2LoggingUpgrading 10.0.xTomcat 10.0.x noteable 
changesTom
 cat 10.0.x configuration file differences
+GeneralMigrating from 9.0.x to 
10.0.xJava 8 requiredSpecification APIsServlet 5.0 APIServer Pages 3.0Expression Language 4.0WebSocket 2.0Authentication 4.0Internal APIsweb.xml defaultsSession managementHTTP/2LoggingAccess Log PatternsUpgrading 10.0.xTomcat 10.0.x noteable changes
 Tomcat 10.0.x 
configuration file differences
 General
 
 Please read general Migration Guide page first,
@@ -128,6 +128,14 @@ of Apache Tomcat.
 
   
 
+  Access Log 
Patterns
+
+To align with httpd, the %D pattern now logs request time 
in
+microseconds rather than milliseconds. To log request time in milliseconds,
+use %{ms}T.
+
+  
+
 Upgrading 10.0.x
 
   When upgrading instances of Apache Tomcat from one version of Tomcat 10 to

Modified: tomcat/site/trunk/xdocs/migration-10.xml
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/migration-10.xml?rev=1890575&r1=1890574&r2=1890575&view=diff
==
--- tomcat/site/trunk/xdocs/migration-10.xml (original)
+++ tomcat/site/trunk/xdocs/migration-10.xml Mon Jun  7 18:07:16 2021
@@ -139,6 +139,14 @@ of Apache Tomcat.
 
   
 
+  
+
+To align with httpd, the %D pattern now logs request time 
in
+microseconds rather than milliseconds. To log request time in milliseconds,
+use %{ms}T.
+
+  
+
 
 
 



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



[Bug 65356] Tomcat10 Migration guide does not mention modified access log date pattern

2021-06-07 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=65356

Mark Thomas  changed:

   What|Removed |Added

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

--- Comment #2 from Mark Thomas  ---
Thanks for the report. Web site has been updated.

-- 
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 65350] The index ID of the request header that Jetty sent to Tomcat was not found in the index table on the Tomcat side

2021-06-07 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=65350

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |NEEDINFO
   Severity|critical|normal

--- Comment #1 from Mark Thomas  ---
Without some idea of how to reproduce this - and ideally a test case that
demonstrates it - there isn't enough information in this report for the Tomcat
team to work with.

Given that the header state is maintained at the connection level, we'd likely
need to see a network trace for the entire connection if we were going to debug
this from the network trace.

What we can do is add some debug logging that might provide some pointers if
Tomcat is run with the hpack debug logging enabled.

-- 
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 65350] The index ID of the request header that Jetty sent to Tomcat was not found in the index table on the Tomcat side

2021-06-07 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=65350

--- Comment #2 from Christopher Schultz  ---
I can't seem to find the reference to it, now, but I thought the reporter said
that a header line (or name?) with > 1024 characters seems to trigger this.
I'll keep searching for that reference.

-- 
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: Add debug logging for HPACK decoding

2021-06-07 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 c67784b  Add debug logging for HPACK decoding
c67784b is described below

commit c67784b0e171a92a6eb5ef34bc77521243837623
Author: Mark Thomas 
AuthorDate: Mon Jun 7 20:38:13 2021 +0100

Add debug logging for HPACK decoding
---
 java/org/apache/coyote/http2/HpackDecoder.java   | 20 +++-
 java/org/apache/coyote/http2/LocalStrings.properties |  5 +
 webapps/docs/changelog.xml   |  3 +++
 3 files changed, 27 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/coyote/http2/HpackDecoder.java 
b/java/org/apache/coyote/http2/HpackDecoder.java
index 02802ad..badebad 100644
--- a/java/org/apache/coyote/http2/HpackDecoder.java
+++ b/java/org/apache/coyote/http2/HpackDecoder.java
@@ -18,6 +18,8 @@ package org.apache.coyote.http2;
 
 import java.nio.ByteBuffer;
 
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
 import org.apache.tomcat.util.res.StringManager;
 
 /**
@@ -25,7 +27,8 @@ import org.apache.tomcat.util.res.StringManager;
  */
 public class HpackDecoder {
 
-protected static final StringManager sm = 
StringManager.getManager(HpackDecoder.class);
+private static final Log log = LogFactory.getLog(HpackDecoder.class);
+private static final StringManager sm = 
StringManager.getManager(HpackDecoder.class);
 
 private static final int DEFAULT_RING_BUFFER_SIZE = 10;
 
@@ -263,6 +266,9 @@ public class HpackDecoder {
 addStaticTableEntry(index);
 } else {
 int adjustedIndex = getRealIndex(index - 
Hpack.STATIC_TABLE_LENGTH);
+if (log.isDebugEnabled()) {
+log.debug(sm.getString("hpackdecoder.useDynamic", 
Integer.valueOf(adjustedIndex)));
+}
 Hpack.HeaderField headerField = headerTable[adjustedIndex];
 emitHeader(headerField.name, headerField.value);
 }
@@ -292,12 +298,18 @@ public class HpackDecoder {
 
 private void addStaticTableEntry(int index) throws HpackException {
 //adds an entry from the static table.
+if (log.isDebugEnabled()) {
+log.debug(sm.getString("hpackdecoder.useStatic", 
Integer.valueOf(index)));
+}
 Hpack.HeaderField entry = Hpack.STATIC_TABLE[index];
 emitHeader(entry.name, (entry.value == null) ? "" : entry.value);
 }
 
 private void addEntryToHeaderTable(Hpack.HeaderField entry) {
 if (entry.size > maxMemorySizeSoft) {
+if (log.isDebugEnabled()) {
+log.debug(sm.getString("hpackdecoder.clearDynamic"));
+}
 //it is to big to fit, so we just completely clear the table.
 while (filledTableSlots > 0) {
 headerTable[firstSlotPosition] = null;
@@ -314,6 +326,9 @@ public class HpackDecoder {
 int newTableSlots = filledTableSlots + 1;
 int tableLength = headerTable.length;
 int index = (firstSlotPosition + filledTableSlots) % tableLength;
+if (log.isDebugEnabled()) {
+log.debug(sm.getString("hpackdecoder.addDynamic", 
Integer.valueOf(index), entry.name, entry.value));
+}
 headerTable[index] = entry;
 int newSize = currentMemorySize + entry.size;
 while (newSize > maxMemorySizeSoft) {
@@ -424,6 +439,9 @@ public class HpackDecoder {
 int inc = 3 + name.length() + value.length();
 headerSize += inc;
 if (!isHeaderCountExceeded() && !isHeaderSizeExceeded(0)) {
+if (log.isDebugEnabled()) {
+log.debug(sm.getString("hpackdecoder.emitHeader", name, 
value));
+}
 headerEmitter.emitHeader(name, value);
 }
 }
diff --git a/java/org/apache/coyote/http2/LocalStrings.properties 
b/java/org/apache/coyote/http2/LocalStrings.properties
index 485b234..3e114d8 100644
--- a/java/org/apache/coyote/http2/LocalStrings.properties
+++ b/java/org/apache/coyote/http2/LocalStrings.properties
@@ -35,11 +35,16 @@ hpack.invalidCharacter=The Unicode character [{0}] at code 
point [{1}] cannot be
 
 hpackEncoder.encodeHeader=Encoding header [{0}] with value [{1}]
 
+hpackdecoder.addDynamic=Adding header to index [{0}] of dynamic table with 
name [{1}] and value [{2}]
+hpackdecoder.clearDynamic=Emptying dynamic table
+hpackdecoder.emitHeader=Emitting header with name [{0}] and value [{1}]
 hpackdecoder.headerTableIndexInvalid=The header table index [{0}] is not valid 
as there are [{1}] static entries and [{2}] dynamic entries
 hpackdecoder.maxMemorySizeExceeded=The header table size [{0}] exceeds the 
maximum size [{1}]
 hpackdecoder.notImplemented=Not yet implemented
 hpackdecoder.nullHeader=Null header at index [{0}]
 hpackdecoder.tableSizeUpdateNotAtStart=Any table size update

[tomcat] branch 10.0.x updated: Add debug logging for HPACK decoding

2021-06-07 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/10.0.x by this push:
 new d5c8c92  Add debug logging for HPACK decoding
d5c8c92 is described below

commit d5c8c92c842d471fa4899d84371d0ec81921131d
Author: Mark Thomas 
AuthorDate: Mon Jun 7 20:38:13 2021 +0100

Add debug logging for HPACK decoding
---
 java/org/apache/coyote/http2/HpackDecoder.java   | 20 +++-
 java/org/apache/coyote/http2/LocalStrings.properties |  5 +
 webapps/docs/changelog.xml   |  3 +++
 3 files changed, 27 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/coyote/http2/HpackDecoder.java 
b/java/org/apache/coyote/http2/HpackDecoder.java
index 02802ad..badebad 100644
--- a/java/org/apache/coyote/http2/HpackDecoder.java
+++ b/java/org/apache/coyote/http2/HpackDecoder.java
@@ -18,6 +18,8 @@ package org.apache.coyote.http2;
 
 import java.nio.ByteBuffer;
 
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
 import org.apache.tomcat.util.res.StringManager;
 
 /**
@@ -25,7 +27,8 @@ import org.apache.tomcat.util.res.StringManager;
  */
 public class HpackDecoder {
 
-protected static final StringManager sm = 
StringManager.getManager(HpackDecoder.class);
+private static final Log log = LogFactory.getLog(HpackDecoder.class);
+private static final StringManager sm = 
StringManager.getManager(HpackDecoder.class);
 
 private static final int DEFAULT_RING_BUFFER_SIZE = 10;
 
@@ -263,6 +266,9 @@ public class HpackDecoder {
 addStaticTableEntry(index);
 } else {
 int adjustedIndex = getRealIndex(index - 
Hpack.STATIC_TABLE_LENGTH);
+if (log.isDebugEnabled()) {
+log.debug(sm.getString("hpackdecoder.useDynamic", 
Integer.valueOf(adjustedIndex)));
+}
 Hpack.HeaderField headerField = headerTable[adjustedIndex];
 emitHeader(headerField.name, headerField.value);
 }
@@ -292,12 +298,18 @@ public class HpackDecoder {
 
 private void addStaticTableEntry(int index) throws HpackException {
 //adds an entry from the static table.
+if (log.isDebugEnabled()) {
+log.debug(sm.getString("hpackdecoder.useStatic", 
Integer.valueOf(index)));
+}
 Hpack.HeaderField entry = Hpack.STATIC_TABLE[index];
 emitHeader(entry.name, (entry.value == null) ? "" : entry.value);
 }
 
 private void addEntryToHeaderTable(Hpack.HeaderField entry) {
 if (entry.size > maxMemorySizeSoft) {
+if (log.isDebugEnabled()) {
+log.debug(sm.getString("hpackdecoder.clearDynamic"));
+}
 //it is to big to fit, so we just completely clear the table.
 while (filledTableSlots > 0) {
 headerTable[firstSlotPosition] = null;
@@ -314,6 +326,9 @@ public class HpackDecoder {
 int newTableSlots = filledTableSlots + 1;
 int tableLength = headerTable.length;
 int index = (firstSlotPosition + filledTableSlots) % tableLength;
+if (log.isDebugEnabled()) {
+log.debug(sm.getString("hpackdecoder.addDynamic", 
Integer.valueOf(index), entry.name, entry.value));
+}
 headerTable[index] = entry;
 int newSize = currentMemorySize + entry.size;
 while (newSize > maxMemorySizeSoft) {
@@ -424,6 +439,9 @@ public class HpackDecoder {
 int inc = 3 + name.length() + value.length();
 headerSize += inc;
 if (!isHeaderCountExceeded() && !isHeaderSizeExceeded(0)) {
+if (log.isDebugEnabled()) {
+log.debug(sm.getString("hpackdecoder.emitHeader", name, 
value));
+}
 headerEmitter.emitHeader(name, value);
 }
 }
diff --git a/java/org/apache/coyote/http2/LocalStrings.properties 
b/java/org/apache/coyote/http2/LocalStrings.properties
index 485b234..3e114d8 100644
--- a/java/org/apache/coyote/http2/LocalStrings.properties
+++ b/java/org/apache/coyote/http2/LocalStrings.properties
@@ -35,11 +35,16 @@ hpack.invalidCharacter=The Unicode character [{0}] at code 
point [{1}] cannot be
 
 hpackEncoder.encodeHeader=Encoding header [{0}] with value [{1}]
 
+hpackdecoder.addDynamic=Adding header to index [{0}] of dynamic table with 
name [{1}] and value [{2}]
+hpackdecoder.clearDynamic=Emptying dynamic table
+hpackdecoder.emitHeader=Emitting header with name [{0}] and value [{1}]
 hpackdecoder.headerTableIndexInvalid=The header table index [{0}] is not valid 
as there are [{1}] static entries and [{2}] dynamic entries
 hpackdecoder.maxMemorySizeExceeded=The header table size [{0}] exceeds the 
maximum size [{1}]
 hpackdecoder.notImplemented=Not yet implemented
 hpackdecoder.nullHeader=Null header at index [{0}]
 hpackdecoder.tableSizeUpdateNotAtStart=Any table size up

[tomcat] branch 9.0.x updated: Add debug logging for HPACK decoding

2021-06-07 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 d73b6da  Add debug logging for HPACK decoding
d73b6da is described below

commit d73b6da910dbbfb69206179b574ffc4b2973ead8
Author: Mark Thomas 
AuthorDate: Mon Jun 7 20:38:13 2021 +0100

Add debug logging for HPACK decoding
---
 java/org/apache/coyote/http2/HpackDecoder.java   | 20 +++-
 java/org/apache/coyote/http2/LocalStrings.properties |  5 +
 webapps/docs/changelog.xml   |  3 +++
 3 files changed, 27 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/coyote/http2/HpackDecoder.java 
b/java/org/apache/coyote/http2/HpackDecoder.java
index 02802ad..badebad 100644
--- a/java/org/apache/coyote/http2/HpackDecoder.java
+++ b/java/org/apache/coyote/http2/HpackDecoder.java
@@ -18,6 +18,8 @@ package org.apache.coyote.http2;
 
 import java.nio.ByteBuffer;
 
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
 import org.apache.tomcat.util.res.StringManager;
 
 /**
@@ -25,7 +27,8 @@ import org.apache.tomcat.util.res.StringManager;
  */
 public class HpackDecoder {
 
-protected static final StringManager sm = 
StringManager.getManager(HpackDecoder.class);
+private static final Log log = LogFactory.getLog(HpackDecoder.class);
+private static final StringManager sm = 
StringManager.getManager(HpackDecoder.class);
 
 private static final int DEFAULT_RING_BUFFER_SIZE = 10;
 
@@ -263,6 +266,9 @@ public class HpackDecoder {
 addStaticTableEntry(index);
 } else {
 int adjustedIndex = getRealIndex(index - 
Hpack.STATIC_TABLE_LENGTH);
+if (log.isDebugEnabled()) {
+log.debug(sm.getString("hpackdecoder.useDynamic", 
Integer.valueOf(adjustedIndex)));
+}
 Hpack.HeaderField headerField = headerTable[adjustedIndex];
 emitHeader(headerField.name, headerField.value);
 }
@@ -292,12 +298,18 @@ public class HpackDecoder {
 
 private void addStaticTableEntry(int index) throws HpackException {
 //adds an entry from the static table.
+if (log.isDebugEnabled()) {
+log.debug(sm.getString("hpackdecoder.useStatic", 
Integer.valueOf(index)));
+}
 Hpack.HeaderField entry = Hpack.STATIC_TABLE[index];
 emitHeader(entry.name, (entry.value == null) ? "" : entry.value);
 }
 
 private void addEntryToHeaderTable(Hpack.HeaderField entry) {
 if (entry.size > maxMemorySizeSoft) {
+if (log.isDebugEnabled()) {
+log.debug(sm.getString("hpackdecoder.clearDynamic"));
+}
 //it is to big to fit, so we just completely clear the table.
 while (filledTableSlots > 0) {
 headerTable[firstSlotPosition] = null;
@@ -314,6 +326,9 @@ public class HpackDecoder {
 int newTableSlots = filledTableSlots + 1;
 int tableLength = headerTable.length;
 int index = (firstSlotPosition + filledTableSlots) % tableLength;
+if (log.isDebugEnabled()) {
+log.debug(sm.getString("hpackdecoder.addDynamic", 
Integer.valueOf(index), entry.name, entry.value));
+}
 headerTable[index] = entry;
 int newSize = currentMemorySize + entry.size;
 while (newSize > maxMemorySizeSoft) {
@@ -424,6 +439,9 @@ public class HpackDecoder {
 int inc = 3 + name.length() + value.length();
 headerSize += inc;
 if (!isHeaderCountExceeded() && !isHeaderSizeExceeded(0)) {
+if (log.isDebugEnabled()) {
+log.debug(sm.getString("hpackdecoder.emitHeader", name, 
value));
+}
 headerEmitter.emitHeader(name, value);
 }
 }
diff --git a/java/org/apache/coyote/http2/LocalStrings.properties 
b/java/org/apache/coyote/http2/LocalStrings.properties
index 485b234..3e114d8 100644
--- a/java/org/apache/coyote/http2/LocalStrings.properties
+++ b/java/org/apache/coyote/http2/LocalStrings.properties
@@ -35,11 +35,16 @@ hpack.invalidCharacter=The Unicode character [{0}] at code 
point [{1}] cannot be
 
 hpackEncoder.encodeHeader=Encoding header [{0}] with value [{1}]
 
+hpackdecoder.addDynamic=Adding header to index [{0}] of dynamic table with 
name [{1}] and value [{2}]
+hpackdecoder.clearDynamic=Emptying dynamic table
+hpackdecoder.emitHeader=Emitting header with name [{0}] and value [{1}]
 hpackdecoder.headerTableIndexInvalid=The header table index [{0}] is not valid 
as there are [{1}] static entries and [{2}] dynamic entries
 hpackdecoder.maxMemorySizeExceeded=The header table size [{0}] exceeds the 
maximum size [{1}]
 hpackdecoder.notImplemented=Not yet implemented
 hpackdecoder.nullHeader=Null header at index [{0}]
 hpackdecoder.tableSizeUpdateNotAtStart=Any table size upda

[tomcat] branch 8.5.x updated: Add debug logging for HPACK decoding

2021-06-07 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/8.5.x by this push:
 new 2fe6823  Add debug logging for HPACK decoding
2fe6823 is described below

commit 2fe68231c582735f62177194d61079d0bd5fdc7c
Author: Mark Thomas 
AuthorDate: Mon Jun 7 20:38:13 2021 +0100

Add debug logging for HPACK decoding
---
 java/org/apache/coyote/http2/HpackDecoder.java   | 20 +++-
 java/org/apache/coyote/http2/LocalStrings.properties |  5 +
 webapps/docs/changelog.xml   |  3 +++
 3 files changed, 27 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/coyote/http2/HpackDecoder.java 
b/java/org/apache/coyote/http2/HpackDecoder.java
index 02802ad..badebad 100644
--- a/java/org/apache/coyote/http2/HpackDecoder.java
+++ b/java/org/apache/coyote/http2/HpackDecoder.java
@@ -18,6 +18,8 @@ package org.apache.coyote.http2;
 
 import java.nio.ByteBuffer;
 
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
 import org.apache.tomcat.util.res.StringManager;
 
 /**
@@ -25,7 +27,8 @@ import org.apache.tomcat.util.res.StringManager;
  */
 public class HpackDecoder {
 
-protected static final StringManager sm = 
StringManager.getManager(HpackDecoder.class);
+private static final Log log = LogFactory.getLog(HpackDecoder.class);
+private static final StringManager sm = 
StringManager.getManager(HpackDecoder.class);
 
 private static final int DEFAULT_RING_BUFFER_SIZE = 10;
 
@@ -263,6 +266,9 @@ public class HpackDecoder {
 addStaticTableEntry(index);
 } else {
 int adjustedIndex = getRealIndex(index - 
Hpack.STATIC_TABLE_LENGTH);
+if (log.isDebugEnabled()) {
+log.debug(sm.getString("hpackdecoder.useDynamic", 
Integer.valueOf(adjustedIndex)));
+}
 Hpack.HeaderField headerField = headerTable[adjustedIndex];
 emitHeader(headerField.name, headerField.value);
 }
@@ -292,12 +298,18 @@ public class HpackDecoder {
 
 private void addStaticTableEntry(int index) throws HpackException {
 //adds an entry from the static table.
+if (log.isDebugEnabled()) {
+log.debug(sm.getString("hpackdecoder.useStatic", 
Integer.valueOf(index)));
+}
 Hpack.HeaderField entry = Hpack.STATIC_TABLE[index];
 emitHeader(entry.name, (entry.value == null) ? "" : entry.value);
 }
 
 private void addEntryToHeaderTable(Hpack.HeaderField entry) {
 if (entry.size > maxMemorySizeSoft) {
+if (log.isDebugEnabled()) {
+log.debug(sm.getString("hpackdecoder.clearDynamic"));
+}
 //it is to big to fit, so we just completely clear the table.
 while (filledTableSlots > 0) {
 headerTable[firstSlotPosition] = null;
@@ -314,6 +326,9 @@ public class HpackDecoder {
 int newTableSlots = filledTableSlots + 1;
 int tableLength = headerTable.length;
 int index = (firstSlotPosition + filledTableSlots) % tableLength;
+if (log.isDebugEnabled()) {
+log.debug(sm.getString("hpackdecoder.addDynamic", 
Integer.valueOf(index), entry.name, entry.value));
+}
 headerTable[index] = entry;
 int newSize = currentMemorySize + entry.size;
 while (newSize > maxMemorySizeSoft) {
@@ -424,6 +439,9 @@ public class HpackDecoder {
 int inc = 3 + name.length() + value.length();
 headerSize += inc;
 if (!isHeaderCountExceeded() && !isHeaderSizeExceeded(0)) {
+if (log.isDebugEnabled()) {
+log.debug(sm.getString("hpackdecoder.emitHeader", name, 
value));
+}
 headerEmitter.emitHeader(name, value);
 }
 }
diff --git a/java/org/apache/coyote/http2/LocalStrings.properties 
b/java/org/apache/coyote/http2/LocalStrings.properties
index e600786..2c45055 100644
--- a/java/org/apache/coyote/http2/LocalStrings.properties
+++ b/java/org/apache/coyote/http2/LocalStrings.properties
@@ -36,11 +36,16 @@ hpack.invalidCharacter=The Unicode character [{0}] at code 
point [{1}] cannot be
 
 hpackEncoder.encodeHeader=Encoding header [{0}] with value [{1}]
 
+hpackdecoder.addDynamic=Adding header to index [{0}] of dynamic table with 
name [{1}] and value [{2}]
+hpackdecoder.clearDynamic=Emptying dynamic table
+hpackdecoder.emitHeader=Emitting header with name [{0}] and value [{1}]
 hpackdecoder.headerTableIndexInvalid=The header table index [{0}] is not valid 
as there are [{1}] static entries and [{2}] dynamic entries
 hpackdecoder.maxMemorySizeExceeded=The header table size [{0}] exceeds the 
maximum size [{1}]
 hpackdecoder.notImplemented=Not yet implemented
 hpackdecoder.nullHeader=Null header at index [{0}]
 hpackdecoder.tableSizeUpdateNotAtStart=Any table size upda

[Bug 65350] The index ID of the request header that Jetty sent to Tomcat was not found in the index table on the Tomcat side

2021-06-07 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=65350

--- Comment #3 from Mark Thomas  ---
Additional debug logging added in
- 10.1.x for 10.1.0-M1 onwards
- 10.0.x for 10.0.7 onwards
- 9.0.x for 9.0.47 onwards
- 8.5.x for 8.5.67 onwards

Enable with:

org.apache.coyote.http2.HpackDecoder.level = FINE 

in $CATALINA_BASE/logging.properties

-- 
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: Restore a (commented out) HTTP/2 example

2021-06-07 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 a155965  Restore a (commented out) HTTP/2 example
a155965 is described below

commit a1559651a12dc0d5230ba49141105e93f3258d52
Author: Mark Thomas 
AuthorDate: Mon Jun 7 20:45:52 2021 +0100

Restore a (commented out) HTTP/2 example
---
 conf/server.xml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/conf/server.xml b/conf/server.xml
index dd4a73b..478ce6e 100644
--- a/conf/server.xml
+++ b/conf/server.xml
@@ -75,7 +75,7 @@
connectionTimeout="2"
redirectPort="8443" />
 -->
-

[tomcat] branch 10.0.x updated: Restore a (commented out) HTTP/2 example

2021-06-07 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/10.0.x by this push:
 new 2a3cde3  Restore a (commented out) HTTP/2 example
2a3cde3 is described below

commit 2a3cde3f8c815cd67763d361f33dd2b75ca14734
Author: Mark Thomas 
AuthorDate: Mon Jun 7 20:45:52 2021 +0100

Restore a (commented out) HTTP/2 example
---
 conf/server.xml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/conf/server.xml b/conf/server.xml
index dd4a73b..478ce6e 100644
--- a/conf/server.xml
+++ b/conf/server.xml
@@ -75,7 +75,7 @@
connectionTimeout="2"
redirectPort="8443" />
 -->
-

[Bug 65365] HTTP Tunneling (Forward Proxy) Support

2021-06-07 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=65365

Fuwei Chin  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|WONTFIX |---

--- Comment #2 from Fuwei Chin  ---
As RFC 2116 describes:

> Request-Line   = Method SP Request-URI SP HTTP-Version CRLF
> Request-URI= "*" | absoluteURI | abs_path | authority

See https://datatracker.ietf.org/doc/html/rfc2616#section-5.1 and
https://datatracker.ietf.org/doc/html/rfc7230#section-3.1.1


"Custom HTTP methods are already supported", Yes. while I mean the Request-URI.

A forward proxy requires the capability to accept CONNECT request and handle
absoluteURI request.

A CONNECT request uses authority as Request-URI, while authority as Request-URI
is not currently supported by Tomcat, Tomcat rejects CONNECT request with "400
Bad Request" before entering `MyGenericServlet#serice()`. And a
request-to-proxy request uses absoluteURI as Request-URI, which is not fully
supported by Tomcat, since the original absoluteURI cannot be obtained through
Servlet API `HttpServletRequest#getRequestURI()`.


I ask for HTTP Tunneling (Forward Proxy) Support, maybe there are better
approaches.

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