AW: PooledConnection#connectUsingDriver, Thread.currentThread().getContextClassLoader() is null

2019-07-24 Thread Clemens Wyss DEV
< mais c'était rapide  >
>+1
should/can I file a bug?

> init at bootstrap the pool (initial size) to ensure it is in one tomcat 
> classloader
how would you achieve this? By setting «initialSize» to «maxSize» in 
PoolProperties?

--
Von: Romain Manni-Bucau  
Gesendet: Donnerstag, 25. Juli 2019 07:30
An: Tomcat Developers List 
Betreff: Re: PooledConnection#connectUsingDriver, 
Thread.currentThread().getContextClassLoader() is null

+1, there is no real other option AFAIK until you init at bootstrap the pool 
(initial size) to ensure it is in one tomcat classloader.

Le jeu. 25 juil. 2019 à 07:08, Clemens Wyss DEV  a 
écrit :
I tried posting this in the tomcat-users-ml, but I guess it rather fits here:
--
Context:
Debian GNU/Linux 9 \n \l
java version 1.8.0_162
Tomcat 8.5.35

From time to time we are facing the follwing exception (call stack):
...
Caused by: java.sql.SQLException: Unable to load class: org.mariadb.jdbc.Driver 
from ClassLoader:http://java.net.URLClassLoader@4c873330;ClassLoader:null
        at 
org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:292)
        at 
org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:212)
        at 
org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:736)
        at 
org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:668)
        at 
org.apache.tomcat.jdbc.pool.ConnectionPool.getConnection(ConnectionPool.java:198)
        at 
org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:132)
        at org.apache.torque.Torque.getConnection(Torque.java:924)
        ... 53 common frames omitted
Caused by: java.lang.ClassNotFoundException: Unable to load class: 
org.mariadb.jdbc.Driver from 
ClassLoader:http://java.net.URLClassLoader@4c873330;ClassLoader:null
        at 
org.apache.tomcat.jdbc.pool.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:56)
        at 
org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:280)
        ... 59 common frames omitted
Caused by: java.lang.ClassNotFoundException: Classloader is null
        at 
org.apache.tomcat.jdbc.pool.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:40)
        ... 60 common frames omitted

According to the code (in PooledConnection# connectUsingDriver) 
Thread.currentThread().getContextClassLoader() returns null

Googling for " Thread.currentThread().getContextClassLoader() is null" the 
common demoniator seems to be `getContextClassLoader can be null`. If this is 
true there should be
a) a null-check in PooledConnection# connectUsingDriver
b) if null, then there should be a fallback-Classloader (the system class 
laoder?)

WDYT ?

Or any ideas why the given exception pops up from time to time

Thx
Clemens


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


Re: PooledConnection#connectUsingDriver, Thread.currentThread().getContextClassLoader() is null

2019-07-24 Thread Romain Manni-Bucau
+1, there is no real other option AFAIK until you init at bootstrap the
pool (initial size) to ensure it is in one tomcat classloader.

Le jeu. 25 juil. 2019 à 07:08, Clemens Wyss DEV  a
écrit :

> I tried posting this in the tomcat-users-ml, but I guess it rather fits
> here:
>
> Context:
> Debian GNU/Linux 9 \n \l
> java version 1.8.0_162
> Tomcat 8.5.35
>
> From time to time we are facing the follwing exception (call stack):
> ...
> Caused by: java.sql.SQLException: Unable to load class:
> org.mariadb.jdbc.Driver from ClassLoader:java.net.URLClassLoader@4c873330
> ;ClassLoader:null
> at
> org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:292)
> at
> org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:212)
> at
> org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:736)
> at
> org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:668)
> at
> org.apache.tomcat.jdbc.pool.ConnectionPool.getConnection(ConnectionPool.java:198)
> at
> org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:132)
> at org.apache.torque.Torque.getConnection(Torque.java:924)
> ... 53 common frames omitted
> Caused by: java.lang.ClassNotFoundException: Unable to load class:
> org.mariadb.jdbc.Driver from ClassLoader:java.net.URLClassLoader@4c873330
> ;ClassLoader:null
> at
> org.apache.tomcat.jdbc.pool.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:56)
> at
> org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:280)
> ... 59 common frames omitted
> Caused by: java.lang.ClassNotFoundException: Classloader is null
> at
> org.apache.tomcat.jdbc.pool.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:40)
> ... 60 common frames omitted
>
> According to the code (in PooledConnection# connectUsingDriver)
> Thread.currentThread().getContextClassLoader() returns null
>
> Googling for " Thread.currentThread().getContextClassLoader() is null" the
> common demoniator seems to be `getContextClassLoader can be null`. If this
> is true there should be
> a) a null-check in PooledConnection# connectUsingDriver
> b) if null, then there should be a fallback-Classloader (the system class
> laoder?)
>
> WDYT ?
>
> Or any ideas why the given exception pops up from time to time
>
> Thx
> Clemens
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>


PooledConnection#connectUsingDriver, Thread.currentThread().getContextClassLoader() is null

2019-07-24 Thread Clemens Wyss DEV
I tried posting this in the tomcat-users-ml, but I guess it rather fits here:

Context:
Debian GNU/Linux 9 \n \l
java version 1.8.0_162
Tomcat 8.5.35

>From time to time we are facing the follwing exception (call stack):
...
Caused by: java.sql.SQLException: Unable to load class: org.mariadb.jdbc.Driver 
from ClassLoader:java.net.URLClassLoader@4c873330;ClassLoader:null
at 
org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:292)
at 
org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:212)
at 
org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:736)
at 
org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:668)
at 
org.apache.tomcat.jdbc.pool.ConnectionPool.getConnection(ConnectionPool.java:198)
at 
org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:132)
at org.apache.torque.Torque.getConnection(Torque.java:924)
... 53 common frames omitted
Caused by: java.lang.ClassNotFoundException: Unable to load class: 
org.mariadb.jdbc.Driver from 
ClassLoader:java.net.URLClassLoader@4c873330;ClassLoader:null
at 
org.apache.tomcat.jdbc.pool.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:56)
at 
org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:280)
... 59 common frames omitted
Caused by: java.lang.ClassNotFoundException: Classloader is null
at 
org.apache.tomcat.jdbc.pool.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:40)
... 60 common frames omitted

According to the code (in PooledConnection# connectUsingDriver) 
Thread.currentThread().getContextClassLoader() returns null

Googling for " Thread.currentThread().getContextClassLoader() is null" the 
common demoniator seems to be `getContextClassLoader can be null`. If this is 
true there should be
a) a null-check in PooledConnection# connectUsingDriver
b) if null, then there should be a fallback-Classloader (the system class 
laoder?)

WDYT ?

Or any ideas why the given exception pops up from time to time

Thx
Clemens


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



[Bug 63567] catalina.sh fails to pass LOGGING_MANAGER to jvm during stop

2019-07-24 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63567

--- Comment #2 from Mark Thomas  ---
Given the timing of the fix mention in comment #1 (2 years before Java 9 GA)
that issue looks like an issue in the EA releases that was addressed by GA. On
that basis, restoring the $LOGGING_MANAGER looks like the best course of action
here.

-- 
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 63567] catalina.sh fails to pass LOGGING_MANAGER to jvm during stop

2019-07-24 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63567

--- Comment #1 from Mark Thomas  ---
This was removed because it was causing issues with Java 9:
https://github.com/apache/tomcat/commit/ff57a28661ee6e581dff17e362864910efed426b

There is also the point of multiple processes trying to write to the same file.

-- 
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] 05/08: Align with 8.5.x. Use quotes to avoid issues with file paths with spaces

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

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

commit 195ab2b2b65413d868557fcb2ae97b1667cca52c
Author: Mark Thomas 
AuthorDate: Wed Jul 24 18:23:16 2019 +0100

Align with 8.5.x. Use quotes to avoid issues with file paths with spaces
---
 bin/catalina.sh |  2 +-
 bin/daemon.sh   | 12 ++--
 bin/setclasspath.sh |  4 ++--
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/bin/catalina.sh b/bin/catalina.sh
index b6d9035..0d94976 100755
--- a/bin/catalina.sh
+++ b/bin/catalina.sh
@@ -292,7 +292,7 @@ if [ -z "$USE_NOHUP" ]; then
 fi
 unset _NOHUP
 if [ "$USE_NOHUP" = "true" ]; then
-_NOHUP=nohup
+_NOHUP="nohup"
 fi
 
 # Add the JAVA 9 specific start-up parameters required by Tomcat
diff --git a/bin/daemon.sh b/bin/daemon.sh
index 9b85343..0eb 100755
--- a/bin/daemon.sh
+++ b/bin/daemon.sh
@@ -28,12 +28,12 @@ while [ -h "$PRG" ]; do
   if expr "$link" : '/.*' > /dev/null; then
 PRG="$link"
   else
-PRG="`dirname $PRG`/$link"
+PRG=`dirname "$PRG"`/"$link"
   fi
 done
 
-DIRNAME="`dirname $PRG`"
-PROGRAM="`basename $PRG`"
+DIRNAME="`dirname "$PRG"`"
+PROGRAM="`basename "$PRG"`"
 while [ ".$1" != . ]
 do
   case "$1" in
@@ -102,10 +102,10 @@ if [ -z "$JAVA_HOME" ]; then
 if expr "$link" : '/.*' > /dev/null; then
 JAVA_BIN="$link"
 else
-JAVA_BIN="`dirname $JAVA_BIN`/$link"
+JAVA_BIN="`dirname "$JAVA_BIN"`/$link"
 fi
 done
-test -x "$JAVA_BIN" && JAVA_HOME="`dirname $JAVA_BIN`"
+test -x "$JAVA_BIN" && JAVA_HOME="`dirname "$JAVA_BIN"`"
 test ".$JAVA_HOME" != . && JAVA_HOME=`cd "$JAVA_HOME/.." >/dev/null; pwd`
 else
 JAVA_BIN="$JAVA_HOME/bin/java"
@@ -136,7 +136,7 @@ elif [ -r "$CATALINA_HOME/bin/setenv.sh" ]; then
 fi
 
 # Add on extra jar files to CLASSPATH
-test ".$CLASSPATH" != . && CLASSPATH="${CLASSPATH}:"
+test ".$CLASSPATH" != . && CLASSPATH="$CLASSPATH:"
 
CLASSPATH="$CLASSPATH$CATALINA_HOME/bin/bootstrap.jar:$CATALINA_HOME/bin/commons-daemon.jar"
 
 test ".$CATALINA_OUT" = . && 
CATALINA_OUT="$CATALINA_BASE/logs/catalina-daemon.out"
diff --git a/bin/setclasspath.sh b/bin/setclasspath.sh
index 5232b8e..fed6c5d 100755
--- a/bin/setclasspath.sh
+++ b/bin/setclasspath.sh
@@ -34,8 +34,8 @@ if [ -z "$JAVA_HOME" -a -z "$JRE_HOME" ]; then
   else
 JAVA_PATH=`which java 2>/dev/null`
 if [ "x$JAVA_PATH" != "x" ]; then
-  JAVA_PATH=`dirname $JAVA_PATH 2>/dev/null`
-  JRE_HOME=`dirname $JAVA_PATH 2>/dev/null`
+  JAVA_PATH=`dirname "$JAVA_PATH" 2>/dev/null`
+  JRE_HOME=`dirname "$JAVA_PATH" 2>/dev/null`
 fi
 if [ "x$JRE_HOME" = "x" ]; then
   # XXX: Should we try other locations?


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



[tomcat] 03/08: Partial fix for https://bz.apache.org/bugzilla/show_bug.cgi?id=55620

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

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

commit 883d4cae9ade53fbba28cac4d2042bfac11a1659
Author: Mark Thomas 
AuthorDate: Wed Jul 24 18:10:32 2019 +0100

Partial fix for https://bz.apache.org/bugzilla/show_bug.cgi?id=55620

Prevent Tomcat from starting when $CATALINA_HOME and/or $CATALINA_BASE
contains a semi-colon on Windows or a colon on Linux/FreeBSD/etc.
---
 bin/catalina.bat   | 17 +
 bin/catalina.sh| 14 ++
 webapps/docs/changelog.xml |  5 +
 3 files changed, 36 insertions(+)

diff --git a/bin/catalina.bat b/bin/catalina.bat
index 740ee03..f92e296 100755
--- a/bin/catalina.bat
+++ b/bin/catalina.bat
@@ -144,6 +144,23 @@ if not "%CATALINA_BASE%" == "" goto gotBase
 set "CATALINA_BASE=%CATALINA_HOME%"
 :gotBase
 
+rem Ensure that neither CATALINA_HOME nor CATALINA_BASE contains a semi-colon
+rem as this is used as the separator in the classpath and Java provides no
+rem mechanism for escaping if the same character appears in the path. Check 
this
+rem by replacing all occurrences of ';' with '' and checking that neither
+rem CATALINA_HOME nor CATALINA_BASE have changed
+if "%CATALINA_HOME%" == "%CATALINA_HOME:;=%" goto homeNoSemicolon
+echo Using CATALINA_HOME:   "%CATALINA_HOME%"
+echo Unable to start as CATALINA_HOME contains a semicolon (;) character
+goto end
+:homeNoSemicolon
+
+if "%CATALINA_BASE%" == "%CATALINA_BASE:;=%" goto baseNoSemicolon
+echo Using CATALINA_BASE:   "%CATALINA_BASE%"
+echo Unable to start as CATALINA_BASE contains a semicolon (;) character
+goto end
+:baseNoSemicolon
+
 rem Ensure that any user defined CLASSPATH variables are not used on startup,
 rem but allow them to be specified in setenv.bat, in rare case when it is 
needed.
 set CLASSPATH=
diff --git a/bin/catalina.sh b/bin/catalina.sh
index 1470fd1..ae85a71 100755
--- a/bin/catalina.sh
+++ b/bin/catalina.sh
@@ -158,6 +158,20 @@ if $cygwin; then
   [ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
 fi
 
+# Ensure that neither CATALINA_HOME nor CATALINA_BASE contains a colon
+# as this is used as the separator in the classpath and Java provides no
+# mechanism for escaping if the same character appears in the path.
+case $CATALINA_HOME in
+  *:*) echo "Using CATALINA_HOME:   $CATALINA_HOME";
+   echo "Unable to start as CATALINA_HOME contains a colon (:) character";
+   exit 1;
+esac
+case $CATALINA_BASE in
+  *:*) echo "Using CATALINA_BASE:   $CATALINA_BASE";
+   echo "Unable to start as CATALINA_BASE contains a colon (:) character";
+   exit 1;
+esac
+
 # For OS400
 if $os400; then
   # Set job priority to standard for interactive (interactive - 6) by using
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index c6e7d52..d462edc 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -74,6 +74,11 @@
 Limit the default JPDA (remote debugging interface) listen address to
 localhost:8000. (markt)
   
+  
+55620: Partial fix. Prevent Tomcat from starting when
+$CATALINA_HOME and/or $CATALINA_BASE contains
+a semi-colon on Windows or a colon on Linux/FreeBSD/etc. (markt)
+  
 
   
 


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



[tomcat] 01/08: Align with 8.5.x. Variable names and comments

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

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

commit b239295ea756f669da44280cfdff1f4230520eeb
Author: Mark Thomas 
AuthorDate: Wed Jul 24 17:59:33 2019 +0100

Align with 8.5.x. Variable names and comments
---
 bin/catalina-tasks.xml |  2 +-
 bin/catalina.bat   |  2 +-
 bin/catalina.sh|  2 +-
 bin/daemon.sh  | 18 ++
 bin/tool-wrapper.bat   |  2 +-
 bin/tool-wrapper.sh|  2 +-
 6 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/bin/catalina-tasks.xml b/bin/catalina-tasks.xml
index 4e6a8ae..c7c9c28 100644
--- a/bin/catalina-tasks.xml
+++ b/bin/catalina-tasks.xml
@@ -1,4 +1,4 @@
-
+
 

[tomcat] 04/08: Default umask of 0027 and tighten-up default permissions in tar.gz

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

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

commit 085f64f7a03ac258ec42a7623d0ca27f43c5a30a
Author: Mark Thomas 
AuthorDate: Wed Jul 24 18:21:03 2019 +0100

Default umask of 0027 and tighten-up default permissions in tar.gz
---
 bin/catalina.sh | 13 ---
 build.xml   | 12 +-
 webapps/docs/changelog.xml  |  7 ++
 webapps/docs/security-howto.xml | 50 ++---
 4 files changed, 51 insertions(+), 31 deletions(-)

diff --git a/bin/catalina.sh b/bin/catalina.sh
index ae85a71..b6d9035 100755
--- a/bin/catalina.sh
+++ b/bin/catalina.sh
@@ -99,6 +99,8 @@
 #   Example (all one line)
 #   
LOGGING_MANAGER="-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
 #
+#   UMASK   (Optional) Override Tomcat's default UMASK of 0027
+#
 #   USE_NOHUP   (Optional) If set to the string true the start command will
 #   use nohup so that the Tomcat process will ignore any hangup
 #   signals. Default is "false" unless running on HP-UX in 
which
@@ -260,6 +262,12 @@ if [ -z "$LOGGING_MANAGER" ]; then
   
LOGGING_MANAGER="-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"
 fi
 
+# Set UMASK unless it has been overridden
+if [ -z "$UMASK" ]; then
+UMASK="0027"
+fi
+umask $UMASK
+
 # Java 9 no longer supports the java.endorsed.dirs
 # system property. Only try to use it if
 # JAVA_ENDORSED_DIRS was explicitly set
@@ -272,9 +280,8 @@ if [ -d "$CATALINA_HOME/endorsed" ]; then
 ENDORSED_PROP=java.endorsed.dirs
 fi
 
-# Uncomment the following line to make the umask available when using the
-# org.apache.catalina.security.SecurityListener
-#JAVA_OPTS="$JAVA_OPTS 
-Dorg.apache.catalina.security.SecurityListener.UMASK=`umask`"
+# Make the umask available when using the 
org.apache.catalina.security.SecurityListener
+JAVA_OPTS="$JAVA_OPTS 
-Dorg.apache.catalina.security.SecurityListener.UMASK=`umask`"
 
 if [ -z "$USE_NOHUP" ]; then
 if $hpux; then
diff --git a/build.xml b/build.xml
index 7853fb9..a0ca308 100644
--- a/build.xml
+++ b/build.xml
@@ -2521,13 +2521,10 @@ skip.installer property in build.properties" />
 
 
-  
-
-  
-  
+  
 
   
-  
+  
 
 
 
@@ -2549,6 +2546,11 @@ skip.installer property in build.properties" />
 
 
   
+  
+  
+  
+
+  
 
 
 
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index d462edc..a04f144 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -79,6 +79,13 @@
 $CATALINA_HOME and/or $CATALINA_BASE contains
 a semi-colon on Windows or a colon on Linux/FreeBSD/etc. (markt)
   
+  
+Tighten up the default file permissions for the .tar.gz
+distribution so no files or directories are world readable by default.
+Configure Tomcat to run with a default umask of 0027 which
+may be overridden by setting UMASK in
+setenv.sh. (markt)
+  
 
   
 
diff --git a/webapps/docs/security-howto.xml b/webapps/docs/security-howto.xml
index 484272f..dccc584 100644
--- a/webapps/docs/security-howto.xml
+++ b/webapps/docs/security-howto.xml
@@ -1,4 +1,4 @@
-
+
 

[tomcat] 02/08: Security hardening. Limit JPDA to localhost by default.

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

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

commit 6000b7b1413b48af4c9aa55eb351fe52f661ce73
Author: Mark Thomas 
AuthorDate: Wed Jul 24 18:04:25 2019 +0100

Security hardening. Limit JPDA to localhost by default.
---
 bin/catalina.bat   | 4 ++--
 bin/catalina.sh| 4 ++--
 webapps/docs/changelog.xml | 8 
 3 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/bin/catalina.bat b/bin/catalina.bat
index a47def9..740ee03 100755
--- a/bin/catalina.bat
+++ b/bin/catalina.bat
@@ -74,7 +74,7 @@ rem   JPDA_TRANSPORT  (Optional) JPDA transport used when the 
"jpda start"
 rem   command is executed. The default is "dt_socket".
 rem
 rem   JPDA_ADDRESS(Optional) Java runtime options used when the "jpda 
start"
-rem   command is executed. The default is 8000.
+rem   command is executed. The default is localhost:8000.
 rem
 rem   JPDA_SUSPEND(Optional) Java runtime options used when the "jpda 
start"
 rem   command is executed. Specifies whether JVM should suspend
@@ -245,7 +245,7 @@ if not "%JPDA_TRANSPORT%" == "" goto gotJpdaTransport
 set JPDA_TRANSPORT=dt_socket
 :gotJpdaTransport
 if not "%JPDA_ADDRESS%" == "" goto gotJpdaAddress
-set JPDA_ADDRESS=8000
+set JPDA_ADDRESS=localhost:8000
 :gotJpdaAddress
 if not "%JPDA_SUSPEND%" == "" goto gotJpdaSuspend
 set JPDA_SUSPEND=n
diff --git a/bin/catalina.sh b/bin/catalina.sh
index 0d01c6c..1470fd1 100755
--- a/bin/catalina.sh
+++ b/bin/catalina.sh
@@ -69,7 +69,7 @@
 #   command is executed. The default is "dt_socket".
 #
 #   JPDA_ADDRESS(Optional) Java runtime options used when the "jpda start"
-#   command is executed. The default is 8000.
+#   command is executed. The default is localhost:8000.
 #
 #   JPDA_SUSPEND(Optional) Java runtime options used when the "jpda start"
 #   command is executed. Specifies whether JVM should suspend
@@ -303,7 +303,7 @@ if [ "$1" = "jpda" ] ; then
 JPDA_TRANSPORT="dt_socket"
   fi
   if [ -z "$JPDA_ADDRESS" ]; then
-JPDA_ADDRESS="8000"
+JPDA_ADDRESS="localhost:8000"
   fi
   if [ -z "$JPDA_SUSPEND" ]; then
 JPDA_SUSPEND="n"
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index a262706..c6e7d52 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -68,6 +68,14 @@
   
 
   
+  
+
+  
+Limit the default JPDA (remote debugging interface) listen address to
+localhost:8000. (markt)
+  
+
+  
 
 
   


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



[tomcat] 07/08: Allow customization of service.bat, startup mode and JVM args. (isapir)

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

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

commit 637b0f258583a65f747648b1c2423f9c1baa2585
Author: Mark Thomas 
AuthorDate: Wed Jul 24 18:28:28 2019 +0100

Allow customization of service.bat, startup mode and JVM args. (isapir)
---
 bin/service.bat| 11 ---
 webapps/docs/changelog.xml |  4 
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/bin/service.bat b/bin/service.bat
index 6d8a04e..221ef18 100755
--- a/bin/service.bat
+++ b/bin/service.bat
@@ -159,6 +159,10 @@ echo Using JVM:  "%JVM%"
 set 
"CLASSPATH=%CATALINA_HOME%\bin\bootstrap.jar;%CATALINA_BASE%\bin\tomcat-juli.jar"
 if not "%CATALINA_HOME%" == "%CATALINA_BASE%" set 
"CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\bin\tomcat-juli.jar"
 
+if "%SERVICE_STARTUP_MODE%" == "" set SERVICE_STARTUP_MODE=manual
+if "%JvmMs%" == "" set JvmMs=128
+if "%JvmMx%" == "" set JvmMx=256
+
 "%EXECUTABLE%" //IS//%SERVICE_NAME% ^
 --Description "Apache Tomcat @VERSION@ Server - 
https://tomcat.apache.org/; ^
 --DisplayName "%DISPLAYNAME%" ^
@@ -176,10 +180,11 @@ if not "%CATALINA_HOME%" == "%CATALINA_BASE%" set 
"CLASSPATH=%CLASSPATH%;%CATALI
 --StopClass org.apache.catalina.startup.Bootstrap ^
 --StartParams start ^
 --StopParams stop ^
---JvmOptions 
"-Dcatalina.home=%CATALINA_HOME%;-Dcatalina.base=%CATALINA_BASE%;-D%ENDORSED_PROP%=%CATALINA_HOME%\endorsed;-Djava.io.tmpdir=%CATALINA_BASE%\temp;-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager;-Djava.util.logging.config.file=%CATALINA_BASE%\conf\logging.properties"
 ^
+--JvmOptions 
"-Dcatalina.home=%CATALINA_HOME%;-Dcatalina.base=%CATALINA_BASE%;-D%ENDORSED_PROP%=%CATALINA_HOME%\endorsed;-Djava.io.tmpdir=%CATALINA_BASE%\temp;-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager;-Djava.util.logging.config.file=%CATALINA_BASE%\conf\logging.properties;%JvmArgs%"
 ^
 --JvmOptions9 
"--add-opens=java.base/java.lang=ALL-UNNAMED#--add-opens=java.base/java.io=ALL-UNNAMED#--add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED"
 ^
---JvmMs 128 ^
---JvmMx 256
+--Startup "%SERVICE_STARTUP_MODE%" ^
+--JvmMs "%JvmMs%" ^
+--JvmMx "%JvmMx%"
 if not errorlevel 1 goto installed
 echo Failed installing '%SERVICE_NAME%' service
 goto end
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index a04f144..7640b0b 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -86,6 +86,10 @@
 may be overridden by setting UMASK in
 setenv.sh. (markt)
   
+  
+Allow customization of service.bat, such as heap memory size, service
+startup mode and JVM args. (isapir)
+  
 
   
 


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



[tomcat] 06/08: Align with 8.5.x. Apply shellcheck.net recommendations for portability

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

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

commit 378324f453aea8e5068b0a825d3548c15b34e2f1
Author: Mark Thomas 
AuthorDate: Wed Jul 24 18:25:10 2019 +0100

Align with 8.5.x. Apply shellcheck.net recommendations for portability
---
 bin/daemon.sh   |  2 +-
 bin/setclasspath.sh | 10 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/bin/daemon.sh b/bin/daemon.sh
index 0eb..afa4c89 100755
--- a/bin/daemon.sh
+++ b/bin/daemon.sh
@@ -170,7 +170,7 @@ if [ "$cygwin" = "false" ]; then
 MAX_FD_LIMIT=`ulimit -H -n`
 if [ "$?" -eq 0 ]; then
 # Darwin does not allow RLIMIT_INFINITY on file soft limit
-if [ "$darwin" = "true" -a "$MAX_FD_LIMIT" = "unlimited" ]; then
+if [ "$darwin" = "true" ] && [ "$MAX_FD_LIMIT" = "unlimited" ]; then
 MAX_FD_LIMIT=`/usr/sbin/sysctl -n kern.maxfilesperproc`
 fi
 test ".$MAX_FD" = ".maximum" && MAX_FD="$MAX_FD_LIMIT"
diff --git a/bin/setclasspath.sh b/bin/setclasspath.sh
index fed6c5d..4ae4b6a 100755
--- a/bin/setclasspath.sh
+++ b/bin/setclasspath.sh
@@ -22,7 +22,7 @@
 # -
 
 # Make sure prerequisite environment variables are set
-if [ -z "$JAVA_HOME" -a -z "$JRE_HOME" ]; then
+if [ -z "$JAVA_HOME" ] && [ -z "$JRE_HOME" ]; then
   if $darwin; then
 # Bugzilla 54390
 if [ -x '/usr/libexec/java_home' ] ; then
@@ -44,13 +44,13 @@ if [ -z "$JAVA_HOME" -a -z "$JRE_HOME" ]; then
   fi
 fi
   fi
-  if [ -z "$JAVA_HOME" -a -z "$JRE_HOME" ]; then
+  if [ -z "$JAVA_HOME" ] && [ -z "$JRE_HOME" ]; then
 echo "Neither the JAVA_HOME nor the JRE_HOME environment variable is 
defined"
 echo "At least one of these environment variable is needed to run this 
program"
 exit 1
   fi
 fi
-if [ -z "$JAVA_HOME" -a "$1" = "debug" ]; then
+if [ -z "$JAVA_HOME" ] && [ "$1" = "debug" ]; then
   echo "JAVA_HOME should point to a JDK in order to run in debug mode."
   exit 1
 fi
@@ -61,14 +61,14 @@ fi
 # If we're running under jdb, we need a full jdk.
 if [ "$1" = "debug" ] ; then
   if [ "$os400" = "true" ]; then
-if [ ! -x "$JAVA_HOME"/bin/java -o ! -x "$JAVA_HOME"/bin/javac ]; then
+if [ ! -x "$JAVA_HOME"/bin/java ] || [ ! -x "$JAVA_HOME"/bin/javac ]; then
   echo "The JAVA_HOME environment variable is not defined correctly"
   echo "This environment variable is needed to run this program"
   echo "NB: JAVA_HOME should point to a JDK not a JRE"
   exit 1
 fi
   else
-if [ ! -x "$JAVA_HOME"/bin/java -o ! -x "$JAVA_HOME"/bin/jdb -o ! -x 
"$JAVA_HOME"/bin/javac ]; then
+if [ ! -x "$JAVA_HOME"/bin/java ] || [ ! -x "$JAVA_HOME"/bin/jdb ] || [ ! 
-x "$JAVA_HOME"/bin/javac ]; then
   echo "The JAVA_HOME environment variable is not defined correctly"
   echo "This environment variable is needed to run this program"
   echo "NB: JAVA_HOME should point to a JDK not a JRE"


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



[tomcat] branch 7.0.x updated (7bbfa2c -> 67224b7)

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

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


from 7bbfa2c  Align with 8.5.x to fix failing test
 new b239295  Align with 8.5.x. Variable names and comments
 new 6000b7b  Security hardening. Limit JPDA to localhost by default.
 new 883d4ca  Partial fix for 
https://bz.apache.org/bugzilla/show_bug.cgi?id=55620
 new 085f64f  Default umask of 0027 and tighten-up default permissions in 
tar.gz
 new 195ab2b  Align with 8.5.x. Use quotes to avoid issues with file paths 
with spaces
 new 378324f  Align with 8.5.x. Apply shellcheck.net recommendations for 
portability
 new 637b0f2  Allow customization of service.bat, startup mode and JVM 
args. (isapir)
 new 67224b7  Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=56003

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


Summary of changes:
 bin/catalina-tasks.xml  |  2 +-
 bin/catalina.bat| 23 ---
 bin/catalina.sh | 35 +++--
 bin/daemon.sh   | 26 +++--
 bin/service.bat | 11 ++---
 bin/setclasspath.sh | 14 ++--
 bin/tool-wrapper.bat|  4 ++--
 bin/tool-wrapper.sh |  4 ++--
 build.xml   | 12 +-
 webapps/docs/changelog.xml  | 24 
 webapps/docs/security-howto.xml | 50 ++---
 11 files changed, 140 insertions(+), 65 deletions(-)


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



[tomcat] 08/08: Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=56003

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

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

commit 67224b7f7d751a4cd1a62aec635bcc16958b1836
Author: Mark Thomas 
AuthorDate: Wed Jul 24 18:32:18 2019 +0100

Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=56003
---
 bin/tool-wrapper.bat | 2 +-
 bin/tool-wrapper.sh  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/bin/tool-wrapper.bat b/bin/tool-wrapper.bat
index 5e1899c..38f1713 100755
--- a/bin/tool-wrapper.bat
+++ b/bin/tool-wrapper.bat
@@ -79,7 +79,7 @@ rem quotes into the CLASSPATH
 if "%CLASSPATH%" == "" goto emptyClasspath
 set "CLASSPATH=%CLASSPATH%;"
 :emptyClasspath
-set 
"CLASSPATH=%CLASSPATH%%CATALINA_HOME%\bin\bootstrap.jar;%CATALINA_HOME%\bin\tomcat-juli.jar;%CATALINA_HOME%\lib\servlet-api.jar"
+set 
"CLASSPATH=%CLASSPATH%%CATALINA_HOME%\bin\bootstrap.jar;%CATALINA_HOME%\bin\tomcat-juli.jar;%CATALINA_HOME%\lib\servlet-api.jar;%CATALINA_HOME%\lib\tomcat-coyote.jar"
 
 set JAVA_OPTS=%JAVA_OPTS% 
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
 
diff --git a/bin/tool-wrapper.sh b/bin/tool-wrapper.sh
index 91ed73f..35d3075 100755
--- a/bin/tool-wrapper.sh
+++ b/bin/tool-wrapper.sh
@@ -119,7 +119,7 @@ fi
 if [ ! -z "$CLASSPATH" ] ; then
   CLASSPATH="$CLASSPATH":
 fi
-CLASSPATH="$CLASSPATH""$CATALINA_HOME"/bin/bootstrap.jar:"$CATALINA_HOME"/bin/tomcat-juli.jar:"$CATALINA_HOME"/lib/servlet-api.jar
+CLASSPATH="$CLASSPATH""$CATALINA_HOME"/bin/bootstrap.jar:"$CATALINA_HOME"/bin/tomcat-juli.jar:"$CATALINA_HOME"/lib/servlet-api.jar:"$CATALINA_HOME"/lib/tomcat-coyote.jar
 
 # For Cygwin, switch paths to Windows format before running java
 if $cygwin; then


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



[Bug 63608] New: Negative pattern match in rewrite rule is not as documented

2019-07-24 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63608

Bug ID: 63608
   Summary: Negative pattern match in rewrite rule is not as
documented
   Product: Tomcat 8
   Version: 8.5.x-trunk
  Hardware: All
OS: All
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: micha...@hotmail.com
  Target Milestone: 

The mention of using "NOT character ('!')" in rule patterns as negative match
no longer matches implementation:

https://tomcat.apache.org/tomcat-8.5-doc/rewrite.html

In the rules, the NOT character ('!') is also available as a possible
pattern prefix. This enables you to negate a pattern; to say, for instance:
``if the current URL does NOT match this pattern''. This can be used for
exceptional cases, where it is easier to match the negative pattern, or as a
last default rule.


The current implementation uses java.util.regex, which does not support a
simple ! prefix as a negative match regex:

https://docs.oracle.com/javase/8/docs/api/index.html?java/util/regex/Pattern.html

Instead, you need to use zero-width lookahead like this (to match any URL but
/portal/api/.*)

^(?!/portal/api/.*).*$

This inaccurate documentation exist in all versions, at least since 8.0.x. For
backward compatibility to the above documentation, RewriteRule needs the
`positive` variable and logic found in the RewriteCond class.

-- 
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 63571] The SSL sessionCacheSize config overwrites javax.net.ssl.sessionCacheSize

2019-07-24 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63571

--- Comment #5 from Letu Yang  ---
Mark,

After the JDK fix https://bugs.openjdk.java.net/browse/JDK-8213577 which
changed the default value to 20480, if Tomcat does not explicitly set it to 0,
the default value won't be unlimited any more. 

Also, as it specified in the JDK bug, it might not be a good idea to set it to
unlimited.

-- 
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 63571] The SSL sessionCacheSize config overwrites javax.net.ssl.sessionCacheSize

2019-07-24 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63571

Mark Thomas  changed:

   What|Removed |Added

 Status|NEEDINFO|NEW

--- Comment #4 from Mark Thomas  ---
Things aren't quite so clear cut.

The docs for 9.0.x & 8.5.x state that 0 means unlimited but values of 0 are
ignored (for session timeout as well).

I propose to align all current Tomcat versions on the following behaviour:

<0 - use implementation default
 0 - implementation defined behaviour for 0 (usually unlimited)
>0 - implementation defined behaviour for >0

This will apply to:
- sessionCacheSize
- sessionTimeout

This is slightly different to other similar values but the JSSE API does not
provide a "disable" option.

-- 
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 63597] use of unimplemented RequestUtil method in Host-Manager page

2019-07-24 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63597

Mark Thomas  changed:

   What|Removed |Added

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

--- Comment #1 from Mark Thomas  ---
Thanks for the report.

Fixed in:
- master for 9.0.23 onwards
- 8.5.x for 8.5.44 onwards

7.0.x is not affected.

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



[tomcat] branch 8.5.x updated: Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63597

2019-07-24 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 942d4d7  Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63597
942d4d7 is described below

commit 942d4d76784d902d71de94be9d8f4f2f991031de
Author: Mark Thomas 
AuthorDate: Wed Jul 24 16:26:38 2019 +0100

Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63597

Update to take account of HTML escaping refactoring
---
 webapps/docs/changelog.xml   | 9 +
 webapps/host-manager/WEB-INF/jsp/404.jsp | 4 ++--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 8416e8a..479390d 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -99,6 +99,15 @@
   
 
   
+  
+
+  
+63597: Update the custom 404 error page for the Host Manager
+to take account of previous refactoring so that the page is used for
+404 errors rather than falling back to the default error page. (markt)
+  
+
+  
   
 
   
diff --git a/webapps/host-manager/WEB-INF/jsp/404.jsp 
b/webapps/host-manager/WEB-INF/jsp/404.jsp
index 9816df5..1950b77 100644
--- a/webapps/host-manager/WEB-INF/jsp/404.jsp
+++ b/webapps/host-manager/WEB-INF/jsp/404.jsp
@@ -14,7 +14,7 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 --%>
-<%@ page import="org.apache.catalina.util.RequestUtil" session="false"
+<%@ page import="org.apache.tomcat.util.security.Escape" session="false"
  trimDirectiveWhitespaces="true" %>
 http://www.w3.org/TR/html4/strict.dtd;>
 
@@ -33,7 +33,7 @@
404 Not found

 The page you tried to access
-(<%=RequestUtil.filter((String) request.getAttribute(
+(<%=Escape.htmlElementContent((String) request.getAttribute(
 "javax.servlet.error.request_uri"))%>)
 does not exist.



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



[tomcat] branch master updated: Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63597

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

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


The following commit(s) were added to refs/heads/master by this push:
 new 1a24d19  Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63597
1a24d19 is described below

commit 1a24d19b05e3cabb727644f7e930048a82d6002f
Author: Mark Thomas 
AuthorDate: Wed Jul 24 16:26:38 2019 +0100

Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63597

Update to take account of HTML escaping refactoring
---
 webapps/docs/changelog.xml   | 9 +
 webapps/host-manager/WEB-INF/jsp/404.jsp | 4 ++--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 46c39fa..5504dbc 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -127,6 +127,15 @@
   
 
   
+  
+
+  
+63597: Update the custom 404 error page for the Host Manager
+to take account of previous refactoring so that the page is used for
+404 errors rather than falling back to the default error page. (markt)
+  
+
+  
   
 
   
diff --git a/webapps/host-manager/WEB-INF/jsp/404.jsp 
b/webapps/host-manager/WEB-INF/jsp/404.jsp
index 9816df5..1950b77 100644
--- a/webapps/host-manager/WEB-INF/jsp/404.jsp
+++ b/webapps/host-manager/WEB-INF/jsp/404.jsp
@@ -14,7 +14,7 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 --%>
-<%@ page import="org.apache.catalina.util.RequestUtil" session="false"
+<%@ page import="org.apache.tomcat.util.security.Escape" session="false"
  trimDirectiveWhitespaces="true" %>
 http://www.w3.org/TR/html4/strict.dtd;>
 
@@ -33,7 +33,7 @@
404 Not found

 The page you tried to access
-(<%=RequestUtil.filter((String) request.getAttribute(
+(<%=Escape.htmlElementContent((String) request.getAttribute(
 "javax.servlet.error.request_uri"))%>)
 does not exist.



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



[Bug 63578] o.a.coyote.http11.Http11Processor.prepareRequest: various inputs triggering 500 response code

2019-07-24 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63578

--- Comment #2 from Alex Rebert  ---
Thanks Mark for fixing the issues so promptly.

If you think some part of the tomcat code base would benefit from additional
automated analysis, please let me know which ones and I'll take a look.

-- 
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 63578] o.a.coyote.http11.Http11Processor.prepareRequest: various inputs triggering 500 response code

2019-07-24 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63578

Mark Thomas  changed:

   What|Removed |Added

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

--- Comment #1 from Mark Thomas  ---
Thanks for this report.

I tracked down the root causes and added minimal test cases as well as getting
the issues fixed.

Fixed in:
- master for 9.0.23 onwards
- 8.5.x for 8.5.44 onwards
- 7.0.x for 7.0.97 onwards

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



[tomcat] 08/11: Back-port performance optimization for path params

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

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

commit 8086f27d1c290063334761200c39ddebddcc14de
Author: Mark Thomas 
AuthorDate: Wed Jul 24 11:19:03 2019 +0100

Back-port performance optimization for path params
---
 java/org/apache/catalina/connector/CoyoteAdapter.java | 5 +
 1 file changed, 5 insertions(+)

diff --git a/java/org/apache/catalina/connector/CoyoteAdapter.java 
b/java/org/apache/catalina/connector/CoyoteAdapter.java
index 1420dd2..151fb48 100644
--- a/java/org/apache/catalina/connector/CoyoteAdapter.java
+++ b/java/org/apache/catalina/connector/CoyoteAdapter.java
@@ -988,6 +988,11 @@ public class CoyoteAdapter implements Adapter {
 
 ByteChunk uriBC = req.decodedURI().getByteChunk();
 int semicolon = uriBC.indexOf(';', 0);
+// Performance optimisation. Return as soon as it is known there are no
+// path parameters;
+if (semicolon == -1) {
+return;
+}
 
 // What encoding to use? Some platforms, eg z/os, use a default
 // encoding that doesn't give the expected result so be explicit


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



[tomcat] 09/11: Refactor to reduce duplication

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

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

commit aaa63d2f25b3d3f367d91674d25c32de037d3e39
Author: Mark Thomas 
AuthorDate: Wed Jul 24 11:35:52 2019 +0100

Refactor to reduce duplication
---
 .../coyote/http11/AbstractHttp11Processor.java | 48 +++---
 1 file changed, 15 insertions(+), 33 deletions(-)

diff --git a/java/org/apache/coyote/http11/AbstractHttp11Processor.java 
b/java/org/apache/coyote/http11/AbstractHttp11Processor.java
index 615172e..ae0bb2f 100644
--- a/java/org/apache/coyote/http11/AbstractHttp11Processor.java
+++ b/java/org/apache/coyote/http11/AbstractHttp11Processor.java
@@ -1358,20 +1358,10 @@ public abstract class AbstractHttp11Processor 
extends AbstractProcessor {
 hostValueMB = headers.getUniqueValue("host");
 } catch (IllegalArgumentException iae) {
 // Multiple Host headers are not permitted
-// 400 - Bad request
-response.setStatus(400);
-setErrorState(ErrorState.CLOSE_CLEAN, null);
-if (getLog().isDebugEnabled()) {
-
getLog().debug(sm.getString("http11processor.request.multipleHosts"));
-}
+badRequest("http11processor.request.multipleHosts");
 }
 if (http11 && hostValueMB == null) {
-// 400 - Bad request
-response.setStatus(400);
-setErrorState(ErrorState.CLOSE_CLEAN, null);
-if (getLog().isDebugEnabled()) {
-
getLog().debug(sm.getString("http11processor.request.noHostHeader"));
-}
+badRequest("http11processor.request.noHostHeader");
 }
 
 // Check for an absolute-URI less the query string which has already
@@ -1419,11 +1409,7 @@ public abstract class AbstractHttp11Processor extends 
AbstractProcessor {
 // Strictly there needs to be a check for valid %nn
 // encoding here but skip it since it will never be
 // decoded because the userinfo is ignored
-response.setStatus(400);
-setErrorState(ErrorState.CLOSE_CLEAN, null);
-if (getLog().isDebugEnabled()) {
-
getLog().debug(sm.getString("http11processor.request.invalidUserInfo"));
-}
+
badRequest("http11processor.request.invalidUserInfo");
 break;
 }
 }
@@ -1449,11 +1435,7 @@ public abstract class AbstractHttp11Processor extends 
AbstractProcessor {
 // The requirements of RFC 7230 are being
 // applied. If the host header and the request
 // line do not agree, trigger a 400 response.
-response.setStatus(400);
-setErrorState(ErrorState.CLOSE_CLEAN, null);
-if (getLog().isDebugEnabled()) {
-
getLog().debug(sm.getString("http11processor.request.inconsistentHosts"));
-}
+
badRequest("http11processor.request.inconsistentHosts");
 }
 }
 }
@@ -1464,24 +1446,15 @@ public abstract class AbstractHttp11Processor 
extends AbstractProcessor {
 hostValueMB.setBytes(uriB, uriBCStart + pos, slashPos - 
pos);
 }
 } else {
-response.setStatus(400);
-setErrorState(ErrorState.CLOSE_CLEAN, null);
-if (getLog().isDebugEnabled()) {
-
getLog().debug(sm.getString("http11processor.request.invalidScheme"));
-}
+badRequest("http11processor.request.invalidScheme");
 }
-
 }
 
 // Validate the characters in the URI. %nn decoding will be checked at
 // the point of decoding.
 for (int i = uriBC.getStart(); i < uriBC.getEnd(); i++) {
 if (!httpParser.isAbsolutePathRelaxed(uriB[i])) {
-response.setStatus(400);
-setErrorState(ErrorState.CLOSE_CLEAN, null);
-if (getLog().isDebugEnabled()) {
-
getLog().debug(sm.getString("http11processor.request.invalidUri"));
-}
+badRequest("http11processor.request.invalidUri");
 break;
 }
 }
@@ -1563,6 +1536,15 @@ public abstract class AbstractHttp11Processor extends 
AbstractProcessor {
 }
 
 
+private void badRequest(String errorKey) {
+response.setStatus(400);
+setErrorState(ErrorState.CLOSE_CLEAN, null);
+

[tomcat] 03/11: Disable debug logging when running cobertura

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

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

commit 54c40678928d8e44f49dac1315468e5776f9f0a3
Author: Mark Thomas 
AuthorDate: Wed Jul 24 09:12:52 2019 +0100

Disable debug logging when running cobertura
---
 res/cobertura/logback.xml | 31 +++
 1 file changed, 31 insertions(+)

diff --git a/res/cobertura/logback.xml b/res/cobertura/logback.xml
new file mode 100644
index 000..72d947b
--- /dev/null
+++ b/res/cobertura/logback.xml
@@ -0,0 +1,31 @@
+
+
+
+
+  
+
+
+  %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - 
%msg%n
+
+  
+
+  
+
+  
+
\ 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] 04/11: Polish. Align i18n with 8.5.x

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

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

commit 0eb525f09bcfa231a0e89c4796a0e17dbe82d09f
Author: Mark Thomas 
AuthorDate: Wed Jul 24 10:48:35 2019 +0100

Polish. Align i18n with 8.5.x
---
 java/org/apache/catalina/connector/CoyoteAdapter.java   |  8 +++-
 .../apache/catalina/connector/LocalStrings.properties   |  4 ++--
 .../catalina/connector/LocalStrings_es.properties   |  2 +-
 .../catalina/connector/LocalStrings_fr.properties   | 10 ++
 .../catalina/connector/LocalStrings_ja.properties   | 10 ++
 .../catalina/connector/LocalStrings_ru.properties   | 17 +
 6 files changed, 43 insertions(+), 8 deletions(-)

diff --git a/java/org/apache/catalina/connector/CoyoteAdapter.java 
b/java/org/apache/catalina/connector/CoyoteAdapter.java
index 2f42ef1..882ca47 100644
--- a/java/org/apache/catalina/connector/CoyoteAdapter.java
+++ b/java/org/apache/catalina/connector/CoyoteAdapter.java
@@ -109,8 +109,7 @@ public class CoyoteAdapter implements Adapter {
 /**
  * The string manager for this package.
  */
-protected static final StringManager sm =
-StringManager.getManager(Constants.Package);
+protected static final StringManager sm = 
StringManager.getManager(CoyoteAdapter.class);
 
 
 /**
@@ -268,8 +267,7 @@ public class CoyoteAdapter implements Adapter {
 Response response = (Response) res.getNote(ADAPTER_NOTES);
 
 if (request == null) {
-throw new IllegalStateException(
-"Dispatch may only happen on an existing request.");
+throw new 
IllegalStateException(sm.getString("coyoteAdapter.nullRequest"));
 }
 boolean comet = false;
 boolean success = true;
@@ -374,7 +372,7 @@ public class CoyoteAdapter implements Adapter {
 } catch (Throwable t) {
 ExceptionUtils.handleThrowable(t);
 success = false;
-log.error(sm.getString("coyoteAdapter.service"), t);
+log.error(sm.getString("coyoteAdapter.asyncDispatch"), t);
 } finally {
 req.getRequestProcessor().setWorkerThreadName(null);
 // Recycle the wrapper request and response
diff --git a/java/org/apache/catalina/connector/LocalStrings.properties 
b/java/org/apache/catalina/connector/LocalStrings.properties
index 6aee67a..c432a9a 100644
--- a/java/org/apache/catalina/connector/LocalStrings.properties
+++ b/java/org/apache/catalina/connector/LocalStrings.properties
@@ -16,14 +16,14 @@
 cometEvent.nullRequest=The event object has been recycled and is no longer 
associated with a request
 
 coyoteAdapter.accesslogFail=Exception while attempting to add an entry to the 
access log
+coyoteAdapter.asyncDispatch=Exception while processing an asynchronous request
 coyoteAdapter.authenticate=Authenticated user [{0}] provided by connector
 coyoteAdapter.authorize=Authorizing user [{0}] using Tomcat''s Realm
 coyoteAdapter.checkRecycled.request=Encountered a non-recycled request and 
recycled it forcedly.
 coyoteAdapter.checkRecycled.response=Encountered a non-recycled response and 
recycled it forcedly.
 coyoteAdapter.debug=The variable [{0}] has value [{1}]
+coyoteAdapter.nullRequest=An asynchronous dispatch may only happen on an 
existing request
 coyoteAdapter.parsePathParam=Unable to parse the path parameters using 
encoding [{0}]. The path parameters in the URL will be ignored.
-coyoteAdapter.read=The servlet did not read all available bytes during the 
processing of the read event
-coyoteAdapter.service=An exception or error occurred in the container during 
the request processing
 
 coyoteConnector.MapperRegistration=register Mapper: {0}
 coyoteConnector.cannotRegisterProtocol=Cannot register MBean for the Protocol
diff --git a/java/org/apache/catalina/connector/LocalStrings_es.properties 
b/java/org/apache/catalina/connector/LocalStrings_es.properties
index 82ed8c4..872cc69 100644
--- a/java/org/apache/catalina/connector/LocalStrings_es.properties
+++ b/java/org/apache/catalina/connector/LocalStrings_es.properties
@@ -16,9 +16,9 @@
 cometEvent.nullRequest=El objeto de evento ha sido reciclado y ya no está 
asociado con este requerimiento
 
 coyoteAdapter.accesslogFail=Excepción al intentar añadir una entrada al 
historial de acceso
+coyoteAdapter.checkRecycled.response=Se encontró una respuesta no reciclable y 
se crecicló a la fuerza
 coyoteAdapter.debug=La variable [{0}] tiene el valor [{1}]
 coyoteAdapter.parsePathParam=No puedo analizar los parámetros de ruta mediante 
la codificación [{0}]. Se ignoran los parámetros de la URL.
-coyoteAdapter.read=El servlet no leyó todos los bytes disponibles durante el 
procesamiento del evento de lectura
 
 coyoteConnector.MapperRegistration=Mapeador de registro: {0}
 coyoteConnector.cannotRegisterProtocol=No puedo registrar MBean para el 
Protocolo

[tomcat] 01/11: Rename webapp-3.0 to webapp to align with 8.5.x and ease back-ports

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

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

commit dd5cbcf166cb6a65124234df4e5fe7ae8e76b7f0
Author: Mark Thomas 
AuthorDate: Tue Jul 23 22:18:47 2019 +0100

Rename webapp-3.0 to webapp to align with 8.5.x and ease back-ports
---
 .gitignore |   4 +--
 build.xml  |   8 ++---
 res/rat/rat-excludes.txt   |  16 -
 test/javax/el/TestCompositeELResolver.java |   2 +-
 test/javax/servlet/jsp/TestPageContext.java|   2 +-
 .../servlet/resources/TestSchemaValidation.java|   2 +-
 .../connector/TestCoyoteAdapterRequestFuzzing.java |   2 +-
 .../catalina/core/TestApplicationContext.java  |   8 ++---
 .../catalina/core/TestDefaultInstanceManager.java  |   2 +-
 .../apache/catalina/core/TestStandardContext.java  |   8 ++---
 .../core/TestStandardContextResources.java |  10 +++---
 .../apache/catalina/core/TestStandardWrapper.java  |   8 ++---
 .../catalina/ha/context/TestReplicatedContext.java |   2 +-
 .../apache/catalina/loader/TestVirtualContext.java |  36 ++---
 .../catalina/loader/TestVirtualWebappLoader.java   |   4 +--
 .../catalina/loader/TestWebappClassLoader.java |   4 +--
 .../catalina/servlets/TestDefaultServlet.java  |   4 +--
 .../apache/catalina/startup/TestContextConfig.java |  14 
 test/org/apache/catalina/startup/TestTomcat.java   |   2 +-
 .../catalina/startup/TestWebappServiceLoader.java  |   2 +-
 .../coyote/ajp/TestAbstractAjpProcessor.java   |   2 +-
 .../coyote/http11/TestAbstractHttp11Processor.java |  14 
 test/org/apache/el/TestELInJsp.java|  36 ++---
 test/org/apache/jasper/compiler/TestCompiler.java  |  26 +++
 .../jasper/compiler/TestELInterpreterFactory.java  |   2 +-
 test/org/apache/jasper/compiler/TestGenerator.java |  16 -
 test/org/apache/jasper/compiler/TestJspConfig.java |   2 +-
 .../jasper/compiler/TestJspDocumentParser.java |   8 ++---
 test/org/apache/jasper/compiler/TestJspReader.java |   2 +-
 .../jasper/compiler/TestNodeIntegration.java   |   2 +-
 test/org/apache/jasper/compiler/TestParser.java|  32 +-
 .../compiler/TestParserNoStrictWhitespace.java |  10 +++---
 .../jasper/compiler/TestScriptingVariabler.java|   6 ++--
 .../jasper/compiler/TestTagPluginManager.java  |   2 +-
 test/org/apache/jasper/compiler/TestValidator.java |   4 +--
 .../jasper/runtime/TestCustomHttpJspPage.java  |   2 +-
 .../jasper/runtime/TestJspContextWrapper.java  |   2 +-
 .../apache/jasper/runtime/TestJspWriterImpl.java   |   4 +--
 .../apache/jasper/runtime/TestPageContextImpl.java |   6 ++--
 test/org/apache/naming/TestEnvEntry.java   |   4 +--
 .../naming/resources/TestFileDirContext.java   |   2 +-
 .../apache/naming/resources/TestNamingContext.java |   2 +-
 .../apache/naming/resources/TestWarDirContext.java |   6 ++--
 .../tomcat/util/http/mapper/TestMapperWebapps.java |   6 ++--
 .../WEB-INF/lib/resources.jar  | Bin
 .../WEB-INF/web.xml|   0
 .../'singlequote2.jsp  |   0
 .../WEB-INF/classes/#Bug51584.txt  |   0
 .../classes/META-INF/resources/resourceG.jsp   |   0
 .../WEB-INF/lib/resources.jar  | Bin
 .../WEB-INF/lib/resources2.jar | Bin
 .../WEB-INF/web.xml|   0
 .../bug51396.jsp   |   0
 .../folder/resourceC.jsp   |   0
 .../folder/resourceE.jsp   |   0
 .../jndi.jsp   |   0
 .../resourceA.jsp  |   0
 .../warDirContext.jsp  |   0
 .../WEB-INF/web.xml|   0
 .../WEB-INF/web.xml|   0
 .../protected.jsp  |   0
 .../unprotected.jsp|   0
 .../target/classes/META-INF/C.tld  |   0
 .../META-INF/resources/rsrc/resourceE.properties   |   0
 .../target/classes/rsrc/resourceC.properties   |   0
 .../src/main/lib/META-INF/B.tld|   0
 .../src/main/lib/rsrc/resourceD.properties |   0
 .../src/main/misc/resourceI.properties |   0
 .../src/main/webapp/WEB-INF/A.tld  |   0
 .../WEB-INF/classes/rsrc/resourceA.properties  |   0
 .../src/main/webapp/WEB-INF/lib/rsrc.jar   | Bin
 .../src/main/webapp/WEB-INF/web.xml|   0
 .../main/webapp/classpathGetResourceAsStream.jsp   |   0
 .../classpathGetResourceUrlThenGetStream.jsp   |   0
 .../src/main/webapp/classpathGetResources.jsp  |   0
 

[tomcat] 05/11: Polish. Align with 8.5.x. Spacing, Javadoc. No functional change.

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

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

commit 81b3bf2a377b495bac9fef2c3a01360a5b7c3df1
Author: Mark Thomas 
AuthorDate: Wed Jul 24 10:55:35 2019 +0100

Polish. Align with 8.5.x. Spacing, Javadoc. No functional change.
---
 .../apache/catalina/connector/CoyoteAdapter.java   | 137 -
 1 file changed, 78 insertions(+), 59 deletions(-)

diff --git a/java/org/apache/catalina/connector/CoyoteAdapter.java 
b/java/org/apache/catalina/connector/CoyoteAdapter.java
index 882ca47..02e5fbf 100644
--- a/java/org/apache/catalina/connector/CoyoteAdapter.java
+++ b/java/org/apache/catalina/connector/CoyoteAdapter.java
@@ -143,8 +143,8 @@ public class CoyoteAdapter implements Adapter {
  * @return false to indicate an error, expected or not
  */
 @Override
-public boolean event(org.apache.coyote.Request req,
-org.apache.coyote.Response res, SocketStatus status) {
+public boolean event(org.apache.coyote.Request req, 
org.apache.coyote.Response res,
+SocketStatus status) {
 
 Request request = (Request) req.getNote(ADAPTER_NOTES);
 Response response = (Response) res.getNote(ADAPTER_NOTES);
@@ -272,7 +272,9 @@ public class CoyoteAdapter implements Adapter {
 boolean comet = false;
 boolean success = true;
 AsyncContextImpl asyncConImpl = request.getAsyncContextInternal();
+
 
req.getRequestProcessor().setWorkerThreadName(Thread.currentThread().getName());
+
 try {
 if (!request.isAsync() && !comet) {
 // Error or timeout
@@ -301,13 +303,14 @@ public class CoyoteAdapter implements Adapter {
 // if the application doesn't define one)?
 if (!request.isAsyncDispatching() && request.isAsync() &&
 response.isErrorReportRequired()) {
-
connector.getService().getContainer().getPipeline().getFirst().invoke(request, 
response);
+
connector.getService().getContainer().getPipeline().getFirst().invoke(
+request, response);
 }
 
 if (request.isAsyncDispatching()) {
-
connector.getService().getContainer().getPipeline().getFirst().invoke(request, 
response);
-Throwable t = (Throwable) request.getAttribute(
-RequestDispatcher.ERROR_EXCEPTION);
+
connector.getService().getContainer().getPipeline().getFirst().invoke(
+request, response);
+Throwable t = (Throwable) 
request.getAttribute(RequestDispatcher.ERROR_EXCEPTION);
 if (t != null) {
 asyncConImpl.setErrorState(t, true);
 }
@@ -390,19 +393,14 @@ public class CoyoteAdapter implements Adapter {
 }
 
 
-/**
- * Service method.
- */
 @Override
-public void service(org.apache.coyote.Request req,
-org.apache.coyote.Response res)
-throws Exception {
+public void service(org.apache.coyote.Request req, 
org.apache.coyote.Response res)
+throws Exception {
 
 Request request = (Request) req.getNote(ADAPTER_NOTES);
 Response response = (Response) res.getNote(ADAPTER_NOTES);
 
 if (request == null) {
-
 // Create objects
 request = connector.createRequest();
 request.setCoyoteRequest(req);
@@ -418,8 +416,7 @@ public class CoyoteAdapter implements Adapter {
 res.setNote(ADAPTER_NOTES, response);
 
 // Set query string encoding
-req.getParameters().setQueryStringEncoding
-(connector.getURIEncoding());
+
req.getParameters().setQueryStringEncoding(connector.getURIEncoding());
 
 }
 
@@ -438,9 +435,11 @@ public class CoyoteAdapter implements Adapter {
 postParseSuccess = postParseRequest(req, request, res, response);
 if (postParseSuccess) {
 //check valves if we support async
-
request.setAsyncSupported(connector.getService().getContainer().getPipeline().isAsyncSupported());
+request.setAsyncSupported(
+
connector.getService().getContainer().getPipeline().isAsyncSupported());
 // Calling the container
-
connector.getService().getContainer().getPipeline().getFirst().invoke(request, 
response);
+
connector.getService().getContainer().getPipeline().getFirst().invoke(
+request, response);
 
 if (request.isComet()) {
 if (!response.isClosed() && !response.isError()) {
@@ -493,6 +492,7 @@ public class CoyoteAdapter implements Adapter {
 req.action(ActionCode.POST_REQUEST , null);
 }
 }
+
 } catch 

[tomcat] 06/11: Back-port performance improvement for setting current thread name

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

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

commit 4e88cfc6b868f2af5d84b6ef9e76f74b4b1d754d
Author: Mark Thomas 
AuthorDate: Wed Jul 24 10:59:52 2019 +0100

Back-port performance improvement for setting current thread name
---
 java/org/apache/catalina/connector/CoyoteAdapter.java | 15 +--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/connector/CoyoteAdapter.java 
b/java/org/apache/catalina/connector/CoyoteAdapter.java
index 02e5fbf..5245e84 100644
--- a/java/org/apache/catalina/connector/CoyoteAdapter.java
+++ b/java/org/apache/catalina/connector/CoyoteAdapter.java
@@ -81,6 +81,16 @@ public class CoyoteAdapter implements Adapter {
 
Boolean.parseBoolean(System.getProperty("org.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH",
 "false"));
 
 
+private static final ThreadLocal THREAD_NAME =
+new ThreadLocal() {
+
+@Override
+protected String initialValue() {
+return Thread.currentThread().getName();
+}
+
+};
+
 // --- Constructors
 
 
@@ -273,7 +283,7 @@ public class CoyoteAdapter implements Adapter {
 boolean success = true;
 AsyncContextImpl asyncConImpl = request.getAsyncContextInternal();
 
-
req.getRequestProcessor().setWorkerThreadName(Thread.currentThread().getName());
+req.getRequestProcessor().setWorkerThreadName(THREAD_NAME.get());
 
 try {
 if (!request.isAsync() && !comet) {
@@ -428,10 +438,11 @@ public class CoyoteAdapter implements Adapter {
 boolean async = false;
 boolean postParseSuccess = false;
 
+req.getRequestProcessor().setWorkerThreadName(THREAD_NAME.get());
+
 try {
 // Parse and set Catalina and configuration specific
 // request parameters
-
req.getRequestProcessor().setWorkerThreadName(Thread.currentThread().getName());
 postParseSuccess = postParseRequest(req, request, res, response);
 if (postParseSuccess) {
 //check valves if we support async


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



[tomcat] 11/11: Align with 8.5.x to fix failing test

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

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

commit 7bbfa2c5b3fe75958266d44d2e496730d96647aa
Author: Mark Thomas 
AuthorDate: Wed Jul 24 12:23:40 2019 +0100

Align with 8.5.x to fix failing test
---
 .../catalina/core/TestSwallowAbortedUploads.java   | 47 ++
 1 file changed, 22 insertions(+), 25 deletions(-)

diff --git a/test/org/apache/catalina/core/TestSwallowAbortedUploads.java 
b/test/org/apache/catalina/core/TestSwallowAbortedUploads.java
index 650e81d..b8f71ed 100644
--- a/test/org/apache/catalina/core/TestSwallowAbortedUploads.java
+++ b/test/org/apache/catalina/core/TestSwallowAbortedUploads.java
@@ -39,6 +39,7 @@ import org.junit.Test;
 
 import org.apache.catalina.Context;
 import org.apache.catalina.Wrapper;
+import org.apache.catalina.connector.Connector;
 import org.apache.catalina.startup.SimpleHttpClient;
 import org.apache.catalina.startup.Tomcat;
 import org.apache.catalina.startup.TomcatBaseTest;
@@ -49,7 +50,7 @@ public class TestSwallowAbortedUploads extends TomcatBaseTest 
{
 
 private static Log log = 
LogFactory.getLog(TestSwallowAbortedUploads.class);
 
-/**
+/*
  * Test whether size limited uploads correctly handle connection draining.
  */
 public Exception doAbortedUploadTest(AbortedUploadClient client, boolean 
limited,
@@ -67,7 +68,7 @@ public class TestSwallowAbortedUploads extends TomcatBaseTest 
{
 return ex;
 }
 
-/**
+/*
  * Test whether aborted POST correctly handle connection draining.
  */
 public Exception doAbortedPOSTTest(AbortedPOSTClient client, int status,
@@ -127,7 +128,7 @@ public class TestSwallowAbortedUploads extends 
TomcatBaseTest {
 AbortedUploadClient client = new AbortedUploadClient();
 Exception ex = doAbortedUploadTest(client, true, false);
 Assert.assertTrue("Limited upload with swallow disabled does not 
generate client exception",
-   ex != null && ex instanceof java.net.SocketException);
+   ex instanceof java.net.SocketException);
 client.reset();
 }
 
@@ -173,7 +174,7 @@ public class TestSwallowAbortedUploads extends 
TomcatBaseTest {
 AbortedPOSTClient client = new AbortedPOSTClient();
 Exception ex = doAbortedPOSTTest(client, 
HttpServletResponse.SC_REQUEST_ENTITY_TOO_LARGE, false);
 Assert.assertTrue("Limited upload with swallow disabled does not 
generate client exception",
-   ex != null && ex instanceof java.net.SocketException);
+   ex instanceof java.net.SocketException);
 client.reset();
 }
 
@@ -227,15 +228,12 @@ public class TestSwallowAbortedUploads extends 
TomcatBaseTest {
 private static final String URI = "/uploadAborted";
 private static final String servletName = "uploadAborted";
 private static final int limitSize = 100;
-private static final int hugeSize = 200;
+private static final int hugeSize = 1000;
 
-private boolean init;
 private Context context;
 
 private synchronized void init(boolean limited, boolean swallow)
 throws Exception {
-if (init)
-return;
 
 Tomcat tomcat = getTomcatInstance();
 context = tomcat.addContext("", TEMP_DIR);
@@ -254,10 +252,12 @@ public class TestSwallowAbortedUploads extends 
TomcatBaseTest {
 context.addServletMapping(URI, servletName);
 context.setSwallowAbortedUploads(swallow);
 
-tomcat.start();
-setPort(tomcat.getConnector().getLocalPort());
+Connector c = tomcat.getConnector();
+c.setMaxPostSize(2 * hugeSize);
+c.setProperty("maxSwallowSize", Integer.toString(hugeSize));
 
-init = true;
+tomcat.start();
+setPort(c.getLocalPort());
 }
 
 private Exception doRequest(boolean limited, boolean swallow) {
@@ -294,7 +294,7 @@ public class TestSwallowAbortedUploads extends 
TomcatBaseTest {
 "ASCII");
 
 request = new String[] { "POST http://localhost:; + getPort() 
+ URI + " HTTP/1.1" + CRLF
-+ "Host: localhost" + CRLF
++ "Host: localhost:" + getPort() + CRLF
 + "Connection: close" + CRLF
 + "Content-Type: multipart/form-data; boundary=" + 
boundary + CRLF
 + "Content-Length: " + content.length() + CRLF
@@ -322,9 +322,9 @@ public class TestSwallowAbortedUploads extends 
TomcatBaseTest {
 
 private static final long serialVersionUID = 1L;
 
-private int status = 200;
+private final int status;
 
-public void setStatus(int status) {
+public AbortedPOSTServlet(int status) {
 

[tomcat] 07/11: Polish. Align with 8.5.x. Re-order and clean-up. No functional change.

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

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

commit 49e01f938c8beda0ebb65cb9e8bd1840e08bb3c9
Author: Mark Thomas 
AuthorDate: Wed Jul 24 11:03:59 2019 +0100

Polish. Align with 8.5.x. Re-order and clean-up. No functional change.
---
 java/org/apache/catalina/connector/CoyoteAdapter.java | 18 --
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/java/org/apache/catalina/connector/CoyoteAdapter.java 
b/java/org/apache/catalina/connector/CoyoteAdapter.java
index 5245e84..1420dd2 100644
--- a/java/org/apache/catalina/connector/CoyoteAdapter.java
+++ b/java/org/apache/catalina/connector/CoyoteAdapter.java
@@ -279,6 +279,7 @@ public class CoyoteAdapter implements Adapter {
 if (request == null) {
 throw new 
IllegalStateException(sm.getString("coyoteAdapter.nullRequest"));
 }
+
 boolean comet = false;
 boolean success = true;
 AsyncContextImpl asyncConImpl = request.getAsyncContextInternal();
@@ -427,7 +428,6 @@ public class CoyoteAdapter implements Adapter {
 
 // Set query string encoding
 
req.getParameters().setQueryStringEncoding(connector.getURIEncoding());
-
 }
 
 if (connector.getXpoweredBy()) {
@@ -472,8 +472,8 @@ public class CoyoteAdapter implements Adapter {
 request.setFilterChain(null);
 }
 }
-
 }
+
 if (request.isAsync()) {
 async = true;
 Throwable throwable =
@@ -686,14 +686,14 @@ public class CoyoteAdapter implements Adapter {
 // If the processor has set the scheme (AJP does this, HTTP does this 
if
 // SSL is enabled) use this to set the secure flag as well. If the
 // processor hasn't set it, use the settings from the connector
-if (! req.scheme().isNull()) {
-// use processor specified scheme to determine secure state
-request.setSecure(req.scheme().equals("https"));
-} else {
-// use connector scheme and secure configuration, (defaults to
+if (req.scheme().isNull()) {
+// Use connector scheme and secure configuration, (defaults to
 // "http" and false respectively)
 req.scheme().setString(connector.getScheme());
 request.setSecure(connector.getSecure());
+} else {
+// Use processor specified scheme to determine secure state
+request.setSecure(req.scheme().equals("https"));
 }
 
 // At this point the Host header has been processed.
@@ -1419,8 +1419,6 @@ public class CoyoteAdapter implements Adapter {
  * @param len Length
  */
 protected static void copyBytes(byte[] b, int dest, int src, int len) {
-for (int pos = 0; pos < len; pos++) {
-b[pos + dest] = b[pos + src];
-}
+System.arraycopy(b, src, b, dest, len);
 }
 }


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



[tomcat] 10/11: Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63578

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

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

commit 3de983433578765d52179e4b1c69ad04019673b2
Author: Mark Thomas 
AuthorDate: Tue Jul 23 19:07:19 2019 +0100

Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63578

Various fixes to return 400 responses rather than 500 responses when the
provided request is invalid.
---
 .../apache/catalina/connector/CoyoteAdapter.java   | 11 +++-
 .../coyote/http11/AbstractHttp11Processor.java | 46 ++--
 .../apache/coyote/http11/LocalStrings.properties   |  4 +-
 .../connector/TestCoyoteAdapterRequestFuzzing.java | 63 +-
 .../apache/catalina/startup/SimpleHttpClient.java  | 12 -
 test/org/apache/tomcat/unittest/TesterData.java| 37 +
 webapps/docs/changelog.xml |  8 +++
 7 files changed, 149 insertions(+), 32 deletions(-)

diff --git a/java/org/apache/catalina/connector/CoyoteAdapter.java 
b/java/org/apache/catalina/connector/CoyoteAdapter.java
index 151fb48..3813073 100644
--- a/java/org/apache/catalina/connector/CoyoteAdapter.java
+++ b/java/org/apache/catalina/connector/CoyoteAdapter.java
@@ -816,7 +816,16 @@ public class CoyoteAdapter implements Adapter {
 }
 
 // Look for session ID in cookies and SSL session
-parseSessionCookiesId(req, request);
+try {
+parseSessionCookiesId(req, request);
+} catch (IllegalArgumentException e) {
+// Too many cookies
+if (!response.isError()) {
+response.setError();
+response.sendError(400);
+}
+return false;
+}
 parseSessionSslId(request);
 
 sessionID = request.getRequestedSessionId();
diff --git a/java/org/apache/coyote/http11/AbstractHttp11Processor.java 
b/java/org/apache/coyote/http11/AbstractHttp11Processor.java
index ae0bb2f..1bd0adb 100644
--- a/java/org/apache/coyote/http11/AbstractHttp11Processor.java
+++ b/java/org/apache/coyote/http11/AbstractHttp11Processor.java
@@ -1313,7 +1313,7 @@ public abstract class AbstractHttp11Processor extends 
AbstractProcessor {
 
 // Check connection header
 MessageBytes connectionValueMB = 
headers.getValue(Constants.CONNECTION);
-if (connectionValueMB != null) {
+if (connectionValueMB != null && !connectionValueMB.isNull()) {
 ByteChunk connectionValueBC = connectionValueMB.getByteChunk();
 if (findBytes(connectionValueBC, Constants.CLOSE_BYTES) != -1) {
 keepAlive = false;
@@ -1323,17 +1323,16 @@ public abstract class AbstractHttp11Processor 
extends AbstractProcessor {
 }
 }
 
-MessageBytes expectMB = null;
 if (http11) {
-expectMB = headers.getValue("expect");
-}
-if (expectMB != null) {
-if (expectMB.indexOfIgnoreCase("100-continue", 0) != -1) {
-getInputBuffer().setSwallowInput(false);
-expectation = true;
-} else {
-response.setStatus(HttpServletResponse.SC_EXPECTATION_FAILED);
-setErrorState(ErrorState.CLOSE_CLEAN, null);
+MessageBytes expectMB = headers.getValue("expect");
+if (expectMB != null && !expectMB.isNull()) {
+if (expectMB.indexOfIgnoreCase("100-continue", 0) != -1) {
+getInputBuffer().setSwallowInput(false);
+expectation = true;
+} else {
+
response.setStatus(HttpServletResponse.SC_EXPECTATION_FAILED);
+setErrorState(ErrorState.CLOSE_CLEAN, null);
+}
 }
 }
 
@@ -1342,7 +1341,7 @@ public abstract class AbstractHttp11Processor extends 
AbstractProcessor {
 MessageBytes userAgentValueMB = headers.getValue("user-agent");
 // Check in the restricted list, and adjust the http11
 // and keepAlive flags accordingly
-if(userAgentValueMB != null) {
+if(userAgentValueMB != null && !userAgentValueMB.isNull()) {
 String userAgentValue = userAgentValueMB.toString();
 if (restrictedUserAgents.matcher(userAgentValue).matches()) {
 http11 = false;
@@ -1442,8 +1441,16 @@ public abstract class AbstractHttp11Processor extends 
AbstractProcessor {
 } else {
 // Not HTTP/1.1 - no Host header so generate one since
 // Tomcat internals assume it is set
-hostValueMB = headers.setValue("host");
-hostValueMB.setBytes(uriB, uriBCStart + pos, slashPos - 
pos);
+try {
+hostValueMB = headers.setValue("host");
+

[tomcat] branch 7.0.x updated (5091d7f -> 7bbfa2c)

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

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


from 5091d7f  Prep for next version
 new dd5cbcf  Rename webapp-3.0 to webapp to align with 8.5.x and ease 
back-ports
 new 3d96f3b  Align version specific tests with 8.5.x
 new 54c4067  Disable debug logging when running cobertura
 new 0eb525f  Polish. Align i18n with 8.5.x
 new 81b3bf2  Polish. Align with 8.5.x. Spacing, Javadoc. No functional 
change.
 new 4e88cfc  Back-port performance improvement for setting current thread 
name
 new 49e01f9  Polish. Align with 8.5.x. Re-order and clean-up. No 
functional change.
 new 8086f27  Back-port performance optimization for path params
 new aaa63d2  Refactor to reduce duplication
 new 3de9834  Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63578
 new 7bbfa2c  Align with 8.5.x to fix failing test

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


Summary of changes:
 .gitignore |   4 +-
 build.xml  |   8 +-
 .../apache/catalina/connector/CoyoteAdapter.java   | 196 +
 .../catalina/connector/LocalStrings.properties |   4 +-
 .../catalina/connector/LocalStrings_es.properties  |   2 +-
 .../catalina/connector/LocalStrings_fr.properties  |  10 ++
 .../catalina/connector/LocalStrings_ja.properties  |  10 ++
 .../LocalStrings_ru.properties |   4 +-
 .../coyote/http11/AbstractHttp11Processor.java |  94 +-
 .../apache/coyote/http11/LocalStrings.properties   |   4 +-
 .../manager.xml => res/cobertura/logback.xml   |  19 +-
 res/rat/rat-excludes.txt   |  16 +-
 test/javax/el/TestCompositeELResolver.java |   2 +-
 test/javax/servlet/jsp/TestPageContext.java|   2 +-
 .../servlet/resources/TestSchemaValidation.java|   2 +-
 .../connector/TestCoyoteAdapterRequestFuzzing.java |  65 +--
 .../catalina/core/TestApplicationContext.java  |   8 +-
 .../catalina/core/TestDefaultInstanceManager.java  |   2 +-
 .../apache/catalina/core/TestStandardContext.java  |   8 +-
 .../core/TestStandardContextResources.java |  10 +-
 .../apache/catalina/core/TestStandardWrapper.java  |   8 +-
 .../catalina/core/TestSwallowAbortedUploads.java   |  47 +++--
 .../catalina/ha/context/TestReplicatedContext.java |   2 +-
 .../apache/catalina/loader/TestVirtualContext.java |  36 ++--
 .../catalina/loader/TestVirtualWebappLoader.java   |   4 +-
 .../catalina/loader/TestWebappClassLoader.java |   4 +-
 .../catalina/servlets/TestDefaultServlet.java  |   4 +-
 .../apache/catalina/startup/SimpleHttpClient.java  |  12 +-
 .../apache/catalina/startup/TestContextConfig.java |  14 +-
 test/org/apache/catalina/startup/TestTomcat.java   |   2 +-
 .../catalina/startup/TestWebappServiceLoader.java  |   2 +-
 .../coyote/ajp/TestAbstractAjpProcessor.java   |   2 +-
 .../coyote/http11/TestAbstractHttp11Processor.java |  14 +-
 test/org/apache/el/TestELInJsp.java|  36 ++--
 test/org/apache/jasper/compiler/TestCompiler.java  |  26 +--
 .../jasper/compiler/TestELInterpreterFactory.java  |   2 +-
 test/org/apache/jasper/compiler/TestGenerator.java |  16 +-
 .../jasper/compiler/TestJspDocumentParser.java |   8 +-
 test/org/apache/jasper/compiler/TestJspReader.java |   2 +-
 .../jasper/compiler/TestNodeIntegration.java   |   2 +-
 test/org/apache/jasper/compiler/TestParser.java|  32 ++--
 .../compiler/TestParserNoStrictWhitespace.java |  10 +-
 .../jasper/compiler/TestScriptingVariabler.java|   6 +-
 .../jasper/compiler/TestTagPluginManager.java  |   2 +-
 test/org/apache/jasper/compiler/TestValidator.java |  27 ++-
 .../jasper/runtime/TestCustomHttpJspPage.java  |   2 +-
 .../jasper/runtime/TestJspContextWrapper.java  |   2 +-
 .../apache/jasper/runtime/TestJspWriterImpl.java   |   4 +-
 .../apache/jasper/runtime/TestPageContextImpl.java |   6 +-
 test/org/apache/naming/TestEnvEntry.java   |   4 +-
 .../naming/resources/TestFileDirContext.java   |   2 +-
 .../apache/naming/resources/TestNamingContext.java |   2 +-
 .../apache/naming/resources/TestWarDirContext.java |   6 +-
 ...sterThreadScopedHolder.java => TesterData.java} |  25 +--
 .../tomcat/util/http/mapper/TestMapperWebapps.java |   6 +-
 test/webapp-2.2/WEB-INF/web.xml|   4 +-
 test/webapp-2.3/WEB-INF/web.xml|   4 +-
 test/webapp-2.4/WEB-INF/web.xml|   4 +-
 test/webapp-2.5/WEB-INF/web.xml|   4 +-
 test/webapp-3.0/WEB-INF/web.xml| 119 +
 .../WEB-INF/lib/resources.jar  | 

[tomcat] 02/11: Align version specific tests with 8.5.x

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

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

commit 3d96f3b2c846c440cea65de95ae0f504459c89a9
Author: Mark Thomas 
AuthorDate: Tue Jul 23 22:34:25 2019 +0100

Align version specific tests with 8.5.x
---
 test/org/apache/jasper/compiler/TestJspConfig.java |  2 +-
 test/org/apache/jasper/compiler/TestValidator.java | 27 +++-
 test/webapp-2.2/WEB-INF/web.xml|  4 +--
 test/webapp-2.3/WEB-INF/web.xml|  4 +--
 test/webapp-2.4/WEB-INF/web.xml|  4 +--
 test/webapp-2.5/WEB-INF/web.xml|  4 +--
 .../web.xml => webapp-3.0/WEB-INF/listener.tld}| 30 --
 .../web.xml => webapp-3.0/WEB-INF/tags11.tld}  | 36 --
 .../web.xml => webapp-3.0/WEB-INF/tags12.tld}  | 36 --
 .../web.xml => webapp-3.0/WEB-INF/tags20.tld}  | 36 --
 .../web.xml => webapp-3.0/WEB-INF/tags21.tld}  | 36 --
 test/{webapp-2.5 => webapp-3.0}/WEB-INF/web.xml| 15 +
 test/{webapp => webapp-3.0}/el-as-literal.jsp  |  0
 test/{webapp => webapp-3.0}/tld-versions.jsp   |  0
 .../WEB-INF/web.xml|  4 +--
 test/webapp-fragments/WEB-INF/web.xml  |  4 +--
 test/webapp-servletsecurity/WEB-INF/web.xml|  4 +--
 test/webapp-servletsecurity2/WEB-INF/web.xml   |  4 +--
 .../src/main/webapp/WEB-INF/web.xml|  4 +--
 19 files changed, 147 insertions(+), 107 deletions(-)

diff --git a/test/org/apache/jasper/compiler/TestJspConfig.java 
b/test/org/apache/jasper/compiler/TestJspConfig.java
index 48e3833..510e5b0 100644
--- a/test/org/apache/jasper/compiler/TestJspConfig.java
+++ b/test/org/apache/jasper/compiler/TestJspConfig.java
@@ -92,7 +92,7 @@ public class TestJspConfig extends TomcatBaseTest {
 Tomcat tomcat = getTomcatInstance();
 
 File appDir =
-new File("test/webapp");
+new File("test/webapp-3.0");
 // app dir is relative to server home
 tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
 
diff --git a/test/org/apache/jasper/compiler/TestValidator.java 
b/test/org/apache/jasper/compiler/TestValidator.java
index 15ec1fc..dfdda0a 100644
--- a/test/org/apache/jasper/compiler/TestValidator.java
+++ b/test/org/apache/jasper/compiler/TestValidator.java
@@ -51,6 +51,31 @@ public class TestValidator extends TomcatBaseTest {
 }
 
 @Test
+public void testTldVersions22() throws Exception {
+Tomcat tomcat = getTomcatInstance();
+
+File appDir =
+new File("test/webapp-2.2");
+// app dir is relative to server home
+tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
+
+tomcat.start();
+
+ByteChunk res = getUrl("http://localhost:; + getPort() +
+"/test/tld-versions.jsp");
+
+String result = res.toString();
+
+Assert.assertTrue(result.indexOf("${'00-hello world'}") > 0);
+Assert.assertTrue(result.indexOf("#{'01-hello world'}") > 0);
+Assert.assertTrue(result.indexOf("${'02-hello world'}") > 0);
+Assert.assertTrue(result.indexOf("#{'03-hello world'}") > 0);
+Assert.assertTrue(result.indexOf("${'04-hello world'}") > 0);
+Assert.assertTrue(result.indexOf("#{'05-hello world'}") > 0);
+Assert.assertTrue(result.indexOf("${'06-hello world'}") > 0);
+}
+
+@Test
 public void testTldVersions23() throws Exception {
 Tomcat tomcat = getTomcatInstance();
 
@@ -130,7 +155,7 @@ public class TestValidator extends TomcatBaseTest {
 Tomcat tomcat = getTomcatInstance();
 
 File appDir =
-new File("test/webapp");
+new File("test/webapp-3.0");
 // app dir is relative to server home
 tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
 
diff --git a/test/webapp-2.2/WEB-INF/web.xml b/test/webapp-2.2/WEB-INF/web.xml
index cfcaccd..ad7a83d 100644
--- a/test/webapp-2.2/WEB-INF/web.xml
+++ b/test/webapp-2.2/WEB-INF/web.xml
@@ -1,4 +1,4 @@
-
+
 
-http://java.sun.com/xml/ns/javaee;
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
-  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
-  http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd;
-  version="3.0"
-  metadata-complete="false">
+-->http://java.sun.com/xml/ns/javaee;
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+  http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd;
+  version="2.1">
+  1.0
+  listener
+  http://tomcat.apache.org/listener
 
-  Tomcat Test Application
-  
- Used as part of the Tomcat unit tests when a full web application is
- required.
-  
-
-  
-
-
\ No newline at end of file
+  
+

[tomcat] branch 7.0.x updated: Prep for next version

2019-07-24 Thread violetagg
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/7.0.x by this push:
 new 5091d7f  Prep for next version
5091d7f is described below

commit 5091d7f7d9b2a35380e0369fc11862dd52f43601
Author: Violeta Georgieva 
AuthorDate: Wed Jul 24 16:58:59 2019 +0300

Prep for next version
---
 build.properties.default | 2 +-
 res/maven/mvn.properties.default | 2 +-
 webapps/docs/changelog.xml   | 2 ++
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/build.properties.default b/build.properties.default
index 93296a2..bfe74e2 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -25,7 +25,7 @@
 # - Version Control Flags -
 version.major=7
 version.minor=0
-version.build=96
+version.build=97
 version.patch=0
 version.suffix=-dev
 
diff --git a/res/maven/mvn.properties.default b/res/maven/mvn.properties.default
index 2c6c9de..d733cd8 100644
--- a/res/maven/mvn.properties.default
+++ b/res/maven/mvn.properties.default
@@ -35,7 +35,7 @@ 
maven.asf.release.repo.url=https://repository.apache.org/service/local/staging/d
 maven.asf.release.repo.repositoryId=apache.releases
 
 # Release version info
-maven.asf.release.deploy.version=7.0.96
+maven.asf.release.deploy.version=7.0.97
 
 #Where do we load the libraries from
 tomcat.lib.path=../../output/build/lib
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index e78b9e2..948b825 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -59,6 +59,8 @@
   They eventually become mixed with the numbered issues (i.e., numbered
   issues do not "pop up" wrt. others).
 -->
+
+
 
   
 


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



[VOTE] Release Apache Tomcat 7.0.96

2019-07-24 Thread Violeta Georgieva
The proposed Apache Tomcat 7.0.96 release is now available for voting.

For full details, see the changelog:
https://ci.apache.org/projects/tomcat/tomcat7/docs/changelog.html

It can be obtained from:
https://dist.apache.org/repos/dist/dev/tomcat/tomcat-7/v7.0.96/
The Maven staging repo is:
https://repository.apache.org/content/repositories/orgapachetomcat-1224/
The git tag is:
https://github.com/apache/tomcat/tree/7.0.96
5277b175db2e575022672856797240976ad23bcf

The proposed 7.0.96 release is:
[ ] Broken - do not release
[ ] Stable - go ahead and release as 7.0.96 Stable

Regards,
Violeta


Nexus: Staging Completed

2019-07-24 Thread Nexus Repository Manager
Message from: https://repository.apache.orgDescription:Close for voting Tomcat 7.0.96Deployer properties:"userAgent" = "maven-artifact/2.2.1 (Java 1.8.0_221; Windows 7 6.1)""userId" = "violetagg""ip" = "84.242.148.23"Details:The following artifacts have been staged/org/apache/tomcat/tomcat-juli/7.0.96/tomcat-juli-7.0.96-sources.jar.asc(SHA1: f428a7a414bab1229984468466b87ef015bc4005)/org/apache/tomcat/tomcat-juli/7.0.96/tomcat-juli-7.0.96.pom.asc(SHA1: 852e99567a387ae35f5e47271da32360fcb91252)/org/apache/tomcat/tomcat-juli/7.0.96/tomcat-juli-7.0.96.jar.asc(SHA1: 20cabbcabc8f07f059cc022b9dda95311fc5fa16)/org/apache/tomcat/tomcat-juli/7.0.96/tomcat-juli-7.0.96.jar(SHA1: 03994d33644aaa6444a19e42730d3f57488f442d)/org/apache/tomcat/tomcat-juli/7.0.96/tomcat-juli-7.0.96-sources.jar(SHA1: 7032537bddb34cc678f42a3ffb129c72f66be3b4)/org/apache/tomcat/tomcat-juli/7.0.96/tomcat-juli-7.0.96.pom(SHA1: 7552ea761dbdf21852364a61d27a4b6b3f38e6f5)/org/apache/tomcat/tomcat-util/7.0.96/tomcat-util-7.0.96.pom(SHA1: a20a160273466b1fd1914e5105f1313a507cf6bb)/org/apache/tomcat/tomcat-util/7.0.96/tomcat-util-7.0.96.jar.asc(SHA1: a2f4d0d30451c88012eeb5a53597cd328f2d)/org/apache/tomcat/tomcat-util/7.0.96/tomcat-util-7.0.96.pom.asc(SHA1: 5a44bf42d8b028d8bf8950846efe3d358ad2cdf8)/org/apache/tomcat/tomcat-util/7.0.96/tomcat-util-7.0.96-sources.jar(SHA1: beb4eda8f0e80b82c5511c9671ceb2a7cb4fbdc3)/org/apache/tomcat/tomcat-util/7.0.96/tomcat-util-7.0.96.jar(SHA1: 8e55beca056a9b0ab1ffecb0808f6b86885d92c1)/org/apache/tomcat/tomcat-util/7.0.96/tomcat-util-7.0.96-sources.jar.asc(SHA1: 933d9507c4109156e01884c06dfed8c078f93798)/org/apache/tomcat/tomcat-catalina/7.0.96/tomcat-catalina-7.0.96.pom(SHA1: cbe0df797c0587ba52d80652d302548fa445adbe)/org/apache/tomcat/tomcat-catalina/7.0.96/tomcat-catalina-7.0.96-sources.jar.asc(SHA1: 693b43d85a088c11a6e03b02c3cbe147a030d186)/org/apache/tomcat/tomcat-catalina/7.0.96/tomcat-catalina-7.0.96.pom.asc(SHA1: a62f6a1273661e55a9a0ca268af0f19124210057)/org/apache/tomcat/tomcat-catalina/7.0.96/tomcat-catalina-7.0.96.jar.asc(SHA1: 9230a6e9a40a4cd43a8123a68ecad85b8a118fc2)/org/apache/tomcat/tomcat-catalina/7.0.96/tomcat-catalina-7.0.96.jar(SHA1: 23cb3f0ba42ee86eef07129bc50e64cfb3eda413)/org/apache/tomcat/tomcat-catalina/7.0.96/tomcat-catalina-7.0.96-sources.jar(SHA1: 6c062abbc5f02cb7379d3c5e94ad6c838382adb3)/org/apache/tomcat/tomcat-catalina-ws/7.0.96/tomcat-catalina-ws-7.0.96-sources.jar(SHA1: d169fa2b5c655b67f36a682d595448b803a08499)/org/apache/tomcat/tomcat-catalina-ws/7.0.96/tomcat-catalina-ws-7.0.96-sources.jar.asc(SHA1: 7d6a679b74b6fc1ee396c4236d7154a07adbfb41)/org/apache/tomcat/tomcat-catalina-ws/7.0.96/tomcat-catalina-ws-7.0.96.jar.asc(SHA1: c4ef5189bb01c9a8fa35fc20570eb942370f)/org/apache/tomcat/tomcat-catalina-ws/7.0.96/tomcat-catalina-ws-7.0.96.pom.asc(SHA1: 712d832360f860200bec2699df97672804f5bb62)/org/apache/tomcat/tomcat-catalina-ws/7.0.96/tomcat-catalina-ws-7.0.96.jar(SHA1: f89bd5fbf1f339a635c3528e3a6d0baa40e345d8)/org/apache/tomcat/tomcat-catalina-ws/7.0.96/tomcat-catalina-ws-7.0.96.pom(SHA1: 0a2cf9b0d50edca8d113579c501a431366c1b8d6)/org/apache/tomcat/tomcat-i18n-fr/7.0.96/tomcat-i18n-fr-7.0.96.pom.asc(SHA1: a5c2be7ef9d4bbe532d94d1fe3253161ec0a5e3f)/org/apache/tomcat/tomcat-i18n-fr/7.0.96/tomcat-i18n-fr-7.0.96.jar.asc(SHA1: ae8aacc75d72df13e39c4f78c998cf1dcc2f7a03)/org/apache/tomcat/tomcat-i18n-fr/7.0.96/tomcat-i18n-fr-7.0.96.pom(SHA1: 1f023c3dbf3ca973f79dfe6a925241cdcbbea8c4)/org/apache/tomcat/tomcat-i18n-fr/7.0.96/tomcat-i18n-fr-7.0.96.jar(SHA1: 99d2432829ec877b38318d621129a8387d010406)/org/apache/tomcat/tomcat-jdbc/7.0.96/tomcat-jdbc-7.0.96.jar(SHA1: 1e73aae6faffafbbbfc0da84b63d46aa3bafb0af)/org/apache/tomcat/tomcat-jdbc/7.0.96/tomcat-jdbc-7.0.96-sources.jar.asc(SHA1: 6cdea1e52880a04c7ffb138cee254fb9e90d029e)/org/apache/tomcat/tomcat-jdbc/7.0.96/tomcat-jdbc-7.0.96-sources.jar(SHA1: d3f40c12f3c40a195b005df2af6ddee91d0dfedb)/org/apache/tomcat/tomcat-jdbc/7.0.96/tomcat-jdbc-7.0.96.pom(SHA1: c51ce199d943ecf8de97976f9b75992d2e019347)/org/apache/tomcat/tomcat-jdbc/7.0.96/tomcat-jdbc-7.0.96.pom.asc(SHA1: 25d8e5111c4d476274d57ed0e3a66b399f9ffc7d)/org/apache/tomcat/tomcat-jdbc/7.0.96/tomcat-jdbc-7.0.96.jar.asc(SHA1: c3af87acef96039226ba0183341113ec79438881)/org/apache/tomcat/embed/tomcat-embed-logging-log4j/7.0.96/tomcat-embed-logging-log4j-7.0.96.jar.asc(SHA1: 37ae0ff4eb9728c7cfd94db4473e96b9243b51b0)/org/apache/tomcat/embed/tomcat-embed-logging-log4j/7.0.96/tomcat-embed-logging-log4j-7.0.96.pom.asc(SHA1: df268672cf31fff50b8bb3fdf00a25246a1f750a)/org/apache/tomcat/embed/tomcat-embed-logging-log4j/7.0.96/tomcat-embed-logging-log4j-7.0.96-sources.jar.asc(SHA1: 11c845985203ca550eb9774c5cbd9d496d296589)/org/apache/tomcat/embed/tomcat-embed-logging-log4j/7.0.96/tomcat-embed-logging-log4j-7.0.96-sources.jar(SHA1: 57dc0fadfee43d3feec49bcfdf653b030a172e91)/org/apache/tomcat/embed/tomcat-embed-logging-log4j/7.0.96/tomcat-embed-logging-log4j-7.0.96.pom(SHA1: 

[tomcat] 02/02: Fix h2spec test suite failure. EOS in Huffman encoded string literal.

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

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

commit a9efebdeb37fdcadec7c5b9559cbc09bcff0b7c8
Author: Mark Thomas 
AuthorDate: Wed Jul 24 14:22:05 2019 +0100

Fix h2spec test suite failure. EOS in Huffman encoded string literal.

Patch by jfclere
---
 java/org/apache/coyote/http2/HPackHuffman.java   | 5 +
 java/org/apache/coyote/http2/LocalStrings.properties | 1 +
 webapps/docs/changelog.xml   | 4 
 3 files changed, 10 insertions(+)

diff --git a/java/org/apache/coyote/http2/HPackHuffman.java 
b/java/org/apache/coyote/http2/HPackHuffman.java
index 637e690..365a6f9 100644
--- a/java/org/apache/coyote/http2/HPackHuffman.java
+++ b/java/org/apache/coyote/http2/HPackHuffman.java
@@ -404,6 +404,11 @@ public class HPackHuffman {
 if ((val & HIGH_TERMINAL_BIT) == 0) {
 treePos = (val >> 16) & LOW_MASK;
 } else {
+if (eosBitCount != 0) {
+// This must be the EOS symbol which MUST be 
treated
+// as an error
+throw new 
HpackException(sm.getString("hpackhuffman.stringLiteralEOS"));
+}
 target.append((char) ((val >> 16) & LOW_MASK));
 treePos = 0;
 eosBits = true;
diff --git a/java/org/apache/coyote/http2/LocalStrings.properties 
b/java/org/apache/coyote/http2/LocalStrings.properties
index e371865..b4f9925 100644
--- a/java/org/apache/coyote/http2/LocalStrings.properties
+++ b/java/org/apache/coyote/http2/LocalStrings.properties
@@ -44,6 +44,7 @@ hpackdecoder.tableSizeUpdateNotAtStart=Any table size update 
must be sent at the
 hpackdecoder.zeroNotValidHeaderTableIndex=Zero is not a valid header table 
index
 
 hpackhuffman.huffmanEncodedHpackValueDidNotEndWithEOS=Huffman encoded value in 
HPACK headers did not end with EOS padding
+hpackhuffman.stringLiteralEOS=Huffman encoded value in HPACK headers contained 
the EOS symbol
 hpackhuffman.stringLiteralTooMuchPadding=More than 7 bits of EOS padding were 
provided at the end of an Huffman encoded string literal
 
 http2Parser.headerLimitCount=Connection [{0}], Stream [{1}], Too many headers
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 624a4e0..8416e8a 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -93,6 +93,10 @@
 63578: Improve handling of invalid requests so that 400
 responses are returned to the client rather than 500 responses. (markt)
   
+  
+Fix h2spec test suite failure. It is an error if a Huffman encoded
+string literal contains the EOS symbol. (jfclere)
+  
 
   
   


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



[tomcat] 01/02: Back-port i18n updates from master

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

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

commit d5ae396e0803a057327343a02623b171ec12eac9
Author: Mark Thomas 
AuthorDate: Wed Jul 24 14:23:22 2019 +0100

Back-port i18n updates from master
---
 java/org/apache/coyote/http2/HpackDecoder.java   | 7 ---
 java/org/apache/coyote/http2/LocalStrings.properties | 5 -
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/coyote/http2/HpackDecoder.java 
b/java/org/apache/coyote/http2/HpackDecoder.java
index 2c68573..ea88aab 100644
--- a/java/org/apache/coyote/http2/HpackDecoder.java
+++ b/java/org/apache/coyote/http2/HpackDecoder.java
@@ -155,7 +155,7 @@ public class HpackDecoder {
 return;
 }
 } else {
-throw new RuntimeException("Not yet implemented");
+throw new 
RuntimeException(sm.getString("hpackdecoder.notImplemented"));
 }
 }
 }
@@ -171,7 +171,8 @@ public class HpackDecoder {
 return false;
 }
 if (size > maxMemorySizeHard) {
-throw new HpackException();
+throw new 
HpackException(sm.getString("hpackdecoder.maxMemorySizeExceeded",
+Integer.valueOf(size), 
Integer.valueOf(maxMemorySizeHard)));
 }
 maxMemorySizeSoft = size;
 if (currentMemorySize > maxMemorySizeSoft) {
@@ -249,7 +250,7 @@ public class HpackDecoder {
 int adjustedIndex = getRealIndex(index - 
Hpack.STATIC_TABLE_LENGTH);
 Hpack.HeaderField res = headerTable[adjustedIndex];
 if (res == null) {
-throw new HpackException();
+throw new 
HpackException(sm.getString("hpackdecoder.nullHeader", Integer.valueOf(index)));
 }
 return res.name;
 }
diff --git a/java/org/apache/coyote/http2/LocalStrings.properties 
b/java/org/apache/coyote/http2/LocalStrings.properties
index 88c8970..e371865 100644
--- a/java/org/apache/coyote/http2/LocalStrings.properties
+++ b/java/org/apache/coyote/http2/LocalStrings.properties
@@ -15,7 +15,7 @@
 
 abstractStream.windowSizeDec=Connection [{0}], Stream [{1}], reduce flow 
control window by [{2}] to [{3}]
 abstractStream.windowSizeInc=Connection [{0}], Stream [{1}], increase flow 
control window by [{2}] to [{3}]
-abstractStream.windowSizeTooBig=Connection [{0}], Stream [{1}], increase in 
window size of [{2}] to [{3}] exceeded permitted maximum
+abstractStream.windowSizeTooBig=Connection [{0}], Stream [{1}], increased 
window size by [{2}] to [{3}] which exceeded permitted maximum
 
 connectionPrefaceParser.eos=Unexpected end of stream while reading opening 
client preface byte sequence. Only [{0}] bytes read.
 connectionPrefaceParser.ioError=Failed to read opening client preface byte 
sequence
@@ -37,6 +37,9 @@ hpack.invalidCharacter=The Unicode character [{0}] at code 
point [{1}] cannot be
 hpackEncoder.encodeHeader=Encoding header [{0}] with 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 must be sent at 
the start of a header block
 hpackdecoder.zeroNotValidHeaderTableIndex=Zero is not a valid header table 
index
 


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



[tomcat] branch 8.5.x updated (e8ab3a2 -> a9efebd)

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

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


from e8ab3a2  Polish. Align with master.
 new d5ae396  Back-port i18n updates from master
 new a9efebd  Fix h2spec test suite failure. EOS in Huffman encoded string 
literal.

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


Summary of changes:
 java/org/apache/coyote/http2/HPackHuffman.java   | 5 +
 java/org/apache/coyote/http2/HpackDecoder.java   | 7 ---
 java/org/apache/coyote/http2/LocalStrings.properties | 6 +-
 webapps/docs/changelog.xml   | 4 
 4 files changed, 18 insertions(+), 4 deletions(-)


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



[tomcat] branch master updated (a403dda -> ca871df)

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

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


from a403dda  Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63578
 new 2ead380  Correct key order (should be alphabetical)
 new ca871df  Fix h2spec test suite failure. EOS in Huffman encoded string 
literal.

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


Summary of changes:
 java/org/apache/coyote/http2/HPackHuffman.java   | 5 +
 java/org/apache/coyote/http2/LocalStrings.properties | 5 +++--
 webapps/docs/changelog.xml   | 4 
 3 files changed, 12 insertions(+), 2 deletions(-)


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



[tomcat] 01/02: Correct key order (should be alphabetical)

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

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

commit 2ead3806ad5568e7a2beb126b4ba700755469f07
Author: Mark Thomas 
AuthorDate: Wed Jul 24 13:56:13 2019 +0100

Correct key order (should be alphabetical)
---
 java/org/apache/coyote/http2/LocalStrings.properties | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/coyote/http2/LocalStrings.properties 
b/java/org/apache/coyote/http2/LocalStrings.properties
index 8805e98..498a217 100644
--- a/java/org/apache/coyote/http2/LocalStrings.properties
+++ b/java/org/apache/coyote/http2/LocalStrings.properties
@@ -159,11 +159,11 @@ upgradeHandler.writeHeaders=Connection [{0}], Stream [{1}]
 upgradeHandler.writePushHeaders=Connection [{0}], Stream [{1}], Pushed stream 
[{2}], EndOfStream [{3}]
 
 windowAllocationManager.dispatched=Connection [{0}], Stream [{1}], Dispatched
-windowAllocationManager.notify=Connection [{0}], Stream [{1}], Waiting type 
[{2}], Notify type [{3}]
 windowAllocationManager.notified=Connection [{0}], Stream [{1}], Notified
+windowAllocationManager.notify=Connection [{0}], Stream [{1}], Waiting type 
[{2}], Notify type [{3}]
 windowAllocationManager.waitFor.connection=Connection [{0}], Stream [{1}], 
Waiting for Connection flow control window (blocking) with timeout [{2}]
-windowAllocationManager.waitFor.stream=Connection [{0}], Stream [{1}], Waiting 
for Stream flow control window (blocking) with timeout [{2}]
 windowAllocationManager.waitFor.ise=Connection [{0}], Stream [{1}], Already 
waiting
+windowAllocationManager.waitFor.stream=Connection [{0}], Stream [{1}], Waiting 
for Stream flow control window (blocking) with timeout [{2}]
 windowAllocationManager.waitForNonBlocking.connection=Connection [{0}], Stream 
[{1}], Waiting for Connection flow control window (non-blocking)
 windowAllocationManager.waitForNonBlocking.stream=Connection [{0}], Stream 
[{1}], Waiting for Stream flow control window (non-blocking)
 


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



svn commit: r35007 [2/2] - in /dev/tomcat/tomcat-7/v7.0.96: ./ bin/ bin/embed/ bin/extras/ src/

2019-07-24 Thread violetagg
Added: dev/tomcat/tomcat-7/v7.0.96/bin/extras/tomcat-juli-adapters.jar.sha512
==
--- dev/tomcat/tomcat-7/v7.0.96/bin/extras/tomcat-juli-adapters.jar.sha512 
(added)
+++ dev/tomcat/tomcat-7/v7.0.96/bin/extras/tomcat-juli-adapters.jar.sha512 Wed 
Jul 24 13:23:09 2019
@@ -0,0 +1 @@
+3f4942bc09834495b6b004b8eadfc9194469156959536dca3f73dbc8eb82baafc8e6b54fb9195e709635f71169a7355810bb277926c62c7f215dc66887869017
 *tomcat-juli-adapters.jar
\ No newline at end of file

Added: dev/tomcat/tomcat-7/v7.0.96/bin/extras/tomcat-juli.jar
==
Binary file - no diff available.

Propchange: dev/tomcat/tomcat-7/v7.0.96/bin/extras/tomcat-juli.jar
--
svn:mime-type = application/octet-stream

Added: dev/tomcat/tomcat-7/v7.0.96/bin/extras/tomcat-juli.jar.asc
==
--- dev/tomcat/tomcat-7/v7.0.96/bin/extras/tomcat-juli.jar.asc (added)
+++ dev/tomcat/tomcat-7/v7.0.96/bin/extras/tomcat-juli.jar.asc Wed Jul 24 
13:23:09 2019
@@ -0,0 +1,16 @@
+-BEGIN PGP SIGNATURE-
+
+iQIzBAABCAAdFiEEcT2oi+UJEVNf5xb1IIsKsdYwEccFAl04VwkACgkQIIsKsdYw
+Eccmvg/+P1binPtnXJ94yzlZxxvJMuICXiF/mHryDor5b3vshIcwrk7um/uJiBmV
+n/yYN8cF7/iiEs4Fka7I8RknlZGTbjHPB+DYJCXD2kBu4xOGvmGVya0C6aknnQ4V
+e9o0jO0HX8sSKoQEX88k18/0waWiufxHZND8zM2C7k84UeSpSo6OfYqK0d6lnW/2
+NkvyDPDEFruoO7HXN6euBPNYqQu1yV+5Ym/M58NXfSZvYerhvBQ/Kd7g+fKY7r3s
+KEEk4Twa7evcdgHNBtxwq2b3wFMbzFuTPXJ5cWCaM8JFIHWfcGkmvazyx7p4lrIj
+KiMQkY+2OP0MvUKnyTqjA9tJtwMJq+pj2N37H8m2nkfdS4r36WnpefEqNypzRjal
+ZBpCxzYGHNn8YjjYU/Kg44AdC0Caq614x3VoXqimt2VVHjn6UnwQqE2xeyeVWJD7
+BUREWrHoRRLpqYv0IGINNNJDaoey0MuzvmNnZI+m5BLr7DVn0lHzpRq35uOxYAhz
+W2PqkWZ+ErsockUPGC37eovmBiSF+uQrTApfb4wPcejWnIx18AXhAepL2w+AZxNA
+KvF4s5ETXXt9ACOHSnqagu6YtDB+5PiTmDoATQ3jR7WmK8PNOrqrCtkWnkA3gfWR
+RN7wT6RuTfQEQIs8CMI3WMRw6BvoN6brP0bpmG31UpIFs6xmJyQ=
+=Fdw6
+-END PGP SIGNATURE-

Added: dev/tomcat/tomcat-7/v7.0.96/bin/extras/tomcat-juli.jar.sha512
==
--- dev/tomcat/tomcat-7/v7.0.96/bin/extras/tomcat-juli.jar.sha512 (added)
+++ dev/tomcat/tomcat-7/v7.0.96/bin/extras/tomcat-juli.jar.sha512 Wed Jul 24 
13:23:09 2019
@@ -0,0 +1 @@
+4718c2513e692196d01b7e5694160648fcd12c5da4137ac0555e2a83e03353feb488a976887b4768c2171eabb80ded53a4f4099779fd3af8f7b270b20d025f44
 *tomcat-juli.jar
\ No newline at end of file

Added: dev/tomcat/tomcat-7/v7.0.96/src/apache-tomcat-7.0.96-src.tar.gz
==
Binary file - no diff available.

Propchange: dev/tomcat/tomcat-7/v7.0.96/src/apache-tomcat-7.0.96-src.tar.gz
--
svn:mime-type = application/octet-stream

Added: dev/tomcat/tomcat-7/v7.0.96/src/apache-tomcat-7.0.96-src.tar.gz.asc
==
--- dev/tomcat/tomcat-7/v7.0.96/src/apache-tomcat-7.0.96-src.tar.gz.asc (added)
+++ dev/tomcat/tomcat-7/v7.0.96/src/apache-tomcat-7.0.96-src.tar.gz.asc Wed Jul 
24 13:23:09 2019
@@ -0,0 +1,16 @@
+-BEGIN PGP SIGNATURE-
+
+iQIzBAABCAAdFiEEcT2oi+UJEVNf5xb1IIsKsdYwEccFAl04WTwACgkQIIsKsdYw
+EcdR4xAAmQsXhsbLgreCoLOi92l6+i6cWlcMoU6AFJZEk9SqpuceR+U6q1zGdZd9
+Qs7yJbK0mcOavttBP3/fVUmVUGTH7HzUPYH+BqGAJLfbNCAGj4v1vIvSkhggPKVq
+M0ZzSc568AMFOtNjIhkRJla4feblAgDFKExcIac+eM41MGhUoceNAGXznNrYLULe
+qOHQ/1+KAhaqUEmzz/V76R4jEQfPtYTD5YTGoXla8NNpJ6H53ZrTIon9ma/WBK/t
+1YNZ7Re9uFOvWMFq0cZMpF2v2hfu16zNV7Bqmx9alkeTHR8FS7OxD9hcnJzAi0Lm
+haJSyTIFZVtJmty1JiO6tTrEguvbod1eHxZSBYUdSVQTXXgdzPYoLnyuqtXOnUUD
+Bb+drA4aLsaNMyQJaMkNJyxok49pM/xFTQO9qL/bbnuEKZddHWzTWqKCoEnz144c
+r7Trgvtb9vYm6jn46/nVXFGgS4CifF0mwXB+It1G1LhGdJ+rQTdwugynBCRj6stL
+3xvmoFVPOOlpVKQeQIxTNs049hhcn0XEmvbzR2g7H5oi4E0t47D7XnAx3MI84K3t
+KsQ82/EzDgTwC75ucGmdspwOujqfMrnB1o50OrTNwaGHt86YT4LBPVtJzpthFMMH
+O5nwP9FucvMUy/hl+0EQFqO9DjYyyJmn07mrsC7m94fpcUHubd8=
+=pQVg
+-END PGP SIGNATURE-

Added: dev/tomcat/tomcat-7/v7.0.96/src/apache-tomcat-7.0.96-src.tar.gz.sha512
==
--- dev/tomcat/tomcat-7/v7.0.96/src/apache-tomcat-7.0.96-src.tar.gz.sha512 
(added)
+++ dev/tomcat/tomcat-7/v7.0.96/src/apache-tomcat-7.0.96-src.tar.gz.sha512 Wed 
Jul 24 13:23:09 2019
@@ -0,0 +1 @@
+5797e66fb9ce558340e08d3a4ccd372d912707aabd6177318781925dd35055902a0ecc3e50e677d76b0feea547cc8fc038bb83ae5de65d28680cb4c9582f60c0
 *apache-tomcat-7.0.96-src.tar.gz
\ No newline at end of file

Added: dev/tomcat/tomcat-7/v7.0.96/src/apache-tomcat-7.0.96-src.zip
==
Binary file - no diff available.

Propchange: dev/tomcat/tomcat-7/v7.0.96/src/apache-tomcat-7.0.96-src.zip

[tomcat] 02/02: Fix h2spec test suite failure. EOS in Huffman encoded string literal.

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

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

commit ca871dff3be73dd33437907b40049eea401b01ab
Author: Mark Thomas 
AuthorDate: Wed Jul 24 14:22:05 2019 +0100

Fix h2spec test suite failure. EOS in Huffman encoded string literal.

Patch by jfclere
---
 java/org/apache/coyote/http2/HPackHuffman.java   | 5 +
 java/org/apache/coyote/http2/LocalStrings.properties | 1 +
 webapps/docs/changelog.xml   | 4 
 3 files changed, 10 insertions(+)

diff --git a/java/org/apache/coyote/http2/HPackHuffman.java 
b/java/org/apache/coyote/http2/HPackHuffman.java
index 637e690..365a6f9 100644
--- a/java/org/apache/coyote/http2/HPackHuffman.java
+++ b/java/org/apache/coyote/http2/HPackHuffman.java
@@ -404,6 +404,11 @@ public class HPackHuffman {
 if ((val & HIGH_TERMINAL_BIT) == 0) {
 treePos = (val >> 16) & LOW_MASK;
 } else {
+if (eosBitCount != 0) {
+// This must be the EOS symbol which MUST be 
treated
+// as an error
+throw new 
HpackException(sm.getString("hpackhuffman.stringLiteralEOS"));
+}
 target.append((char) ((val >> 16) & LOW_MASK));
 treePos = 0;
 eosBits = true;
diff --git a/java/org/apache/coyote/http2/LocalStrings.properties 
b/java/org/apache/coyote/http2/LocalStrings.properties
index 498a217..83afc74 100644
--- a/java/org/apache/coyote/http2/LocalStrings.properties
+++ b/java/org/apache/coyote/http2/LocalStrings.properties
@@ -44,6 +44,7 @@ hpackdecoder.tableSizeUpdateNotAtStart=Any table size update 
must be sent at the
 hpackdecoder.zeroNotValidHeaderTableIndex=Zero is not a valid header table 
index
 
 hpackhuffman.huffmanEncodedHpackValueDidNotEndWithEOS=Huffman encoded value in 
HPACK headers did not end with EOS padding
+hpackhuffman.stringLiteralEOS=Huffman encoded value in HPACK headers contained 
the EOS symbol
 hpackhuffman.stringLiteralTooMuchPadding=More than 7 bits of EOS padding were 
provided at the end of an Huffman encoded string literal
 
 http2Parser.error=Connection [{0}], Stream [{1}], Frame type [{2}], Error
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index b04ebcb..46c39fa 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -103,6 +103,10 @@
 63578: Improve handling of invalid requests so that 400
 responses are returned to the client rather than 500 responses. (markt)
   
+  
+Fix h2spec test suite failure. It is an error if a Huffman encoded
+string literal contains the EOS symbol. (jfclere)
+  
 
   
   


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



svn commit: r35007 [1/2] - in /dev/tomcat/tomcat-7/v7.0.96: ./ bin/ bin/embed/ bin/extras/ src/

2019-07-24 Thread violetagg
Author: violetagg
Date: Wed Jul 24 13:23:09 2019
New Revision: 35007

Log:
Stage Tomcat 7.0.96

Added:
dev/tomcat/tomcat-7/v7.0.96/
dev/tomcat/tomcat-7/v7.0.96/KEYS
dev/tomcat/tomcat-7/v7.0.96/README.html
dev/tomcat/tomcat-7/v7.0.96/RELEASE-NOTES
dev/tomcat/tomcat-7/v7.0.96/bin/
dev/tomcat/tomcat-7/v7.0.96/bin/README.html
dev/tomcat/tomcat-7/v7.0.96/bin/apache-tomcat-7.0.96-deployer.tar.gz   
(with props)
dev/tomcat/tomcat-7/v7.0.96/bin/apache-tomcat-7.0.96-deployer.tar.gz.asc
dev/tomcat/tomcat-7/v7.0.96/bin/apache-tomcat-7.0.96-deployer.tar.gz.sha512
dev/tomcat/tomcat-7/v7.0.96/bin/apache-tomcat-7.0.96-deployer.zip   (with 
props)
dev/tomcat/tomcat-7/v7.0.96/bin/apache-tomcat-7.0.96-deployer.zip.asc
dev/tomcat/tomcat-7/v7.0.96/bin/apache-tomcat-7.0.96-deployer.zip.sha512
dev/tomcat/tomcat-7/v7.0.96/bin/apache-tomcat-7.0.96-fulldocs.tar.gz   
(with props)
dev/tomcat/tomcat-7/v7.0.96/bin/apache-tomcat-7.0.96-fulldocs.tar.gz.asc
dev/tomcat/tomcat-7/v7.0.96/bin/apache-tomcat-7.0.96-fulldocs.tar.gz.sha512
dev/tomcat/tomcat-7/v7.0.96/bin/apache-tomcat-7.0.96-windows-x64.zip   
(with props)
dev/tomcat/tomcat-7/v7.0.96/bin/apache-tomcat-7.0.96-windows-x64.zip.asc
dev/tomcat/tomcat-7/v7.0.96/bin/apache-tomcat-7.0.96-windows-x64.zip.sha512
dev/tomcat/tomcat-7/v7.0.96/bin/apache-tomcat-7.0.96-windows-x86.zip   
(with props)
dev/tomcat/tomcat-7/v7.0.96/bin/apache-tomcat-7.0.96-windows-x86.zip.asc
dev/tomcat/tomcat-7/v7.0.96/bin/apache-tomcat-7.0.96-windows-x86.zip.sha512
dev/tomcat/tomcat-7/v7.0.96/bin/apache-tomcat-7.0.96.exe   (with props)
dev/tomcat/tomcat-7/v7.0.96/bin/apache-tomcat-7.0.96.exe.asc
dev/tomcat/tomcat-7/v7.0.96/bin/apache-tomcat-7.0.96.exe.sha512
dev/tomcat/tomcat-7/v7.0.96/bin/apache-tomcat-7.0.96.tar.gz   (with props)
dev/tomcat/tomcat-7/v7.0.96/bin/apache-tomcat-7.0.96.tar.gz.asc
dev/tomcat/tomcat-7/v7.0.96/bin/apache-tomcat-7.0.96.tar.gz.sha512
dev/tomcat/tomcat-7/v7.0.96/bin/apache-tomcat-7.0.96.zip   (with props)
dev/tomcat/tomcat-7/v7.0.96/bin/apache-tomcat-7.0.96.zip.asc
dev/tomcat/tomcat-7/v7.0.96/bin/apache-tomcat-7.0.96.zip.sha512
dev/tomcat/tomcat-7/v7.0.96/bin/embed/
dev/tomcat/tomcat-7/v7.0.96/bin/embed/apache-tomcat-7.0.96-embed.tar.gz   
(with props)
dev/tomcat/tomcat-7/v7.0.96/bin/embed/apache-tomcat-7.0.96-embed.tar.gz.asc

dev/tomcat/tomcat-7/v7.0.96/bin/embed/apache-tomcat-7.0.96-embed.tar.gz.sha512
dev/tomcat/tomcat-7/v7.0.96/bin/embed/apache-tomcat-7.0.96-embed.zip   
(with props)
dev/tomcat/tomcat-7/v7.0.96/bin/embed/apache-tomcat-7.0.96-embed.zip.asc
dev/tomcat/tomcat-7/v7.0.96/bin/embed/apache-tomcat-7.0.96-embed.zip.sha512
dev/tomcat/tomcat-7/v7.0.96/bin/extras/
dev/tomcat/tomcat-7/v7.0.96/bin/extras/catalina-jmx-remote.jar   (with 
props)
dev/tomcat/tomcat-7/v7.0.96/bin/extras/catalina-jmx-remote.jar.asc
dev/tomcat/tomcat-7/v7.0.96/bin/extras/catalina-jmx-remote.jar.sha512
dev/tomcat/tomcat-7/v7.0.96/bin/extras/catalina-ws.jar   (with props)
dev/tomcat/tomcat-7/v7.0.96/bin/extras/catalina-ws.jar.asc
dev/tomcat/tomcat-7/v7.0.96/bin/extras/catalina-ws.jar.sha512
dev/tomcat/tomcat-7/v7.0.96/bin/extras/tomcat-juli-adapters.jar   (with 
props)
dev/tomcat/tomcat-7/v7.0.96/bin/extras/tomcat-juli-adapters.jar.asc
dev/tomcat/tomcat-7/v7.0.96/bin/extras/tomcat-juli-adapters.jar.sha512
dev/tomcat/tomcat-7/v7.0.96/bin/extras/tomcat-juli.jar   (with props)
dev/tomcat/tomcat-7/v7.0.96/bin/extras/tomcat-juli.jar.asc
dev/tomcat/tomcat-7/v7.0.96/bin/extras/tomcat-juli.jar.sha512
dev/tomcat/tomcat-7/v7.0.96/src/
dev/tomcat/tomcat-7/v7.0.96/src/apache-tomcat-7.0.96-src.tar.gz   (with 
props)
dev/tomcat/tomcat-7/v7.0.96/src/apache-tomcat-7.0.96-src.tar.gz.asc
dev/tomcat/tomcat-7/v7.0.96/src/apache-tomcat-7.0.96-src.tar.gz.sha512
dev/tomcat/tomcat-7/v7.0.96/src/apache-tomcat-7.0.96-src.zip   (with props)
dev/tomcat/tomcat-7/v7.0.96/src/apache-tomcat-7.0.96-src.zip.asc
dev/tomcat/tomcat-7/v7.0.96/src/apache-tomcat-7.0.96-src.zip.sha512

Added: dev/tomcat/tomcat-7/v7.0.96/KEYS
==
--- dev/tomcat/tomcat-7/v7.0.96/KEYS (added)
+++ dev/tomcat/tomcat-7/v7.0.96/KEYS Wed Jul 24 13:23:09 2019
@@ -0,0 +1,650 @@
+This file contains the PGP keys of various Apache developers.
+Please don't use them for email unless you have to. Their main
+purpose is code signing.
+
+Apache users: pgp < KEYS
+Apache developers:
+(pgpk -ll  && pgpk -xa ) >> this file.
+  or
+(gpg --fingerprint --list-sigs 
+ && gpg --armor --export ) >> this file.
+
+Apache developers: please ensure that your key is also available via the
+PGP keyservers (such as pgpkeys.mit.edu).
+
+
+Type Bits/KeyIDDate   User ID
+pub  2048/F22C4FED 2001/07/02 Andy Armstrong 
+
+-BEGIN PGP PUBLIC KEY BLOCK-

Re: H2 protocol validation

2019-07-24 Thread Mark Thomas
On 24/07/2019 13:32, Mark Thomas wrote:
> On 24/07/2019 09:18, jean-frederic clere wrote:



>> Something like:
>> +++
>> index 637e690c65..255883fb93 100644
>> --- a/java/org/apache/coyote/http2/HPackHuffman.java
>> +++ b/java/org/apache/coyote/http2/HPackHuffman.java
>> @@ -380,7 +380,8 @@ public class HPackHuffman {
>>  int treePos = 0;
>>  boolean eosBits = true;
>>  int eosBitCount = 0;
>> -for (int i = 0; i < length; ++i) {
>> +int i = 0;
>> +for (; i < length; ++i) {
> 
> Note sure why the above is necessary.
> 
>>  byte b = data.get();
>>  int bitPos = 7;
>>  while (bitPos >= 0) {
>> @@ -406,6 +407,9 @@ public class HPackHuffman {
>>  } else {
>>  target.append((char) ((val >> 16) & LOW_MASK));
>>  treePos = 0;
>> +if (eosBitCount != 0) {
>> +throw new HpackException("Oops... JFC");
>> +}
>>  eosBits = true;
>>  }
>>  }
>> +++
>> Seems to make the test suite happy, comments?

I can reproduce the failure and can confirm that the fix is correct. My
local copy has an i18n message so I intend to commit that (with credit
to you) shortly.

Mark

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



[tomcat] tag 7.0.96 created (now 5277b17)

2019-07-24 Thread violetagg
This is an automated email from the ASF dual-hosted git repository.

violetagg pushed a change to tag 7.0.96
in repository https://gitbox.apache.org/repos/asf/tomcat.git.


  at 5277b17  (commit)
This tag includes the following new commits:

 new 5277b17  Tag 7.0.96

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



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



[tomcat] 01/01: Tag 7.0.96

2019-07-24 Thread violetagg
This is an automated email from the ASF dual-hosted git repository.

violetagg pushed a commit to tag 7.0.96
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 5277b175db2e575022672856797240976ad23bcf
Author: Violeta Georgieva 
AuthorDate: Wed Jul 24 07:34:08 2019 -0400

Tag 7.0.96
---
 build.properties.default | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build.properties.default b/build.properties.default
index 93296a2..30751ef 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -27,7 +27,7 @@ version.major=7
 version.minor=0
 version.build=96
 version.patch=0
-version.suffix=-dev
+version.suffix=
 
 # - Build control flags -
 # Note enabling validation uses Checkstyle which is LGPL licensed


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



Re: H2 protocol validation

2019-07-24 Thread Mark Thomas
On 24/07/2019 09:18, jean-frederic clere wrote:
> On 23/07/2019 11:27, Mark Thomas wrote:
>> On 23/07/2019 09:40, jean-frederic clere wrote:
>>> Hi,
>>>
>>> I have tried to run summerwind/h2spec (docker (1)) to validate tomcat
>>> master (using the apr connector and java8) and I have a bunch of errors.
>>>
>>> Does someone validate our code against another test suite?
>>>
>>> (1) https://github.com/summerwind/h2spec
>>
>> That is the one I have been using.

The last version I tested was 2.1.0. h2spec is now up to 2.3.0.

I'm re-running my tests now.

>> >From memory, there was one (maybe two?) explainable failures once Tomcat
>> was configured appropriately - mainly (only?) turning off server
>> initiated pings.



> Something like:
> +++
> index 637e690c65..255883fb93 100644
> --- a/java/org/apache/coyote/http2/HPackHuffman.java
> +++ b/java/org/apache/coyote/http2/HPackHuffman.java
> @@ -380,7 +380,8 @@ public class HPackHuffman {
>  int treePos = 0;
>  boolean eosBits = true;
>  int eosBitCount = 0;
> -for (int i = 0; i < length; ++i) {
> +int i = 0;
> +for (; i < length; ++i) {

Note sure why the above is necessary.

>  byte b = data.get();
>  int bitPos = 7;
>  while (bitPos >= 0) {
> @@ -406,6 +407,9 @@ public class HPackHuffman {
>  } else {
>  target.append((char) ((val >> 16) & LOW_MASK));
>  treePos = 0;
> +if (eosBitCount != 0) {
> +throw new HpackException("Oops... JFC");
> +}
>  eosBits = true;
>  }
>  }
> +++
> Seems to make the test suite happy, commments?

Making the test suite happy in 90% of the battle. Once I can reproduce
this I was planning on looking at the spec to confirm the above fix.
Should be able to do that in the next few hours.

Mark

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



[CONF] Apache Tomcat > ReleaseProcess

2019-07-24 Thread Violeta Georgieva Georgieva (Confluence)
Title: Message Title



 
 
 
There's 1 new edit on this page 
 
 
 
 
 
 
  
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ReleaseProcess 
 
 
  
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
Violeta Georgieva Georgieva edited this page 
 
 
  
 
 

 
 
 
  
 
 
  
 
 
  
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Here's what changed: 
 
 
 
 
 
 
 
 
 
 
 ... 
 
Perform an git clone and switch to the correct branch 
 
git clone https://github.com/apache/tomcat c:\releases\ /c/releases/asf-tomcat 
 cd /c:cd /releases\/asf-tomcat 
git checkout 7.0.x 
git pull 
  
Edit build.properties and change the line version.suffix=-dev to version.suffix=  
Edit webapps\docs\changelog.xml and remove rtext="in development" from the latest version 
Commit these changes 
 
git commit -a -m "Tag 7.0.94" 
git tag 7.0.94 
git push origin 7.0.94 
  
Check the diff mailed to the dev list 
 ...  
 
 
  
 
 
  
 
 
  
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Go to page history 
 
 
  
 
 
  
 
 
  
 
 
  
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
View page 
 
 
  
 
 
  
 
 
  
 
 
  
 
 
 
 
 
 
 
 
 
 
Stop watching space
• 
 
 
 
 
 
 
Manage notifications 
 
 
 
 
 
 
 
 
 
 
  
 
 
This message was sent by Atlassian Confluence 6.15.2  
 
 
  
 
 
 
 
 
 
 
 
 




[Bug 63602] The temporary upload location is not valid

2019-07-24 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63602

--- Comment #2 from Rainer Jung  ---
Same here, /tmp is for temporary stuff not a good work directory for a long
running application. Never liked that Spring decision. At least they should
choose a place that works well with typical uses of it in the underlying OS.
Regularly purging /tmp (not only during reboot) is a brutal practice but not an
uncommon one. IMHO Spring needs to fix it.

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



[tomcat] branch 8.5.x updated: Polish. Align with master.

2019-07-24 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 e8ab3a2  Polish. Align with master.
e8ab3a2 is described below

commit e8ab3a28b2b176c85a696a02e50d741172bfc6b4
Author: Mark Thomas 
AuthorDate: Wed Jul 24 10:19:37 2019 +0100

Polish. Align with master.
---
 test/org/apache/catalina/startup/SimpleHttpClient.java | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/test/org/apache/catalina/startup/SimpleHttpClient.java 
b/test/org/apache/catalina/startup/SimpleHttpClient.java
index 1d6e81e..1020985 100644
--- a/test/org/apache/catalina/startup/SimpleHttpClient.java
+++ b/test/org/apache/catalina/startup/SimpleHttpClient.java
@@ -34,6 +34,8 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Locale;
 
+import org.junit.Assert;
+
 /**
  * Simple client for unit testing. It isn't robust, it isn't secure and
  * should not be used as the basis for production code. Its only purpose
@@ -302,7 +304,8 @@ public abstract class SimpleHttpClient {
 if (wantBody) {
 if (useContentLength && (contentLength > -1)) {
 char[] body = new char[contentLength];
-reader.read(body);
+int read = reader.read(body);
+Assert.assertEquals(contentLength, read);
 builder.append(body);
 }
 else {


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



[tomcat] branch 8.5.x updated: Polish. Align with master. Clean-up and additional i18n strings.

2019-07-24 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 22e708d  Polish. Align with master. Clean-up and additional i18n 
strings.
22e708d is described below

commit 22e708dc5731c4b9c8f2d370bddfe60a61bb9306
Author: Mark Thomas 
AuthorDate: Wed Jul 24 10:04:37 2019 +0100

Polish. Align with master. Clean-up and additional i18n strings.
---
 .../apache/catalina/connector/CoyoteAdapter.java   | 12 ++--
 .../catalina/connector/LocalStrings.properties |  1 +
 .../catalina/connector/LocalStrings_es.properties  | 16 +++--
 .../catalina/connector/LocalStrings_fr.properties  | 68 +++---
 .../catalina/connector/LocalStrings_ja.properties  | 53 +
 .../catalina/connector/LocalStrings_ru.properties  | 17 ++
 6 files changed, 148 insertions(+), 19 deletions(-)

diff --git a/java/org/apache/catalina/connector/CoyoteAdapter.java 
b/java/org/apache/catalina/connector/CoyoteAdapter.java
index 5274eee..8ad166f 100644
--- a/java/org/apache/catalina/connector/CoyoteAdapter.java
+++ b/java/org/apache/catalina/connector/CoyoteAdapter.java
@@ -133,7 +133,7 @@ public class CoyoteAdapter implements Adapter {
 Response response = (Response) res.getNote(ADAPTER_NOTES);
 
 if (request == null) {
-throw new IllegalStateException("Dispatch may only happen on an 
existing request.");
+throw new 
IllegalStateException(sm.getString("coyoteAdapter.nullRequest"));
 }
 
 boolean success = true;
@@ -882,9 +882,9 @@ public class CoyoteAdapter implements Adapter {
 }
 
 // Set the authorization type
-String authtype = req.getAuthType().toString();
-if (authtype != null) {
-request.setAuthType(authtype);
+String authType = req.getAuthType().toString();
+if (authType != null) {
+request.setAuthType(authType);
 }
 }
 
@@ -1314,8 +1314,6 @@ public class CoyoteAdapter implements Adapter {
  * @param len Length
  */
 protected static void copyBytes(byte[] b, int dest, int src, int len) {
-for (int pos = 0; pos < len; pos++) {
-b[pos + dest] = b[pos + src];
-}
+System.arraycopy(b, src, b, dest, len);
 }
 }
diff --git a/java/org/apache/catalina/connector/LocalStrings.properties 
b/java/org/apache/catalina/connector/LocalStrings.properties
index a494015..c6ea9a4 100644
--- a/java/org/apache/catalina/connector/LocalStrings.properties
+++ b/java/org/apache/catalina/connector/LocalStrings.properties
@@ -20,6 +20,7 @@ coyoteAdapter.authorize=Authorizing user [{0}] using 
Tomcat''s Realm
 coyoteAdapter.checkRecycled.request=Encountered a non-recycled request and 
recycled it forcedly.
 coyoteAdapter.checkRecycled.response=Encountered a non-recycled response and 
recycled it forcedly.
 coyoteAdapter.debug=The variable [{0}] has value [{1}]
+coyoteAdapter.nullRequest=An asynchronous dispatch may only happen on an 
existing request
 coyoteAdapter.parsePathParam=Unable to parse the path parameters using 
encoding [{0}]. The path parameters in the URL will be ignored.
 
 coyoteConnector.invalidEncoding=The encoding [{0}] is not recognised by the 
JRE. The Connector will continue to use [{1}]
diff --git a/java/org/apache/catalina/connector/LocalStrings_es.properties 
b/java/org/apache/catalina/connector/LocalStrings_es.properties
index 877c92e..f0dca0b 100644
--- a/java/org/apache/catalina/connector/LocalStrings_es.properties
+++ b/java/org/apache/catalina/connector/LocalStrings_es.properties
@@ -14,9 +14,12 @@
 # limitations under the License.
 
 coyoteAdapter.accesslogFail=Excepción al intentar añadir una entrada al 
historial de acceso
+coyoteAdapter.checkRecycled.response=Se encontró una respuesta no reciclable y 
se crecicló a la fuerza
 coyoteAdapter.debug=La variable [{0}] tiene el valor [{1}]
 coyoteAdapter.parsePathParam=No puedo analizar los parámetros de ruta mediante 
la codificación [{0}]. Se ignoran los parámetros de la URL.
 
+coyoteConnector.invalidEncoding=La codificación  [{0}]  no esta reconocida por 
 JRE. El conector continuará usando [{1}]\n
+coyoteConnector.invalidPort=El conector no puede inciar debido a que el valor 
del puerto especificado [{0}] no es válido
 coyoteConnector.parseBodyMethodNoTrace=El método TRACE NO DEBE DE incluir una 
entidad (vea RFC 2616 Sección 9.6)
 coyoteConnector.protocolHandlerDestroyFailed=Falló la destrucción del 
manejador de protocolo
 coyoteConnector.protocolHandlerInitializationFailed=Falló la inicialización 
del manejador de protocolo
@@ -24,16 +27,23 @@ coyoteConnector.protocolHandlerInstantiationFailed=Falló la 
instanciación del
 coyoteConnector.protocolHandlerPauseFailed=Ha fallado la pausa del manejador 
de protocolo
 coyoteConnector.protocolHandlerResumeFailed=Ha fallado el 

[tomcat] 01/04: Correct version info in x-powered-by

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

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

commit 095d6a07a152ec6fb97c09f6aecce390fc9755ee
Author: Mark Thomas 
AuthorDate: Wed Jul 24 09:47:23 2019 +0100

Correct version info in x-powered-by
---
 java/org/apache/catalina/connector/CoyoteAdapter.java | 2 +-
 webapps/docs/changelog.xml| 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/connector/CoyoteAdapter.java 
b/java/org/apache/catalina/connector/CoyoteAdapter.java
index 0743382..869abd9 100644
--- a/java/org/apache/catalina/connector/CoyoteAdapter.java
+++ b/java/org/apache/catalina/connector/CoyoteAdapter.java
@@ -67,7 +67,7 @@ public class CoyoteAdapter implements Adapter {
 
 // -- Constants
 
-private static final String POWERED_BY = "Servlet/4.0 JSP/2.3 " +
+private static final String POWERED_BY = "Servlet/3.1 JSP/2.3 " +
 "(" + ServerInfo.getServerInfo() + " Java/" +
 System.getProperty("java.vm.vendor") + "/" +
 System.getProperty("java.runtime.version") + ")";
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index e0e1241..ef559dc 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -65,6 +65,9 @@
 reject them with a 400 response rather than triggering an internal 
error
 that results in a 500 response. (markt)
   
+  
+Correct version information in X-Powered-By header. 
(markt)
+  
  
   
   


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



[tomcat] branch 8.5.x updated (5a91db5 -> 52c9e41)

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

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


from 5a91db5  Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63579
 new 095d6a0  Correct version info in x-powered-by
 new 8b4d060  Polish. Align with master.
 new a05ab62  Refactor to reduce duplication
 new 52c9e41  Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63578

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


Summary of changes:
 build.xml  | 14 ++--
 .../apache/catalina/connector/CoyoteAdapter.java   | 13 +++-
 java/org/apache/coyote/http11/Http11Processor.java | 82 +++---
 .../apache/coyote/http11/LocalStrings.properties   |  4 +-
 .../connector/TestCoyoteAdapterRequestFuzzing.java | 63 +
 .../apache/catalina/startup/SimpleHttpClient.java  | 12 +++-
 test/org/apache/coyote/http2/TestHttp2Limits.java  |  9 ++-
 ...sterThreadScopedHolder.java => TesterData.java} | 25 ---
 webapps/docs/changelog.xml |  7 ++
 9 files changed, 149 insertions(+), 80 deletions(-)
 copy test/org/apache/tomcat/unittest/{TesterThreadScopedHolder.java => 
TesterData.java} (64%)


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



[tomcat] 04/04: Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63578

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

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

commit 52c9e419cb6121df819fc181994eaa014491c89d
Author: Mark Thomas 
AuthorDate: Tue Jul 23 19:07:19 2019 +0100

Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63578

Various fixes to return 400 responses rather than 500 responses when the
provided request is invalid.
---
 .../apache/catalina/connector/CoyoteAdapter.java   | 11 +++-
 java/org/apache/coyote/http11/Http11Processor.java | 35 
 .../apache/coyote/http11/LocalStrings.properties   |  4 +-
 .../connector/TestCoyoteAdapterRequestFuzzing.java | 63 +-
 .../apache/catalina/startup/SimpleHttpClient.java  | 12 -
 test/org/apache/coyote/http2/TestHttp2Limits.java  |  9 ++--
 test/org/apache/tomcat/unittest/TesterData.java| 37 +
 webapps/docs/changelog.xml |  4 ++
 8 files changed, 145 insertions(+), 30 deletions(-)

diff --git a/java/org/apache/catalina/connector/CoyoteAdapter.java 
b/java/org/apache/catalina/connector/CoyoteAdapter.java
index 869abd9..5274eee 100644
--- a/java/org/apache/catalina/connector/CoyoteAdapter.java
+++ b/java/org/apache/catalina/connector/CoyoteAdapter.java
@@ -727,7 +727,16 @@ public class CoyoteAdapter implements Adapter {
 }
 
 // Look for session ID in cookies and SSL session
-parseSessionCookiesId(request);
+try {
+parseSessionCookiesId(request);
+} catch (IllegalArgumentException e) {
+// Too many cookies
+if (!response.isError()) {
+response.setError();
+response.sendError(400);
+}
+return true;
+}
 parseSessionSslId(request);
 
 sessionID = request.getRequestedSessionId();
diff --git a/java/org/apache/coyote/http11/Http11Processor.java 
b/java/org/apache/coyote/http11/Http11Processor.java
index f22f913..1658c95 100644
--- a/java/org/apache/coyote/http11/Http11Processor.java
+++ b/java/org/apache/coyote/http11/Http11Processor.java
@@ -739,8 +739,10 @@ public class Http11Processor extends AbstractProcessor {
 Enumeration connectionValues = 
request.getMimeHeaders().values("Connection");
 boolean foundUpgrade = false;
 while (connectionValues.hasMoreElements() && !foundUpgrade) {
-foundUpgrade = connectionValues.nextElement().toLowerCase(
-Locale.ENGLISH).contains("upgrade");
+String connectionValue = connectionValues.nextElement();
+if (connectionValue != null) {
+foundUpgrade = 
connectionValue.toLowerCase(Locale.ENGLISH).contains("upgrade");
+}
 }
 
 if (foundUpgrade) {
@@ -985,7 +987,7 @@ public class Http11Processor extends AbstractProcessor {
 
 // Check connection header
 MessageBytes connectionValueMB = 
headers.getValue(Constants.CONNECTION);
-if (connectionValueMB != null) {
+if (connectionValueMB != null && !connectionValueMB.isNull()) {
 ByteChunk connectionValueBC = connectionValueMB.getByteChunk();
 if (findBytes(connectionValueBC, Constants.CLOSE_BYTES) != -1) {
 keepAlive = false;
@@ -997,7 +999,7 @@ public class Http11Processor extends AbstractProcessor {
 
 if (http11) {
 MessageBytes expectMB = headers.getValue("expect");
-if (expectMB != null) {
+if (expectMB != null && !expectMB.isNull()) {
 if (expectMB.indexOfIgnoreCase("100-continue", 0) != -1) {
 inputBuffer.setSwallowInput(false);
 request.setExpectation(true);
@@ -1013,7 +1015,7 @@ public class Http11Processor extends AbstractProcessor {
 MessageBytes userAgentValueMB = headers.getValue("user-agent");
 // Check in the restricted list, and adjust the http11
 // and keepAlive flags accordingly
-if(userAgentValueMB != null) {
+if(userAgentValueMB != null && !userAgentValueMB.isNull()) {
 String userAgentValue = userAgentValueMB.toString();
 if (restrictedUserAgents != null &&
 
restrictedUserAgents.matcher(userAgentValue).matches()) {
@@ -1114,8 +1116,16 @@ public class Http11Processor extends AbstractProcessor {
 } else {
 // Not HTTP/1.1 - no Host header so generate one since
 // Tomcat internals assume it is set
-hostValueMB = headers.setValue("host");
-hostValueMB.setBytes(uriB, uriBCStart + pos, slashPos - 
pos);
+try {
+hostValueMB = headers.setValue("host");
+

[tomcat] 02/04: Polish. Align with master.

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

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

commit 8b4d060703b07bf8a0dc65b596395ce68dea9fd5
Author: Mark Thomas 
AuthorDate: Wed Jul 24 09:47:40 2019 +0100

Polish. Align with master.
---
 build.xml | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/build.xml b/build.xml
index ead9834..64c06b5 100644
--- a/build.xml
+++ b/build.xml
@@ -1476,7 +1476,7 @@
 errorproperty="test.result.error"
 failureproperty="test.result.failure"
 haltonfailure="${test.haltonfailure}"
-threads="${test.threads}" >
+threads="${test.threads}">
 
 
 
@@ -1538,12 +1538,12 @@
   
 
 
-
-  
-  
-
-  
-
+  
+
+
+  
+
+  
 
   
 


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



[tomcat] 03/04: Refactor to reduce duplication

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

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

commit a05ab622216813d95ae38e21752f3b4dc54037cb
Author: Mark Thomas 
AuthorDate: Tue Jul 23 13:55:31 2019 +0100

Refactor to reduce duplication
---
 java/org/apache/coyote/http11/Http11Processor.java | 47 +++---
 1 file changed, 15 insertions(+), 32 deletions(-)

diff --git a/java/org/apache/coyote/http11/Http11Processor.java 
b/java/org/apache/coyote/http11/Http11Processor.java
index 4fec1ca..f22f913 100644
--- a/java/org/apache/coyote/http11/Http11Processor.java
+++ b/java/org/apache/coyote/http11/Http11Processor.java
@@ -1030,20 +1030,10 @@ public class Http11Processor extends AbstractProcessor {
 hostValueMB = headers.getUniqueValue("host");
 } catch (IllegalArgumentException iae) {
 // Multiple Host headers are not permitted
-// 400 - Bad request
-response.setStatus(400);
-setErrorState(ErrorState.CLOSE_CLEAN, null);
-if (log.isDebugEnabled()) {
-
log.debug(sm.getString("http11processor.request.multipleHosts"));
-}
+badRequest("http11processor.request.multipleHosts");
 }
 if (http11 && hostValueMB == null) {
-// 400 - Bad request
-response.setStatus(400);
-setErrorState(ErrorState.CLOSE_CLEAN, null);
-if (log.isDebugEnabled()) {
-
log.debug(sm.getString("http11processor.request.noHostHeader"));
-}
+badRequest("http11processor.request.noHostHeader");
 }
 
 // Check for an absolute-URI less the query string which has already
@@ -1091,11 +1081,7 @@ public class Http11Processor extends AbstractProcessor {
 // Strictly there needs to be a check for valid %nn
 // encoding here but skip it since it will never be
 // decoded because the userinfo is ignored
-response.setStatus(400);
-setErrorState(ErrorState.CLOSE_CLEAN, null);
-if (log.isDebugEnabled()) {
-
log.debug(sm.getString("http11processor.request.invalidUserInfo"));
-}
+
badRequest("http11processor.request.invalidUserInfo");
 break;
 }
 }
@@ -1121,11 +1107,7 @@ public class Http11Processor extends AbstractProcessor {
 // The requirements of RFC 7230 are being
 // applied. If the host header and the request
 // line do not agree, trigger a 400 response.
-response.setStatus(400);
-setErrorState(ErrorState.CLOSE_CLEAN, null);
-if (log.isDebugEnabled()) {
-
log.debug(sm.getString("http11processor.request.inconsistentHosts"));
-}
+
badRequest("http11processor.request.inconsistentHosts");
 }
 }
 }
@@ -1136,11 +1118,7 @@ public class Http11Processor extends AbstractProcessor {
 hostValueMB.setBytes(uriB, uriBCStart + pos, slashPos - 
pos);
 }
 } else {
-response.setStatus(400);
-setErrorState(ErrorState.CLOSE_CLEAN, null);
-if (log.isDebugEnabled()) {
-
log.debug(sm.getString("http11processor.request.invalidScheme"));
-}
+badRequest("http11processor.request.invalidScheme");
 }
 }
 
@@ -1148,11 +1126,7 @@ public class Http11Processor extends AbstractProcessor {
 // the point of decoding.
 for (int i = uriBC.getStart(); i < uriBC.getEnd(); i++) {
 if (!httpParser.isAbsolutePathRelaxed(uriB[i])) {
-response.setStatus(400);
-setErrorState(ErrorState.CLOSE_CLEAN, null);
-if (log.isDebugEnabled()) {
-
log.debug(sm.getString("http11processor.request.invalidUri"));
-}
+badRequest("http11processor.request.invalidUri");
 break;
 }
 }
@@ -1214,6 +1188,15 @@ public class Http11Processor extends AbstractProcessor {
 }
 
 
+private void badRequest(String errorKey) {
+response.setStatus(400);
+setErrorState(ErrorState.CLOSE_CLEAN, null);
+if (log.isDebugEnabled()) {
+log.debug(sm.getString(errorKey));
+}
+}
+
+
 /**
  * When committing the response, we have to validate the set of 

Re: [Bug 61180] Change log level of sessionIdGeneratorBase.createRandom to warn rather than info

2019-07-24 Thread Mark Thomas
On 24/07/2019 07:58, bugzi...@apache.org wrote:
> https://bz.apache.org/bugzilla/show_bug.cgi?id=61180
> 
> --- Comment #8 from Oscar Dawson  ---

Another idiot blocked and the spam deleted.

FYI, Infra have made some config changes that should reduce the level of
spam.

Mark

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



Re: H2 protocol validation

2019-07-24 Thread jean-frederic clere
On 23/07/2019 11:27, Mark Thomas wrote:
> On 23/07/2019 09:40, jean-frederic clere wrote:
>> Hi,
>>
>> I have tried to run summerwind/h2spec (docker (1)) to validate tomcat
>> master (using the apr connector and java8) and I have a bunch of errors.
>>
>> Does someone validate our code against another test suite?
>>
>> (1) https://github.com/summerwind/h2spec
> 
> That is the one I have been using.
> 
>>From memory, there was one (maybe two?) explainable failures once Tomcat
> was configured appropriately - mainly (only?) turning off server
> initiated pings.
> 
> Mark
> 
> 
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
> 
> 

Something like:
+++
index 637e690c65..255883fb93 100644
--- a/java/org/apache/coyote/http2/HPackHuffman.java
+++ b/java/org/apache/coyote/http2/HPackHuffman.java
@@ -380,7 +380,8 @@ public class HPackHuffman {
 int treePos = 0;
 boolean eosBits = true;
 int eosBitCount = 0;
-for (int i = 0; i < length; ++i) {
+int i = 0;
+for (; i < length; ++i) {
 byte b = data.get();
 int bitPos = 7;
 while (bitPos >= 0) {
@@ -406,6 +407,9 @@ public class HPackHuffman {
 } else {
 target.append((char) ((val >> 16) & LOW_MASK));
 treePos = 0;
+if (eosBitCount != 0) {
+throw new HpackException("Oops... JFC");
+}
 eosBits = true;
 }
 }
+++
Seems to make the test suite happy, commments?

-- 
Cheers

Jean-Frederic

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



Problem with tomcat.apache.org site

2019-07-24 Thread Бобков , Антон
Hello!

Could you advise me to solve with the situation:
when I try to use link
http://tomcat.apache.org/migration-6.html#Tomcat_6.0.x_configuration_file_differences
I
get 404 error after press 'View differences', and when I try to use svn
diff command, I get 'not found' error, too. I can understand that tomcat
6.x is an archive version, but your current site have the functionality,
which doesn’t work!

Бобков Антон
Ведущий специалист отдела внедрения
раб: +7 (499) 681-0636 доб.6538
моб: +7 (926) 757-0112
*ALTU*
*ERA*


Re: Tag Tomcat 7

2019-07-24 Thread Violeta Georgieva
На ср, 24.07.2019 г. в 0:05 ч. Mark Thomas  написа:
>
> On 23/07/2019 21:22, Violeta Georgieva wrote:
> > Hi Mark,
> >
> > На вт, 23.07.2019 г. в 23:17 ч. Mark Thomas  > > написа:
> >>
> >> On 23/07/2019 21:06, Violeta Georgieva wrote:
> >> > Hi,
> >> >
> >> > I'm planning to tag Tomcat 7 tomorrow morning (CET).
> >> > If you want to include something please reply here.
> >>
> >> I'll make sure that the CI is running cleanly with the recent enabling
> >> of parallel test execution before then.
> >
> > If you need more time I can postpone it.
>
> Thanks but all looks good. It runs without errors locally me for on OSX
> and the CI run completed without errors as well - and in only 14 mins :)
>
> All good to go from my PoV.


Thanks


[Bug 63602] The temporary upload location is not valid

2019-07-24 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63602

--- Comment #1 from Mark Thomas  ---
I am minded to reject this enhancement request and recommend that Spring Cloud
uses a more appropriate location for Tomcat's work directory.

-- 
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 61180] Change log level of sessionIdGeneratorBase.createRandom to warn rather than info

2019-07-24 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=61180

--- Comment #8 from Oscar Dawson  ---
ID generator base is the generation of ID and the component by various kind of
situational forming. The log level succession is also the same criteria in the
link of https://www.thebestessayservice.com/dissertationwriting.html with the
dissertion writing help of the fortune company.

-- 
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: H2 protocol validation

2019-07-24 Thread jean-frederic clere
On 23/07/2019 16:54, Mark Thomas wrote:
> On 23/07/2019 15:34, jean-frederic clere wrote:
>> On 23/07/2019 11:27, Mark Thomas wrote:
>>> On 23/07/2019 09:40, jean-frederic clere wrote:
 Hi,

 I have tried to run summerwind/h2spec (docker (1)) to validate tomcat
 master (using the apr connector and java8) and I have a bunch of errors.

 Does someone validate our code against another test suite?

 (1) https://github.com/summerwind/h2spec
>>>
>>> That is the one I have been using.
>>>
>>> >From memory, there was one (maybe two?) explainable failures once Tomcat
>>> was configured appropriately - mainly (only?) turning off server
>>> initiated pings.
>>
>> OK in ./java/org/apache/coyote/http2/Http2Protocol.java:
>>
>> > initiatePingDisabled="true" />
>>
>> There is still one failure:
>> +++
>> HPACK: Header Compression for HTTP/2
>>   5. Primitive Type Representations
>> 5.2. String Literal Representation
>>   × 3: Sends a Huffman-encoded string literal representation
>> containing the EOS symbol
>> -> The endpoint MUST treat this as a decoding error.
>>Expected: GOAWAY Frame (Error Code: COMPRESSION_ERROR)
>>  Connection closed
>>  Actual: DATA Frame (length:3000, flags:0x01, stream_id:1)
> 
> Hmm. That looks like a valid failure. I wonder why it wasn't fixed.
> Maybe a new test? Maybe it is a false positive?

I don't have the failure in httpd and the test was fixed recently in the
testsuite therefore we should handle it as a new test.

> 
>> +++
>>
>> BTW: Shouldn't we document it in
>> http://tomcat.apache.org/tomcat-9.0-doc/config/http2.html?
> 
> It is deliberately undocumented as its only purpose is to pass these tests.
> 
> My preference remains not to document it. It we do document it, we
> should make clear its purpose and that, in normal usage, it should not
> be used.
> 
> Mark
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
> 
> 


-- 
Cheers

Jean-Frederic

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