[Bug 56399] Re-factor request/response recycling so Coyote and Catalina objects are recycled simultaneously

2020-10-15 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=56399

Mark Thomas  changed:

   What|Removed |Added

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

--- Comment #9 from Mark Thomas  ---
This has been fixed to the extent it can given the current architecture.

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



Backport to Java 11 for JDK-8240871

2020-10-15 Thread Mark Thomas
Hi Rory,

How do I find out what the plans are for back-porting this TLS 1.3 fix
to Java 11?

https://bugs.openjdk.java.net/browse/JDK-8240871

If there are no plans to backport, how do I put in a request for one?

Thanks,

Mark

-
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: Weak eTag should be weak

2020-10-15 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


The following commit(s) were added to refs/heads/7.0.x by this push:
 new 4c7447e  Weak eTag should be weak
4c7447e is described below

commit 4c7447e8aa1aba7deac2bbc57c7894779034bdef
Author: Mark Thomas 
AuthorDate: Thu Oct 15 19:16:52 2020 +0100

Weak eTag should be weak
---
 .../org/apache/catalina/servlets/TestDefaultServletIfMatchRequests.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/test/org/apache/catalina/servlets/TestDefaultServletIfMatchRequests.java 
b/test/org/apache/catalina/servlets/TestDefaultServletIfMatchRequests.java
index 5c580ab..6b98921 100644
--- a/test/org/apache/catalina/servlets/TestDefaultServletIfMatchRequests.java
+++ b/test/org/apache/catalina/servlets/TestDefaultServletIfMatchRequests.java
@@ -58,7 +58,7 @@ public class TestDefaultServletIfMatchRequests extends 
TomcatBaseTest {
 resourceETagWeak = "W/" + resourceETagStrong;
 
 String otherETagStrong = "\"123456789\"";
-String otherETagWeak = "\"123456789\"";
+String otherETagWeak = "W/\"123456789\"";
 
 List parameterSets = new ArrayList();
 


-
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 (ac33061 -> b85b00d)

2020-10-15 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 ac33061  Add a test for connectionUploadTimeout/disableUploadTimeout
 new 3afb422  Fix formatting
 new b85b00d  Weak eTag should be weak

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/catalina/servlets/DefaultServlet.java   | 2 +-
 .../org/apache/catalina/servlets/TestDefaultServletIfMatchRequests.java | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


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



[tomcat] 02/02: Weak eTag should be weak

2020-10-15 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 b85b00d461e4dab8655df3c2466aebb1369ed9f7
Author: Mark Thomas 
AuthorDate: Thu Oct 15 17:29:15 2020 +0100

Weak eTag should be weak
---
 .../org/apache/catalina/servlets/TestDefaultServletIfMatchRequests.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/test/org/apache/catalina/servlets/TestDefaultServletIfMatchRequests.java 
b/test/org/apache/catalina/servlets/TestDefaultServletIfMatchRequests.java
index b514882..0e6665e 100644
--- a/test/org/apache/catalina/servlets/TestDefaultServletIfMatchRequests.java
+++ b/test/org/apache/catalina/servlets/TestDefaultServletIfMatchRequests.java
@@ -58,7 +58,7 @@ public class TestDefaultServletIfMatchRequests extends 
TomcatBaseTest {
 resourceETagWeak = "W/" + resourceETagStrong;
 
 String otherETagStrong = "\"123456789\"";
-String otherETagWeak = "\"123456789\"";
+String otherETagWeak = "W/\"123456789\"";
 
 List parameterSets = new ArrayList<>();
 


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



[tomcat] 01/02: Fix formatting

2020-10-15 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 3afb422f70a8b37724efc6aa864b6387c9d5e673
Author: Mark Thomas 
AuthorDate: Thu Oct 15 16:10:40 2020 +0100

Fix formatting
---
 java/org/apache/catalina/servlets/DefaultServlet.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/servlets/DefaultServlet.java 
b/java/org/apache/catalina/servlets/DefaultServlet.java
index 5562bb6..bd72e21 100644
--- a/java/org/apache/catalina/servlets/DefaultServlet.java
+++ b/java/org/apache/catalina/servlets/DefaultServlet.java
@@ -1499,7 +1499,7 @@ public class DefaultServlet extends HttpServlet {
 // If the timestamp of the entity the client got differs from
 // the last modification date of the entity, the entire entity
 // is returned.
-if (Math.abs(lastModified  -headerValueTime) > 1000) {
+if (Math.abs(lastModified - headerValueTime) > 1000) {
 return FULL;
 }
 }


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



[tomcat] 02/02: Weak eTag should be weak

2020-10-15 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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

commit 41d6f3dc23b8c1b67a4b74226cdc768202b6e62c
Author: Mark Thomas 
AuthorDate: Thu Oct 15 17:29:15 2020 +0100

Weak eTag should be weak
---
 .../org/apache/catalina/servlets/TestDefaultServletIfMatchRequests.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/test/org/apache/catalina/servlets/TestDefaultServletIfMatchRequests.java 
b/test/org/apache/catalina/servlets/TestDefaultServletIfMatchRequests.java
index b514882..0e6665e 100644
--- a/test/org/apache/catalina/servlets/TestDefaultServletIfMatchRequests.java
+++ b/test/org/apache/catalina/servlets/TestDefaultServletIfMatchRequests.java
@@ -58,7 +58,7 @@ public class TestDefaultServletIfMatchRequests extends 
TomcatBaseTest {
 resourceETagWeak = "W/" + resourceETagStrong;
 
 String otherETagStrong = "\"123456789\"";
-String otherETagWeak = "\"123456789\"";
+String otherETagWeak = "W/\"123456789\"";
 
 List parameterSets = new ArrayList<>();
 


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



[tomcat] 01/02: Fix formatting

2020-10-15 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 31d9213ee15b6b54933cc9b72c763d546f09905c
Author: Mark Thomas 
AuthorDate: Thu Oct 15 16:10:40 2020 +0100

Fix formatting
---
 java/org/apache/catalina/servlets/DefaultServlet.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/servlets/DefaultServlet.java 
b/java/org/apache/catalina/servlets/DefaultServlet.java
index 86d77d0..57a33d0 100644
--- a/java/org/apache/catalina/servlets/DefaultServlet.java
+++ b/java/org/apache/catalina/servlets/DefaultServlet.java
@@ -1513,7 +1513,7 @@ public class DefaultServlet extends HttpServlet {
 // If the timestamp of the entity the client got differs from
 // the last modification date of the entity, the entire entity
 // is returned.
-if (Math.abs(lastModified  -headerValueTime) > 1000) {
+if (Math.abs(lastModified - headerValueTime) > 1000) {
 return FULL;
 }
 }


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



[tomcat] branch 9.0.x updated (8cf6e7f -> 41d6f3d)

2020-10-15 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


from 8cf6e7f  Add a test for connectionUploadTimeout/disableUploadTimeout
 new 13992d2  Fix formatting
 new 41d6f3d  Weak eTag should be weak

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/catalina/servlets/DefaultServlet.java   | 2 +-
 .../org/apache/catalina/servlets/TestDefaultServletIfMatchRequests.java | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


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



[tomcat] 01/02: Fix formatting

2020-10-15 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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

commit 13992d24f60252ebb4c4edeb9aedb535d1ddf807
Author: Mark Thomas 
AuthorDate: Thu Oct 15 16:10:40 2020 +0100

Fix formatting
---
 java/org/apache/catalina/servlets/DefaultServlet.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/servlets/DefaultServlet.java 
b/java/org/apache/catalina/servlets/DefaultServlet.java
index c3be79b..2aca1b2 100644
--- a/java/org/apache/catalina/servlets/DefaultServlet.java
+++ b/java/org/apache/catalina/servlets/DefaultServlet.java
@@ -1492,7 +1492,7 @@ public class DefaultServlet extends HttpServlet {
 // If the timestamp of the entity the client got differs from
 // the last modification date of the entity, the entire entity
 // is returned.
-if (Math.abs(lastModified  -headerValueTime) > 1000) {
+if (Math.abs(lastModified - headerValueTime) > 1000) {
 return FULL;
 }
 }


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



[tomcat] 02/02: Weak eTag should be weak

2020-10-15 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 4b334d8326914dbfce4cd34515b053e0601d0a49
Author: Mark Thomas 
AuthorDate: Thu Oct 15 17:29:15 2020 +0100

Weak eTag should be weak
---
 .../org/apache/catalina/servlets/TestDefaultServletIfMatchRequests.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/test/org/apache/catalina/servlets/TestDefaultServletIfMatchRequests.java 
b/test/org/apache/catalina/servlets/TestDefaultServletIfMatchRequests.java
index b514882..0e6665e 100644
--- a/test/org/apache/catalina/servlets/TestDefaultServletIfMatchRequests.java
+++ b/test/org/apache/catalina/servlets/TestDefaultServletIfMatchRequests.java
@@ -58,7 +58,7 @@ public class TestDefaultServletIfMatchRequests extends 
TomcatBaseTest {
 resourceETagWeak = "W/" + resourceETagStrong;
 
 String otherETagStrong = "\"123456789\"";
-String otherETagWeak = "\"123456789\"";
+String otherETagWeak = "W/\"123456789\"";
 
 List parameterSets = new ArrayList<>();
 


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



[tomcat] branch master updated (55de48c -> 4b334d8)

2020-10-15 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 55de48c  Add a test for connectionUploadTimeout/disableUploadTimeout
 new 31d9213  Fix formatting
 new 4b334d8  Weak eTag should be weak

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/catalina/servlets/DefaultServlet.java   | 2 +-
 .../org/apache/catalina/servlets/TestDefaultServletIfMatchRequests.java | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


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



Re: [tomcat] branch master updated: Use SVG logo for a more modern and consistent look

2020-10-15 Thread Christopher Schultz
Igal,

On 10/10/20 16:08, isa...@apache.org wrote:
> This is an automated email from the ASF dual-hosted git repository.
> 
> isapir 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 466d1a5  Use SVG logo for a more modern and consistent look
> 466d1a5 is described below
> 
> commit 466d1a5a281973e8a12721f0fe4b4c72cc4fa07d
> Author: Igal Sapir 
> AuthorDate: Sat Oct 10 13:07:56 2020 -0700
> 
> Use SVG logo for a more modern and consistent look
> 
> Also removed unused images and obsolete CSS styles
> ---
>  webapps/ROOT/index.jsp|   3 +--
>  webapps/ROOT/tomcat-power.gif | Bin 2376 -> 0 bytes
>  webapps/ROOT/tomcat.css   |   9 ++---
>  webapps/ROOT/tomcat.gif   | Bin 2066 -> 0 bytes
>  webapps/ROOT/tomcat.png   | Bin 5103 -> 0 bytes
>  5 files changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/webapps/ROOT/index.jsp b/webapps/ROOT/index.jsp
> index 1d3d46d..5149594 100644
> --- a/webapps/ROOT/index.jsp
> +++ b/webapps/ROOT/index.jsp
> @@ -28,7 +28,6 @@ request.setAttribute("tomcatExamplesUrl", "/examples/");
>  
>  <%=request.getServletContext().getServerInfo() %>
>  
> -
>  
>  
>  
> @@ -52,7 +51,7 @@ request.setAttribute("tomcatExamplesUrl", "/examples/");
>  If you're seeing this, you've successfully installed 
> Tomcat. Congratulations!
>  
>  
> -
> +

If you want a bealt, suspenders, and girdle apprroach to make sure this
works on NCSA Mosaic, you can do this:


  
  


I'm not sure of a spec-compliant way to specify the "alt text" for a
.

-chris

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



Re: [DISCUSS] Deprecate and remove RealmBase#stripRealmForGss

2020-10-15 Thread Michael Osipov

Am 2020-10-13 um 21:08 schrieb Michael Osipov:

Am 2020-10-13 um 12:32 schrieb Mark Thomas:

On 13/10/2020 10:48, Michael Osipov wrote:

Folks,

I'd like to propose to get rid of that config option in 10 and deprecate
in previous versions for the following reasons:

* It suffers from abstraction: It assumes that the GSS name is always
email style w/o checking its OID
* The realm part, if any, is an integeral part of the principal. Much
like with an email address' domain. You wouldn't stip here too, would 
you?

* It is a surprise for clients having the princippal mutilated by
default. I trip over and over again this when I set up
UserDatabaseRealms for testing purposes I wonder why
michae...@example.com does not work.
* In a multi realm environment, it is perfectly fine and valid to have
user1@REALMA and user1@REALMB. These are distinct principals, but
treated by RealmBase equally, this has implications.
* Finally, when doing cert-based auth in an AD envinronment, is it
pretty common to extract the msUPN name from the cert's SAN which is
almost always email address (enteprise principal) which would end up in
michael.osipov, but where is the rest?!

Thoughts?


No objections to changing the default to false in 10.0.x but I think
removal/deprecation is a step too far.


OK


Not everyone uses the full u...@bigco.com format as the "primary key" in
their internal user database. I see lots of variation depending on which
system is viewed as the source of truth to which other systems are
synchronised.


So you will never be able to satisfy all, why try?


We have X509UsernameRetriever for certificate authentication. That came
out of bug 52500 where the aim was to support a wide variety of formats.
The root of that requirement was essentially the same - integration with
a variety of systems where the user name could be in in a range of
formats. The mapping of that format to an X509 cert just added another
layer of complexity.


I don't think that this compares (well( because a certificate is a 
complex object explicitly containing SAN which contain wellknown forms 
for an entity whereas a GSS name is merely a string with an identifier 
for its format. Your argumentation could also be applied to an LDAP 
bind. Active Directory, for instance, accepts a various amounts of input 
formats for the same entity, yet we don't provide a logic to normalize 
them in the JNDI Realm. That seems to be unfair to me.

It lacks a bit of consistency.


If there was user demand for it (I haven't seen any) I'd support a
similar interface for SPNEGO. With such an interface in place,
deprecation and removal of stripRealmForGss would make sense.


See above.


What we basically miss is a Java counterpart of GSS-API's gss_localname().

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



[Bug 55160] NIO connectionUploadTimeout can't work

2020-10-15 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=55160

Mark Thomas  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from Mark Thomas  ---
Re-fixed in 7.0.x for 7.0.107 onwards.

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



[Bug 64816] Headers 'If-Modified-Since' header causes 400 in 8.5.58

2020-10-15 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64816

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WORKSFORME

--- Comment #2 from Mark Thomas  ---
This works for me without any problems which is what I would expect since the
provided header values are valid.

You might want to use the users list to explore what is going on here.

If you still see this issue then please provide the simplest possible test case
that reproduces this issue with the latest 8.5.x release (or 9.0.x or 10.0.x).
For the error described it should be possible to recreate this with just a HTTP
request to the default Tomcat install so the test case would look something
like:

Make this request:

GET /tomcat.css HTTP/1.1
Host: localhost:8080
If-Modified-Since: Wed, 07 Oct 2020 01:31:56 GMT
If-None-Match: W/"10912-1602034316000"

-- 
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] 01/02: Add a test for connectionUploadTimeout/disableUploadTimeout

2020-10-15 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 09dec729ced9fe8cf1d7245b56189825134bb850
Author: Mark Thomas 
AuthorDate: Thu Oct 15 15:21:53 2020 +0100

Add a test for connectionUploadTimeout/disableUploadTimeout
---
 .../org/apache/catalina/startup/TesterServlet.java | 17 +
 .../coyote/http11/TestAbstractHttp11Processor.java | 88 ++
 2 files changed, 105 insertions(+)

diff --git a/test/org/apache/catalina/startup/TesterServlet.java 
b/test/org/apache/catalina/startup/TesterServlet.java
index 324d3f4..59851c9 100644
--- a/test/org/apache/catalina/startup/TesterServlet.java
+++ b/test/org/apache/catalina/startup/TesterServlet.java
@@ -28,6 +28,19 @@ public class TesterServlet extends HttpServlet {
 
 private static final long serialVersionUID = 1L;
 
+private final boolean explicitClose;
+
+
+public TesterServlet() {
+this(false);
+}
+
+
+public TesterServlet(boolean explicitClose) {
+this.explicitClose = explicitClose;
+}
+
+
 @Override
 protected void doGet(HttpServletRequest req, HttpServletResponse resp)
 throws ServletException, IOException {
@@ -35,5 +48,9 @@ public class TesterServlet extends HttpServlet {
 resp.setContentType("text/plain");
 PrintWriter out = resp.getWriter();
 out.print("OK");
+
+if (explicitClose) {
+resp.setHeader("Connection", "close");
+}
 }
 }
diff --git a/test/org/apache/coyote/http11/TestAbstractHttp11Processor.java 
b/test/org/apache/coyote/http11/TestAbstractHttp11Processor.java
index 0d9f0ed..2ff32f3 100644
--- a/test/org/apache/coyote/http11/TestAbstractHttp11Processor.java
+++ b/test/org/apache/coyote/http11/TestAbstractHttp11Processor.java
@@ -48,6 +48,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.deploy.SecurityCollection;
 import org.apache.catalina.deploy.SecurityConstraint;
 import org.apache.catalina.startup.SimpleHttpClient;
@@ -1627,4 +1628,91 @@ public class TestAbstractHttp11Processor extends 
TomcatBaseTest {
 out.print(" and request.getServerPort() is " + 
req.getServerPort());
 }
 }
+
+
+@Test
+public void testSlowUploadTimeoutWithLongerUploadTimeout() throws 
Exception {
+doTestSlowUploadTimeout(true);
+}
+
+
+@Test
+public void testSlowUploadTimeoutWithoutLongerUploadTimeout() throws 
Exception {
+doTestSlowUploadTimeout(false);
+}
+
+
+private void doTestSlowUploadTimeout(boolean useLongerUploadTimeout) 
throws Exception {
+Tomcat tomcat = getTomcatInstance();
+Connector connector = tomcat.getConnector();
+
+int connectionTimeout = ((Integer) 
connector.getProperty("connectionTimeout")).intValue();
+
+// These factors should make the differences large enough that the CI
+// tests pass consistently. If not, may need to reduce 
connectionTimeout
+// and increase delay and connectionUploadTimeout
+int delay = connectionTimeout * 2;
+int connectionUploadTimeout = connectionTimeout * 4;
+
+if (useLongerUploadTimeout) {
+connector.setProperty("connectionUploadTimeout", "" + 
connectionUploadTimeout);
+connector.setProperty("disableUploadTimeout", "false");
+}
+
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
+
+// Add servlet
+Tomcat.addServlet(ctx, "TesterServlet", new 
SwallowBodyTesterServlet());
+ctx.addServletMapping("/foo", "TesterServlet");
+
+tomcat.start();
+
+String request =
+"POST /foo HTTP/1.1" + SimpleHttpClient.CRLF +
+"Host: localhost:" + getPort() + SimpleHttpClient.CRLF +
+"Content-Length: 10" + SimpleHttpClient.CRLF +
+ SimpleHttpClient.CRLF;
+
+Client client = new Client(tomcat.getConnector().getLocalPort());
+client.setRequest(new String[] {request, "XX"});
+client.setRequestPause(delay);
+
+client.connect();
+client.processRequest();
+
+if (useLongerUploadTimeout) {
+// Expected response is a 200 response.
+Assert.assertTrue(client.isResponse200());
+Assert.assertEquals("OK", client.getResponseBody());
+} else {
+// Different failure modes with different connectors
+Assert.assertFalse(client.isResponse200());
+}
+}
+
+
+private static class SwallowBodyTesterServlet extends TesterServlet {
+
+private static final long serialVersionUID = 1L;
+
+public SwallowBodyTesterServlet() {
+super(true);
+}
+
+@Override
+protected void doPost(H

[tomcat] branch 7.0.x updated (8cd6c13 -> 129a5d6)

2020-10-15 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 8cd6c13  Fix typo
 new 09dec72  Add a test for connectionUploadTimeout/disableUploadTimeout
 new 129a5d6  Re-fix BZ 55160

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:
 .../apache/coyote/http11/Http11NioProcessor.java   |  2 +-
 .../org/apache/catalina/startup/TesterServlet.java | 17 +
 .../coyote/http11/TestAbstractHttp11Processor.java | 88 ++
 webapps/docs/changelog.xml |  4 +
 4 files changed, 110 insertions(+), 1 deletion(-)


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



[tomcat] 02/02: Re-fix BZ 55160

2020-10-15 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 129a5d631f5e06228053e1ce18be7917d012fdeb
Author: Mark Thomas 
AuthorDate: Thu Oct 15 17:18:23 2020 +0100

Re-fix BZ 55160

All NIO timeouts should be set on the SocketWrapper, not the underlying
socket.
---
 java/org/apache/coyote/http11/Http11NioProcessor.java | 2 +-
 webapps/docs/changelog.xml| 4 
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/coyote/http11/Http11NioProcessor.java 
b/java/org/apache/coyote/http11/Http11NioProcessor.java
index 8cc5648..4d81f1b 100644
--- a/java/org/apache/coyote/http11/Http11NioProcessor.java
+++ b/java/org/apache/coyote/http11/Http11NioProcessor.java
@@ -251,7 +251,7 @@ public class Http11NioProcessor extends 
AbstractHttp11Processor {
 
 @Override
 protected void setSocketTimeout(int timeout) throws IOException {
-
socketWrapper.getSocket().getIOChannel().socket().setSoTimeout(timeout);
+socketWrapper.setTimeout(timeout);
 }
 
 
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index e20a9f8..97e1263 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -97,6 +97,10 @@
 and the encoded solidus was preceeded by other %nn encoded characters.
 Based on a pull request by willmeck. (markt)
   
+  
+55160: Re-fix this bug after the original fix was reverted 
by
+a separate fix to timeouts in 7.0.81. (markt)
+  
 
   
   


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



[Bug 55160] NIO connectionUploadTimeout can't work

2020-10-15 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=55160

--- Comment #3 from Mark Thomas  ---
Confirmed (with a unit test) that this is currently broken for NIO on 7.0.x.
Later versions are 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



Re: [tomcat] branch 8.5.x updated: Always retry on a new connection, even when pooling

2020-10-15 Thread Michael Osipov

Am 2020-10-15 um 16:48 schrieb Rémy Maucherat:

On Thu, Oct 15, 2020 at 2:31 PM Michael Osipov <1983-01...@gmx.net> wrote:


On Wed, Oct 14, 2020 at 6:32 PM Michael Osipov 

wrote:



Am 2020-10-14 um 12:32 schrieb R=C3=A9my Maucherat:

On Tue, Oct 13, 2020 at 8:27 PM Michael Osipov 

wrote:



Am 2020-10-13 um 16:05 schrieb r...@apache.org:

This is an automated email from the ASF dual-hosted git repository.

remm 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 883600b  Always retry on a new connection, even when

pooli=

ng

883600b is described below

commit 883600b8a77c0be93b3a8dc2404e8d1110970ee7
Author: remm 
AuthorDate: Tue Oct 13 14:19:54 2020 +0200

   Always retry on a new connection, even when pooling

   This keeps the same very simple design as for the single

connection

   scenario, for now.
---
java/org/apache/catalina/realm/JNDIRealm.java | 22

+++---

webapps/docs/changelog.xml|  5 +
2 files changed, 24 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/catalina/realm/JNDIRealm.java

b/java/org/apache/catalina/realm/JNDIRealm.java

index 72087ab..98007f7 100644
--- a/java/org/apache/catalina/realm/JNDIRealm.java
+++ b/java/org/apache/catalina/realm/JNDIRealm.java
@@ -1311,7 +1311,7 @@ public class JNDIRealm extends RealmBase {
close(connection);

// open a new directory context.
-connection =3D get();
+connection =3D get(true);

// Try the authentication again.
principal =3D authenticate(connection, username,

credentials);

@@ -2389,12 +2389,28 @@ public class JNDIRealm extends RealmBase {
 * @exception NamingException if a directory server error

occu=

rs

 */
protected JNDIConnection get() throws NamingException {
+return get(false);
+}
+
+/**
+ * Open (if necessary) and return a connection to the

configured

+ * directory server for this Realm.
+ * @param create when pooling, this forces creation of a new

connection,

+ *   for example after an error
+ * @return the connection
+ * @exception NamingException if a directory server error

occurs

+ */
+protected JNDIConnection get(boolean create) throws

NamingException

{

JNDIConnection connection =3D null;
// Use the pool if available, otherwise use the single

connection

if (connectionPool !=3D null) {
-connection =3D connectionPool.pop();
-if (connection =3D=3D null) {
+if (create) {
connection =3D create();
+} else {
+connection =3D connectionPool.pop();
+if (connection =3D=3D null) {
+connection =3D create();
+}
}
} else {
singleConnectionLock.lock();


That suitable and simple approach.



If you have the code for adding a max idle check on hand and tested,

yo=

u

should add it IMO, it will be more efficient.


I will need to give this a couple more weeks of testing. This is what I
have observed today:

2020-10-14T16:01:47.039 147.54.155.198 w99sezx0... "GET

/x2tc-proxy-bln/rest/info/targetSystem HTTP/1.1" 200 8 92132


20609 2020-10-14T16:00:14 FEIN [https-openssl-apr-8444-exec-166]

net.sf.michaelo.tomcat.realm.ActiveDirectoryRealm.acquire Acquiring
directory server connection from pool

20610 2020-10-14T16:00:14 FEIN [https-openssl-apr-8444-exec-166]

net.sf.michaelo.tomcat.realm.ActiveDirectoryRealm.acquire Directory

serve=

r

connection from pool exceeds max idle time, closing it

20611 2020-10-14T16:00:14 FEIN [https-openssl-apr-8444-exec-166]

net.sf.michaelo.tomcat.realm.ActiveDirectoryRealm.close Closing

directory

server connection

20612 2020-10-14T16:00:14 FEIN [https-openssl-apr-8444-exec-166]

net.sf.michaelo.tomcat.realm.ActiveDirectoryRealm.open Opening new
directory server connection

20613 2020-10-14T16:01:47 FEIN [https-openssl-apr-8444-exec-166]

net.sf.michaelo.tomcat.realm.ActiveDirectoryRealm.getUser Searching for
username 'w99sezx0' in base ...

As you can see it took 90 seconds to server the request because the
connection has expired and close took way too long. In average the
request takes:

2020-10-14T13:57:06.730 10.81.50.232 osipovmi@... "GET

/x2tc-proxy-bln/rest/info/targetSystem HTTP/1.1" 200 8 70

when the connection is healthy.



Ok, so there's some real incentive to avoid reusing a connection that was
idle for too long.


I made further analysis. I was partially wrong about my statement. The
cause
for the 90 s was a faulty KDC which did not respond in time for a service
ticket. Java Kerberos does 3 retries with 30 s timeout. I have set to 1
retry
and 1000 ms wait until the next KDC will be tr

[tomcat] branch 8.5.x updated: Add a test for connectionUploadTimeout/disableUploadTimeout

2020-10-15 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 ac33061  Add a test for connectionUploadTimeout/disableUploadTimeout
ac33061 is described below

commit ac33061a27693ab7082b506321161d9bb9996c7e
Author: Mark Thomas 
AuthorDate: Thu Oct 15 15:21:53 2020 +0100

Add a test for connectionUploadTimeout/disableUploadTimeout
---
 .../apache/coyote/http11/TestHttp11Processor.java  | 88 ++
 1 file changed, 88 insertions(+)

diff --git a/test/org/apache/coyote/http11/TestHttp11Processor.java 
b/test/org/apache/coyote/http11/TestHttp11Processor.java
index 58fc3b2..0e42302 100644
--- a/test/org/apache/coyote/http11/TestHttp11Processor.java
+++ b/test/org/apache/coyote/http11/TestHttp11Processor.java
@@ -51,6 +51,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.TesterServlet;
 import org.apache.catalina.startup.Tomcat;
@@ -1692,4 +1693,91 @@ public class TestHttp11Processor extends TomcatBaseTest {
 out.print(" and request.getServerPort() is " + 
req.getServerPort());
 }
 }
+
+
+@Test
+public void testSlowUploadTimeoutWithLongerUploadTimeout() throws 
Exception {
+doTestSlowUploadTimeout(true);
+}
+
+
+@Test
+public void testSlowUploadTimeoutWithoutLongerUploadTimeout() throws 
Exception {
+doTestSlowUploadTimeout(false);
+}
+
+
+private void doTestSlowUploadTimeout(boolean useLongerUploadTimeout) 
throws Exception {
+Tomcat tomcat = getTomcatInstance();
+Connector connector = tomcat.getConnector();
+
+int connectionTimeout = ((Integer) 
connector.getProperty("connectionTimeout")).intValue();
+
+// These factors should make the differences large enough that the CI
+// tests pass consistently. If not, may need to reduce 
connectionTimeout
+// and increase delay and connectionUploadTimeout
+int delay = connectionTimeout * 2;
+int connectionUploadTimeout = connectionTimeout * 4;
+
+if (useLongerUploadTimeout) {
+connector.setProperty("connectionUploadTimeout", "" + 
connectionUploadTimeout);
+connector.setProperty("disableUploadTimeout", "false");
+}
+
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
+
+// Add servlet
+Tomcat.addServlet(ctx, "TesterServlet", new 
SwallowBodyTesterServlet());
+ctx.addServletMappingDecoded("/foo", "TesterServlet");
+
+tomcat.start();
+
+String request =
+"POST /foo HTTP/1.1" + SimpleHttpClient.CRLF +
+"Host: localhost:" + getPort() + SimpleHttpClient.CRLF +
+"Content-Length: 10" + SimpleHttpClient.CRLF +
+ SimpleHttpClient.CRLF;
+
+Client client = new Client(tomcat.getConnector().getLocalPort());
+client.setRequest(new String[] {request, "XX"});
+client.setRequestPause(delay);
+
+client.connect();
+client.processRequest();
+
+if (useLongerUploadTimeout) {
+// Expected response is a 200 response.
+Assert.assertTrue(client.isResponse200());
+Assert.assertEquals("OK", client.getResponseBody());
+} else {
+// Different failure modes with different connectors
+Assert.assertFalse(client.isResponse200());
+}
+}
+
+
+private static class SwallowBodyTesterServlet extends TesterServlet {
+
+private static final long serialVersionUID = 1L;
+
+public SwallowBodyTesterServlet() {
+super(true);
+}
+
+@Override
+protected void doPost(HttpServletRequest req, HttpServletResponse resp)
+throws ServletException, IOException {
+
+// Swallow the body
+byte[] buf = new byte[1024];
+InputStream is = req.getInputStream();
+while (is.read(buf) > 0) {
+// Loop
+}
+
+// Standard response
+doGet(req, resp);
+}
+}
 }


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



[Bug 64816] Headers 'If-Modified-Since' header causes 400 in 8.5.58

2020-10-15 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64816

--- Comment #1 from Mark Thomas  ---
To save others having to work through a 80KB zip archive for a few bytes, the
headers in question are:

If-Modified-Since: Wed, 07 Oct 2020 01:31:56 GMT
If-None-Match: W/"10912-1602034316000"

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



[tomcat] branch 9.0.x updated: Add a test for connectionUploadTimeout/disableUploadTimeout

2020-10-15 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 8cf6e7f  Add a test for connectionUploadTimeout/disableUploadTimeout
8cf6e7f is described below

commit 8cf6e7ff2769810a3271539648b966bba57f6105
Author: Mark Thomas 
AuthorDate: Thu Oct 15 15:21:53 2020 +0100

Add a test for connectionUploadTimeout/disableUploadTimeout
---
 .../apache/coyote/http11/TestHttp11Processor.java  | 88 ++
 1 file changed, 88 insertions(+)

diff --git a/test/org/apache/coyote/http11/TestHttp11Processor.java 
b/test/org/apache/coyote/http11/TestHttp11Processor.java
index 59b3457..e9013dd 100644
--- a/test/org/apache/coyote/http11/TestHttp11Processor.java
+++ b/test/org/apache/coyote/http11/TestHttp11Processor.java
@@ -50,6 +50,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.TesterServlet;
 import org.apache.catalina.startup.Tomcat;
@@ -1676,4 +1677,91 @@ public class TestHttp11Processor extends TomcatBaseTest {
 out.print(" and request.getServerPort() is " + 
req.getServerPort());
 }
 }
+
+
+@Test
+public void testSlowUploadTimeoutWithLongerUploadTimeout() throws 
Exception {
+doTestSlowUploadTimeout(true);
+}
+
+
+@Test
+public void testSlowUploadTimeoutWithoutLongerUploadTimeout() throws 
Exception {
+doTestSlowUploadTimeout(false);
+}
+
+
+private void doTestSlowUploadTimeout(boolean useLongerUploadTimeout) 
throws Exception {
+Tomcat tomcat = getTomcatInstance();
+Connector connector = tomcat.getConnector();
+
+int connectionTimeout = ((Integer) 
connector.getProperty("connectionTimeout")).intValue();
+
+// These factors should make the differences large enough that the CI
+// tests pass consistently. If not, may need to reduce 
connectionTimeout
+// and increase delay and connectionUploadTimeout
+int delay = connectionTimeout * 2;
+int connectionUploadTimeout = connectionTimeout * 4;
+
+if (useLongerUploadTimeout) {
+connector.setProperty("connectionUploadTimeout", "" + 
connectionUploadTimeout);
+connector.setProperty("disableUploadTimeout", "false");
+}
+
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
+
+// Add servlet
+Tomcat.addServlet(ctx, "TesterServlet", new 
SwallowBodyTesterServlet());
+ctx.addServletMappingDecoded("/foo", "TesterServlet");
+
+tomcat.start();
+
+String request =
+"POST /foo HTTP/1.1" + SimpleHttpClient.CRLF +
+"Host: localhost:" + getPort() + SimpleHttpClient.CRLF +
+"Content-Length: 10" + SimpleHttpClient.CRLF +
+ SimpleHttpClient.CRLF;
+
+Client client = new Client(tomcat.getConnector().getLocalPort());
+client.setRequest(new String[] {request, "XX"});
+client.setRequestPause(delay);
+
+client.connect();
+client.processRequest();
+
+if (useLongerUploadTimeout) {
+// Expected response is a 200 response.
+Assert.assertTrue(client.isResponse200());
+Assert.assertEquals("OK", client.getResponseBody());
+} else {
+// Different failure modes with different connectors
+Assert.assertFalse(client.isResponse200());
+}
+}
+
+
+private static class SwallowBodyTesterServlet extends TesterServlet {
+
+private static final long serialVersionUID = 1L;
+
+public SwallowBodyTesterServlet() {
+super(true);
+}
+
+@Override
+protected void doPost(HttpServletRequest req, HttpServletResponse resp)
+throws ServletException, IOException {
+
+// Swallow the body
+byte[] buf = new byte[1024];
+InputStream is = req.getInputStream();
+while (is.read(buf) > 0) {
+// Loop
+}
+
+// Standard response
+doGet(req, resp);
+}
+}
 }


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



Re: Re: [tomcat] branch 8.5.x updated: Always retry on a new connection, even when pooling

2020-10-15 Thread Rémy Maucherat
On Thu, Oct 15, 2020 at 2:31 PM Michael Osipov <1983-01...@gmx.net> wrote:

> > On Wed, Oct 14, 2020 at 6:32 PM Michael Osipov 
> wrote:
> >
> > > Am 2020-10-14 um 12:32 schrieb R=C3=A9my Maucherat:
> > > > On Tue, Oct 13, 2020 at 8:27 PM Michael Osipov 
> > > wrote:
> > > >
> > > >> Am 2020-10-13 um 16:05 schrieb r...@apache.org:
> > > >>> This is an automated email from the ASF dual-hosted git repository.
> > > >>>
> > > >>> remm 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 883600b  Always retry on a new connection, even when
> pooli=
> > ng
> > > >>> 883600b is described below
> > > >>>
> > > >>> commit 883600b8a77c0be93b3a8dc2404e8d1110970ee7
> > > >>> Author: remm 
> > > >>> AuthorDate: Tue Oct 13 14:19:54 2020 +0200
> > > >>>
> > > >>>   Always retry on a new connection, even when pooling
> > > >>>
> > > >>>   This keeps the same very simple design as for the single
> > > connection
> > > >>>   scenario, for now.
> > > >>> ---
> > > >>>java/org/apache/catalina/realm/JNDIRealm.java | 22
> > > >> +++---
> > > >>>webapps/docs/changelog.xml|  5 +
> > > >>>2 files changed, 24 insertions(+), 3 deletions(-)
> > > >>>
> > > >>> diff --git a/java/org/apache/catalina/realm/JNDIRealm.java
> > > >> b/java/org/apache/catalina/realm/JNDIRealm.java
> > > >>> index 72087ab..98007f7 100644
> > > >>> --- a/java/org/apache/catalina/realm/JNDIRealm.java
> > > >>> +++ b/java/org/apache/catalina/realm/JNDIRealm.java
> > > >>> @@ -1311,7 +1311,7 @@ public class JNDIRealm extends RealmBase {
> > > >>>close(connection);
> > > >>>
> > > >>>// open a new directory context.
> > > >>> -connection =3D get();
> > > >>> +connection =3D get(true);
> > > >>>
> > > >>>// Try the authentication again.
> > > >>>principal =3D authenticate(connection, username,
> > > >> credentials);
> > > >>> @@ -2389,12 +2389,28 @@ public class JNDIRealm extends RealmBase {
> > > >>> * @exception NamingException if a directory server error
> occu=
> > rs
> > > >>> */
> > > >>>protected JNDIConnection get() throws NamingException {
> > > >>> +return get(false);
> > > >>> +}
> > > >>> +
> > > >>> +/**
> > > >>> + * Open (if necessary) and return a connection to the
> configured
> > > >>> + * directory server for this Realm.
> > > >>> + * @param create when pooling, this forces creation of a new
> > > >> connection,
> > > >>> + *   for example after an error
> > > >>> + * @return the connection
> > > >>> + * @exception NamingException if a directory server error
> occurs
> > > >>> + */
> > > >>> +protected JNDIConnection get(boolean create) throws
> > > NamingException
> > > >> {
> > > >>>JNDIConnection connection =3D null;
> > > >>>// Use the pool if available, otherwise use the single
> > > >> connection
> > > >>>if (connectionPool !=3D null) {
> > > >>> -connection =3D connectionPool.pop();
> > > >>> -if (connection =3D=3D null) {
> > > >>> +if (create) {
> > > >>>connection =3D create();
> > > >>> +} else {
> > > >>> +connection =3D connectionPool.pop();
> > > >>> +if (connection =3D=3D null) {
> > > >>> +connection =3D create();
> > > >>> +}
> > > >>>}
> > > >>>} else {
> > > >>>singleConnectionLock.lock();
> > > >>
> > > >> That suitable and simple approach.
> > > >>
> > > >
> > > > If you have the code for adding a max idle check on hand and tested,
> yo=
> > u
> > > > should add it IMO, it will be more efficient.
> > >
> > > I will need to give this a couple more weeks of testing. This is what I
> > > have observed today:
> > > > 2020-10-14T16:01:47.039 147.54.155.198 w99sezx0... "GET
> > > /x2tc-proxy-bln/rest/info/targetSystem HTTP/1.1" 200 8 92132
> > > >
> > > > 20609 2020-10-14T16:00:14 FEIN [https-openssl-apr-8444-exec-166]
> > > net.sf.michaelo.tomcat.realm.ActiveDirectoryRealm.acquire Acquiring
> > > directory server connection from pool
> > > > 20610 2020-10-14T16:00:14 FEIN [https-openssl-apr-8444-exec-166]
> > > net.sf.michaelo.tomcat.realm.ActiveDirectoryRealm.acquire Directory
> serve=
> > r
> > > connection from pool exceeds max idle time, closing it
> > > > 20611 2020-10-14T16:00:14 FEIN [https-openssl-apr-8444-exec-166]
> > > net.sf.michaelo.tomcat.realm.ActiveDirectoryRealm.close Closing
> directory
> > > server connection
> > > > 20612 2020-10-14T16:00:14 FEIN [https-openssl-apr-8444-exec-166]
> > > net.sf.michaelo.tomcat.realm.ActiveDirectoryRealm.open Opening new
> > > directory server connection

[Bug 64816] New: Headers 'If-Modified-Since' header causes 400 in 8.5.58

2020-10-15 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64816

Bug ID: 64816
   Summary: Headers 'If-Modified-Since' header causes 400 in
8.5.58
   Product: Tomcat 8
   Version: 8.5.58
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: nityasant...@gmail.com
  Target Milestone: 

Created attachment 37503
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37503&action=edit
Has screenshots where we have 400 errors and 200 success

In the Tomcat 8.5.58 change log we have this - 'Improve the validation of
entity tags provided with conditional requests. Requests with headers that
contain invalid entity tags will be rejected with a 400 response code. Improve
the matching algorithm used to compare entity tags in conditional requests with
the entity tag for the requested resource. Based on a pull request by Sergey
Ponomarev. (markt)'. 

We believe this update is causing 400 error in Chrome when caching is enabled
and requests which have 'If-None-Match' and 'If-Modified-Since' headers. When
caching is disabled using Developer tools 400 errors are gone.

-- 
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 master updated: Add a test for connectionUploadTimeout/disableUploadTimeout

2020-10-15 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 55de48c  Add a test for connectionUploadTimeout/disableUploadTimeout
55de48c is described below

commit 55de48cf786f78b941f2a2c19443257182036035
Author: Mark Thomas 
AuthorDate: Thu Oct 15 15:21:53 2020 +0100

Add a test for connectionUploadTimeout/disableUploadTimeout
---
 .../apache/coyote/http11/TestHttp11Processor.java  | 88 ++
 1 file changed, 88 insertions(+)

diff --git a/test/org/apache/coyote/http11/TestHttp11Processor.java 
b/test/org/apache/coyote/http11/TestHttp11Processor.java
index 2d693ae..80c4ca3 100644
--- a/test/org/apache/coyote/http11/TestHttp11Processor.java
+++ b/test/org/apache/coyote/http11/TestHttp11Processor.java
@@ -50,6 +50,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.TesterServlet;
 import org.apache.catalina.startup.Tomcat;
@@ -1676,4 +1677,91 @@ public class TestHttp11Processor extends TomcatBaseTest {
 out.print(" and request.getServerPort() is " + 
req.getServerPort());
 }
 }
+
+
+@Test
+public void testSlowUploadTimeoutWithLongerUploadTimeout() throws 
Exception {
+doTestSlowUploadTimeout(true);
+}
+
+
+@Test
+public void testSlowUploadTimeoutWithoutLongerUploadTimeout() throws 
Exception {
+doTestSlowUploadTimeout(false);
+}
+
+
+private void doTestSlowUploadTimeout(boolean useLongerUploadTimeout) 
throws Exception {
+Tomcat tomcat = getTomcatInstance();
+Connector connector = tomcat.getConnector();
+
+int connectionTimeout = ((Integer) 
connector.getProperty("connectionTimeout")).intValue();
+
+// These factors should make the differences large enough that the CI
+// tests pass consistently. If not, may need to reduce 
connectionTimeout
+// and increase delay and connectionUploadTimeout
+int delay = connectionTimeout * 2;
+int connectionUploadTimeout = connectionTimeout * 4;
+
+if (useLongerUploadTimeout) {
+connector.setProperty("connectionUploadTimeout", "" + 
connectionUploadTimeout);
+connector.setProperty("disableUploadTimeout", "false");
+}
+
+// No file system docBase required
+Context ctx = tomcat.addContext("", null);
+
+// Add servlet
+Tomcat.addServlet(ctx, "TesterServlet", new 
SwallowBodyTesterServlet());
+ctx.addServletMappingDecoded("/foo", "TesterServlet");
+
+tomcat.start();
+
+String request =
+"POST /foo HTTP/1.1" + SimpleHttpClient.CRLF +
+"Host: localhost:" + getPort() + SimpleHttpClient.CRLF +
+"Content-Length: 10" + SimpleHttpClient.CRLF +
+ SimpleHttpClient.CRLF;
+
+Client client = new Client(tomcat.getConnector().getLocalPort());
+client.setRequest(new String[] {request, "XX"});
+client.setRequestPause(delay);
+
+client.connect();
+client.processRequest();
+
+if (useLongerUploadTimeout) {
+// Expected response is a 200 response.
+Assert.assertTrue(client.isResponse200());
+Assert.assertEquals("OK", client.getResponseBody());
+} else {
+// Different failure modes with different connectors
+Assert.assertFalse(client.isResponse200());
+}
+}
+
+
+private static class SwallowBodyTesterServlet extends TesterServlet {
+
+private static final long serialVersionUID = 1L;
+
+public SwallowBodyTesterServlet() {
+super(true);
+}
+
+@Override
+protected void doPost(HttpServletRequest req, HttpServletResponse resp)
+throws ServletException, IOException {
+
+// Swallow the body
+byte[] buf = new byte[1024];
+InputStream is = req.getInputStream();
+while (is.read(buf) > 0) {
+// Loop
+}
+
+// Standard response
+doGet(req, resp);
+}
+}
 }


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



Re: Re: [tomcat] branch 8.5.x updated: Always retry on a new connection, even when pooling

2020-10-15 Thread Michael Osipov
> On Wed, Oct 14, 2020 at 6:32 PM Michael Osipov  wrote:
>
> > Am 2020-10-14 um 12:32 schrieb R=C3=A9my Maucherat:
> > > On Tue, Oct 13, 2020 at 8:27 PM Michael Osipov 
> > wrote:
> > >
> > >> Am 2020-10-13 um 16:05 schrieb r...@apache.org:
> > >>> This is an automated email from the ASF dual-hosted git repository.
> > >>>
> > >>> remm 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 883600b  Always retry on a new connection, even when pooli=
> ng
> > >>> 883600b is described below
> > >>>
> > >>> commit 883600b8a77c0be93b3a8dc2404e8d1110970ee7
> > >>> Author: remm 
> > >>> AuthorDate: Tue Oct 13 14:19:54 2020 +0200
> > >>>
> > >>>   Always retry on a new connection, even when pooling
> > >>>
> > >>>   This keeps the same very simple design as for the single
> > connection
> > >>>   scenario, for now.
> > >>> ---
> > >>>java/org/apache/catalina/realm/JNDIRealm.java | 22
> > >> +++---
> > >>>webapps/docs/changelog.xml|  5 +
> > >>>2 files changed, 24 insertions(+), 3 deletions(-)
> > >>>
> > >>> diff --git a/java/org/apache/catalina/realm/JNDIRealm.java
> > >> b/java/org/apache/catalina/realm/JNDIRealm.java
> > >>> index 72087ab..98007f7 100644
> > >>> --- a/java/org/apache/catalina/realm/JNDIRealm.java
> > >>> +++ b/java/org/apache/catalina/realm/JNDIRealm.java
> > >>> @@ -1311,7 +1311,7 @@ public class JNDIRealm extends RealmBase {
> > >>>close(connection);
> > >>>
> > >>>// open a new directory context.
> > >>> -connection =3D get();
> > >>> +connection =3D get(true);
> > >>>
> > >>>// Try the authentication again.
> > >>>principal =3D authenticate(connection, username,
> > >> credentials);
> > >>> @@ -2389,12 +2389,28 @@ public class JNDIRealm extends RealmBase {
> > >>> * @exception NamingException if a directory server error occu=
> rs
> > >>> */
> > >>>protected JNDIConnection get() throws NamingException {
> > >>> +return get(false);
> > >>> +}
> > >>> +
> > >>> +/**
> > >>> + * Open (if necessary) and return a connection to the configured
> > >>> + * directory server for this Realm.
> > >>> + * @param create when pooling, this forces creation of a new
> > >> connection,
> > >>> + *   for example after an error
> > >>> + * @return the connection
> > >>> + * @exception NamingException if a directory server error occurs
> > >>> + */
> > >>> +protected JNDIConnection get(boolean create) throws
> > NamingException
> > >> {
> > >>>JNDIConnection connection =3D null;
> > >>>// Use the pool if available, otherwise use the single
> > >> connection
> > >>>if (connectionPool !=3D null) {
> > >>> -connection =3D connectionPool.pop();
> > >>> -if (connection =3D=3D null) {
> > >>> +if (create) {
> > >>>connection =3D create();
> > >>> +} else {
> > >>> +connection =3D connectionPool.pop();
> > >>> +if (connection =3D=3D null) {
> > >>> +connection =3D create();
> > >>> +}
> > >>>}
> > >>>} else {
> > >>>singleConnectionLock.lock();
> > >>
> > >> That suitable and simple approach.
> > >>
> > >
> > > If you have the code for adding a max idle check on hand and tested, yo=
> u
> > > should add it IMO, it will be more efficient.
> >
> > I will need to give this a couple more weeks of testing. This is what I
> > have observed today:
> > > 2020-10-14T16:01:47.039 147.54.155.198 w99sezx0... "GET
> > /x2tc-proxy-bln/rest/info/targetSystem HTTP/1.1" 200 8 92132
> > >
> > > 20609 2020-10-14T16:00:14 FEIN [https-openssl-apr-8444-exec-166]
> > net.sf.michaelo.tomcat.realm.ActiveDirectoryRealm.acquire Acquiring
> > directory server connection from pool
> > > 20610 2020-10-14T16:00:14 FEIN [https-openssl-apr-8444-exec-166]
> > net.sf.michaelo.tomcat.realm.ActiveDirectoryRealm.acquire Directory serve=
> r
> > connection from pool exceeds max idle time, closing it
> > > 20611 2020-10-14T16:00:14 FEIN [https-openssl-apr-8444-exec-166]
> > net.sf.michaelo.tomcat.realm.ActiveDirectoryRealm.close Closing directory
> > server connection
> > > 20612 2020-10-14T16:00:14 FEIN [https-openssl-apr-8444-exec-166]
> > net.sf.michaelo.tomcat.realm.ActiveDirectoryRealm.open Opening new
> > directory server connection
> > > 20613 2020-10-14T16:01:47 FEIN [https-openssl-apr-8444-exec-166]
> > net.sf.michaelo.tomcat.realm.ActiveDirectoryRealm.getUser Searching for
> > username 'w99sezx0' in base ...
> >
> > As you can see it took 90 seconds to server the request because the
> > connection has expired and close took way too long.

Re: Cannot override servlet context init param

2020-10-15 Thread Matt Benson
After a closer read of the open API, specifically the @return tag of
ServletContext#setInitParameter(), I retract the question.

Matt

On Tue, Oct 13, 2020, 7:31 PM Matt Benson  wrote:

> Hello,
> Today I was experimenting with a Servlet ContainerInitializer in which I
> wanted to modify the value of a particular init param, but found that
> Tomcat's ServletContext implementation (ApplicationContext) explicitly
> rejected the override. The Servlet API doesn't seem to suggest that what
> I'm trying to do should not be supported; would a patch (or patches,
> thinking of multiple Tomcat versions) to support this behavior, perhaps
> conditionally, be welcome? If so, what form should such conditional
> support take?
>
> Thanks,
> Matt
>


buildbot success in on tomcat-9-trunk

2020-10-15 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-9-trunk while 
building tomcat. Full details are available at:
https://ci.apache.org/builders/tomcat-9-trunk/builds/504

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: asf946_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-9-commit' 
triggered this build
Build Source Stamp: [branch 9.0.x] fb85e0e9160dc686a1969e304968936345dd96b9
Blamelist: Mark Thomas 

Build succeeded!

Sincerely,
 -The Buildbot




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



buildbot success in on tomcat-trunk

2020-10-15 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-trunk while 
building tomcat. Full details are available at:
https://ci.apache.org/builders/tomcat-trunk/builds/5504

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: asf946_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' 
triggered this build
Build Source Stamp: [branch master] 3082a43ed3ac49d66ef9759ad5ea4455a51c3d25
Blamelist: Mark Thomas 

Build succeeded!

Sincerely,
 -The Buildbot




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



[tomcat-native] branch master updated: Use OpenSSL 3 method when compiling against OpenSSL 3

2020-10-15 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-native.git


The following commit(s) were added to refs/heads/master by this push:
 new ac07270  Use OpenSSL 3 method when compiling against OpenSSL 3
ac07270 is described below

commit ac07270c9b44d53ac98e859ebedbcd99ca220224
Author: Mark Thomas 
AuthorDate: Thu Oct 15 12:30:17 2020 +0100

Use OpenSSL 3 method when compiling against OpenSSL 3
---
 native/src/sslutils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/native/src/sslutils.c b/native/src/sslutils.c
index b31a1b8..314bdad 100644
--- a/native/src/sslutils.c
+++ b/native/src/sslutils.c
@@ -995,7 +995,7 @@ static OCSP_RESPONSE *get_ocsp_response(apr_pool_t *p, X509 
*cert, X509 *issuer,
 #if OPENSSL_VERSION_NUMBER < 0x3000L
 if (OCSP_parse_url(url,&hostname, &c_port, &path, &use_ssl) == 0 )
 #else
-if (OCSP_parse_url(url,&hostname, &c_port, NULL, &path, &use_ssl) == 0 )
+if (OCSP_HTTP_parse_url(url,&hostname, &c_port, NULL, &path, &use_ssl) == 
0 )
 #endif
 goto end;
 


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



[tomcat] branch 9.0.x updated: Backport Javadoc improvements

2020-10-15 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/9.0.x by this push:
 new fb85e0e  Backport Javadoc improvements
fb85e0e is described below

commit fb85e0e9160dc686a1969e304968936345dd96b9
Author: Mark Thomas 
AuthorDate: Thu Oct 15 12:23:00 2020 +0100

Backport Javadoc improvements
---
 java/javax/servlet/AsyncContext.java| 55 -
 java/javax/servlet/GenericFilter.java   |  2 +-
 java/javax/servlet/http/HttpFilter.java |  5 +++
 java/javax/websocket/Decoder.java   |  8 +
 java/javax/websocket/Encoder.java   |  8 +
 java/javax/xml/ws/WebServiceRef.java|  2 --
 java/javax/xml/ws/WebServiceRefs.java   |  2 --
 7 files changed, 76 insertions(+), 6 deletions(-)

diff --git a/java/javax/servlet/AsyncContext.java 
b/java/javax/servlet/AsyncContext.java
index 9d0c81d..9abb6b3 100644
--- a/java/javax/servlet/AsyncContext.java
+++ b/java/javax/servlet/AsyncContext.java
@@ -17,20 +17,45 @@
 package javax.servlet;
 
 /**
- * TODO SERVLET3 - Add comments
+ * Provides the context for asynchronous request handling
+ *
  * @since Servlet 3.0
  */
 public interface AsyncContext {
+
+/**
+ * The attribute name for the URI of the async request
+ */
 public static final String ASYNC_REQUEST_URI =
 "javax.servlet.async.request_uri";
+
+/**
+ * The attribute name for the Context Path of the async request
+ */
 public static final String ASYNC_CONTEXT_PATH  =
 "javax.servlet.async.context_path";
+
+/**
+ * The attribute name for the Mapping of the async request
+ */
 public static final String ASYNC_MAPPING =
 "javax.servlet.async.mapping";
+
+/**
+ * The attribute name for the Path Info of the async request
+ */
 public static final String ASYNC_PATH_INFO =
 "javax.servlet.async.path_info";
+
+/**
+ * The attribute name for the Servlet Path of the async request
+ */
 public static final String ASYNC_SERVLET_PATH =
 "javax.servlet.async.servlet_path";
+
+/**
+ * The attribute name for the Query String of the async request
+ */
 public static final String ASYNC_QUERY_STRING =
 "javax.servlet.async.query_string";
 
@@ -79,15 +104,43 @@ public interface AsyncContext {
  */
 void dispatch(ServletContext context, String path);
 
+/**
+ * Completes the async request processing and closes the response stream
+ */
 void complete();
 
+/**
+ * Starts a new thread to process the asynchronous request
+ *
+ * @param run a Runnable that the new thread will run
+ */
 void start(Runnable run);
 
+/**
+ * Adds an event listener that will be called for different AsyncEvents 
fire
+ *
+ * @param listener an AsyncListener that will be called with AsyncEvent 
objects
+ */
 void addListener(AsyncListener listener);
 
+/**
+ * Adds an event listener that will be called when different AsyncEvents 
fire
+ *
+ * @param listener an AsyncListener that will be called with AsyncEvent 
objects
+ * @param request the ServletRequest that will be passed with the 
AsyncEvent
+ * @param response the ServletResponse that will be passed with the 
AsyncEvent
+ */
 void addListener(AsyncListener listener, ServletRequest request,
 ServletResponse response);
 
+/**
+ * Creates and returns an AsyncListener object
+ *
+ * @param  The type to create that extends AsyncListener
+ * @param clazz The class to instantiate to create the listener
+ * @return the newly created AsyncListener object
+ * @throws ServletException if the listener cannot be created
+ */
  T createListener(Class clazz)
 throws ServletException;
 
diff --git a/java/javax/servlet/GenericFilter.java 
b/java/javax/servlet/GenericFilter.java
index 32ea77a..f32ac4f 100644
--- a/java/javax/servlet/GenericFilter.java
+++ b/java/javax/servlet/GenericFilter.java
@@ -20,7 +20,7 @@ import java.io.Serializable;
 import java.util.Enumeration;
 
 /**
- * Provides a base class the implements the Filter and FilterConfig interfaces
+ * Provides a base class that implements the Filter and FilterConfig interfaces
  * to reduce boilerplate when writing new filters.
  *
  * @see javax.servlet.Filter
diff --git a/java/javax/servlet/http/HttpFilter.java 
b/java/javax/servlet/http/HttpFilter.java
index 8622aeb..c2a7097 100644
--- a/java/javax/servlet/http/HttpFilter.java
+++ b/java/javax/servlet/http/HttpFilter.java
@@ -24,6 +24,11 @@ import javax.servlet.ServletException;
 import javax.servlet.ServletRequest;
 import javax.servlet.ServletResponse;
 
+/**
+ * Provides a base class that implements the Filter interface and ensures
+ * that the Request and Response are of type HttpSer

[tomcat] branch master updated: Fix Javadoc for Java 8

2020-10-15 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 3082a43  Fix Javadoc for Java 8
3082a43 is described below

commit 3082a43ed3ac49d66ef9759ad5ea4455a51c3d25
Author: Mark Thomas 
AuthorDate: Thu Oct 15 11:57:11 2020 +0100

Fix Javadoc for Java 8
---
 java/jakarta/servlet/AsyncContext.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/java/jakarta/servlet/AsyncContext.java 
b/java/jakarta/servlet/AsyncContext.java
index 12ed736..80ff5fa 100644
--- a/java/jakarta/servlet/AsyncContext.java
+++ b/java/jakarta/servlet/AsyncContext.java
@@ -145,10 +145,10 @@ public interface AsyncContext {
 /**
  * Creates and returns an AsyncListener object
  *
- * @param 
- * @param clazz
+ * @param  The type to create that extends AsyncListener
+ * @param clazz The class to instantiate to create the listener
  * @return the newly created AsyncListener object
- * @throws ServletException
+ * @throws ServletException if the listener cannot be created
  */
  T createListener(Class clazz)
 throws ServletException;


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



buildbot failure in on tomcat-9-trunk

2020-10-15 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-9-trunk while 
building tomcat. Full details are available at:
https://ci.apache.org/builders/tomcat-9-trunk/builds/503

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: asf946_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-9-commit' 
triggered this build
Build Source Stamp: [branch 9.0.x] e61d3825a484204853ab04ca4489b76fd4793521
Blamelist: Mark Thomas 

BUILD FAILED: failed compile_1

Sincerely,
 -The Buildbot




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



[Bug 63362] GlobalRequestProcessor statistics in MBean does not count Websocket communication

2020-10-15 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63362

Mark Thomas  changed:

   What|Removed |Added

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

--- Comment #8 from Mark Thomas  ---
Support added for WebSocket and generic HTTP upgrade protocols.

Fixed in:
- 10.0.x for 10.0.0-M10 onwards
- 9.0.x for 9.0.40 onwards
- 8.5.x for 8.5.60 onwards

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



[tomcat] branch 8.5.x updated: Complete fix for BZ 63362. Collect stats for h2, websocket and upgrade

2020-10-15 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 b709415  Complete fix for BZ 63362. Collect stats for h2, websocket 
and upgrade
b709415 is described below

commit b709415efb391d6f6f3aa4423494a2dd3610c59d
Author: Mark Thomas 
AuthorDate: Thu Oct 15 09:45:47 2020 +0100

Complete fix for BZ 63362. Collect stats for h2, websocket and upgrade

https://bz.apache.org/bugzilla/show_bug.cgi?id=63362
---
 java/org/apache/catalina/connector/Request.java|   2 +-
 java/org/apache/coyote/AbstractProtocol.java   |  26 -
 java/org/apache/coyote/LocalStrings.properties |   1 -
 java/org/apache/coyote/UpgradeToken.java   |   9 +-
 .../coyote/http11/AbstractHttp11Protocol.java  | 100 +++--
 java/org/apache/coyote/http11/Http11Processor.java |   2 +-
 .../apache/coyote/http11/LocalStrings.properties   |   2 +
 .../http11/upgrade/InternalHttpUpgradeHandler.java |   2 +
 .../coyote/http11/upgrade/UpgradeGroupInfo.java| 120 +
 .../apache/coyote/http11/upgrade/UpgradeInfo.java  |  96 +
 .../http11/upgrade/UpgradeProcessorExternal.java   |  14 ++-
 .../http11/upgrade/UpgradeProcessorInternal.java   |  12 ++-
 .../http11/upgrade/UpgradeServletInputStream.java  |  17 ++-
 .../http11/upgrade/UpgradeServletOutputStream.java |   7 +-
 java/org/apache/coyote/http2/Http2Protocol.java|  46 
 .../apache/coyote/http2/Http2UpgradeHandler.java   |   8 ++
 .../apache/coyote/http2/LocalStrings.properties|   2 +
 java/org/apache/coyote/http2/StreamProcessor.java  |   6 +-
 java/org/apache/coyote/mbeans-descriptors.xml  |  92 
 java/org/apache/tomcat/websocket/WsFrameBase.java  |  13 +++
 .../tomcat/websocket/WsRemoteEndpointImplBase.java |  15 +++
 .../tomcat/websocket/server/WsFrameServer.java |  14 ++-
 .../websocket/server/WsHttpUpgradeHandler.java |  12 ++-
 .../server/WsRemoteEndpointImplServer.java |  12 ++-
 .../apache/coyote/http11/upgrade/TestUpgrade.java  |   4 +
 .../http11/upgrade/TestUpgradeInternalHandler.java |   6 +-
 webapps/docs/changelog.xml |   4 +-
 27 files changed, 562 insertions(+), 82 deletions(-)

diff --git a/java/org/apache/catalina/connector/Request.java 
b/java/org/apache/catalina/connector/Request.java
index 1d2c341..67be9ce 100644
--- a/java/org/apache/catalina/connector/Request.java
+++ b/java/org/apache/catalina/connector/Request.java
@@ -2046,7 +2046,7 @@ public class Request implements HttpServletRequest {
 throw new ServletException(e);
 }
 UpgradeToken upgradeToken = new UpgradeToken(handler,
-getContext(), instanceManager);
+getContext(), instanceManager, response.getHeader("upgrade"));
 
 coyoteRequest.action(ActionCode.UPGRADE, upgradeToken);
 
diff --git a/java/org/apache/coyote/AbstractProtocol.java 
b/java/org/apache/coyote/AbstractProtocol.java
index dd1359b..247a5b0 100644
--- a/java/org/apache/coyote/AbstractProtocol.java
+++ b/java/org/apache/coyote/AbstractProtocol.java
@@ -35,7 +35,6 @@ import javax.management.ObjectName;
 import javax.servlet.http.HttpUpgradeHandler;
 import javax.servlet.http.WebConnection;
 
-import org.apache.coyote.http2.Http2Protocol;
 import org.apache.juli.logging.Log;
 import org.apache.tomcat.InstanceManager;
 import org.apache.tomcat.util.ExceptionUtils;
@@ -589,17 +588,6 @@ public abstract class AbstractProtocol implements 
ProtocolHandler,
 endpoint.setDomain(domain);
 
 endpoint.init();
-
-UpgradeProtocol[] upgradeProtocols = findUpgradeProtocols();
-for (UpgradeProtocol upgradeProtocol : upgradeProtocols) {
-// Need to do this as we can't add methods to UpgradeProtocol
-// without running the risk of breaking a custom upgrade protocol
-if (upgradeProtocol instanceof Http2Protocol) {
-// Implementation note: Failure of one upgrade protocol fails 
the
-// whole Connector
-((Http2Protocol) upgradeProtocol).init();
-}
-}
 }
 
 
@@ -664,20 +652,6 @@ public abstract class AbstractProtocol implements 
ProtocolHandler,
 getLog().info(sm.getString("abstractProtocolHandler.destroy", 
getName()));
 }
 
-UpgradeProtocol[] upgradeProtocols = findUpgradeProtocols();
-for (UpgradeProtocol upgradeProtocol : upgradeProtocols) {
-try {
-// Need to do this as we can't add methods to UpgradeProtocol
-// without running the risk of breaking a custom upgrade 
protocol
-if (upgradeProtocol instanceof Http2Protocol) {
-((Http2Protocol) upgradeProtocol).destroy();
-}
-} catch (Throw

[tomcat] branch 9.0.x updated: Don't create UpgradeGroupInfo for h2 - it uses RequestGroupInfo

2020-10-15 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/9.0.x by this push:
 new e61d382  Don't create UpgradeGroupInfo for h2 - it uses 
RequestGroupInfo
e61d382 is described below

commit e61d3825a484204853ab04ca4489b76fd4793521
Author: Mark Thomas 
AuthorDate: Thu Oct 15 10:48:10 2020 +0100

Don't create UpgradeGroupInfo for h2 - it uses RequestGroupInfo
---
 java/org/apache/coyote/http2/Http2Protocol.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/coyote/http2/Http2Protocol.java 
b/java/org/apache/coyote/http2/Http2Protocol.java
index 4743b05..0167b05 100644
--- a/java/org/apache/coyote/http2/Http2Protocol.java
+++ b/java/org/apache/coyote/http2/Http2Protocol.java
@@ -133,7 +133,7 @@ public class Http2Protocol implements UpgradeProtocol {
 String upgradeProtocol = getUpgradeProtocolName();
 UpgradeProcessorInternal processor = new 
UpgradeProcessorInternal(socketWrapper,
 new UpgradeToken(getInternalUpgradeHandler(socketWrapper, 
adapter, null), null, null, upgradeProtocol),
-http11Protocol.getUpgradeGroupInfo(upgradeProtocol));
+null);
 return processor;
 }
 


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



[tomcat] branch master updated: Don't create UpgradeGroupInfo for h2 - it uses RequestGroupInfo

2020-10-15 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 6cb35bd  Don't create UpgradeGroupInfo for h2 - it uses 
RequestGroupInfo
6cb35bd is described below

commit 6cb35bd585faa15e1a9ef52dfc1512fc9079be53
Author: Mark Thomas 
AuthorDate: Thu Oct 15 10:48:10 2020 +0100

Don't create UpgradeGroupInfo for h2 - it uses RequestGroupInfo
---
 java/org/apache/coyote/http2/Http2Protocol.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/coyote/http2/Http2Protocol.java 
b/java/org/apache/coyote/http2/Http2Protocol.java
index 5c4e5e0..51ed086 100644
--- a/java/org/apache/coyote/http2/Http2Protocol.java
+++ b/java/org/apache/coyote/http2/Http2Protocol.java
@@ -117,7 +117,7 @@ public class Http2Protocol implements UpgradeProtocol {
 String upgradeProtocol = getUpgradeProtocolName();
 UpgradeProcessorInternal processor = new 
UpgradeProcessorInternal(socketWrapper,
 new UpgradeToken(getInternalUpgradeHandler(socketWrapper, 
adapter, null), null, null, upgradeProtocol),
-http11Protocol.getUpgradeGroupInfo(upgradeProtocol));
+null);
 return processor;
 }
 


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



[tomcat] branch 9.0.x updated: Complete fix for BZ 63362. Collect stats for h2, websocket and upgrade

2020-10-15 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 41497b9  Complete fix for BZ 63362. Collect stats for h2, websocket 
and upgrade
41497b9 is described below

commit 41497b9883efdc64c210e659235d853f32331127
Author: Mark Thomas 
AuthorDate: Thu Oct 15 09:45:47 2020 +0100

Complete fix for BZ 63362. Collect stats for h2, websocket and upgrade

https://bz.apache.org/bugzilla/show_bug.cgi?id=63362
---
 java/org/apache/catalina/connector/Request.java|   2 +-
 java/org/apache/coyote/AbstractProtocol.java   |  17 ---
 java/org/apache/coyote/LocalStrings.properties |   1 -
 java/org/apache/coyote/UpgradeProtocol.java|  23 +---
 java/org/apache/coyote/UpgradeToken.java   |   9 +-
 .../coyote/http11/AbstractHttp11Protocol.java  |  96 -
 java/org/apache/coyote/http11/Http11Processor.java |   2 +-
 .../apache/coyote/http11/LocalStrings.properties   |   2 +
 .../http11/upgrade/InternalHttpUpgradeHandler.java |   4 +
 .../coyote/http11/upgrade/UpgradeGroupInfo.java| 120 +
 .../apache/coyote/http11/upgrade/UpgradeInfo.java  |  96 +
 .../http11/upgrade/UpgradeProcessorExternal.java   |  14 ++-
 .../http11/upgrade/UpgradeProcessorInternal.java   |  12 ++-
 .../http11/upgrade/UpgradeServletInputStream.java  |  17 ++-
 .../http11/upgrade/UpgradeServletOutputStream.java |   7 +-
 java/org/apache/coyote/http2/Http2Protocol.java|  49 -
 .../apache/coyote/http2/LocalStrings.properties|   2 +
 java/org/apache/coyote/http2/StreamProcessor.java  |   6 +-
 java/org/apache/coyote/mbeans-descriptors.xml  |  30 ++
 java/org/apache/tomcat/websocket/WsFrameBase.java  |  13 +++
 .../tomcat/websocket/WsRemoteEndpointImplBase.java |  15 +++
 .../tomcat/websocket/server/WsFrameServer.java |  14 ++-
 .../websocket/server/WsHttpUpgradeHandler.java |  12 ++-
 .../server/WsRemoteEndpointImplServer.java |  12 ++-
 .../apache/coyote/http11/upgrade/TestUpgrade.java  |   4 +
 webapps/docs/changelog.xml |   4 +-
 26 files changed, 489 insertions(+), 94 deletions(-)

diff --git a/java/org/apache/catalina/connector/Request.java 
b/java/org/apache/catalina/connector/Request.java
index dc6faaa..0bd422b 100644
--- a/java/org/apache/catalina/connector/Request.java
+++ b/java/org/apache/catalina/connector/Request.java
@@ -2049,7 +2049,7 @@ public class Request implements HttpServletRequest {
 throw new ServletException(e);
 }
 UpgradeToken upgradeToken = new UpgradeToken(handler,
-getContext(), instanceManager);
+getContext(), instanceManager, response.getHeader("upgrade"));
 
 coyoteRequest.action(ActionCode.UPGRADE, upgradeToken);
 
diff --git a/java/org/apache/coyote/AbstractProtocol.java 
b/java/org/apache/coyote/AbstractProtocol.java
index ab9dd38..28eb9e9 100644
--- a/java/org/apache/coyote/AbstractProtocol.java
+++ b/java/org/apache/coyote/AbstractProtocol.java
@@ -582,13 +582,6 @@ public abstract class AbstractProtocol implements 
ProtocolHandler,
 endpoint.setDomain(domain);
 
 endpoint.init();
-
-UpgradeProtocol[] upgradeProtocols = findUpgradeProtocols();
-for (UpgradeProtocol upgradeProtocol : upgradeProtocols) {
-// Implementation note: Failure of one upgrade protocol fails the
-// whole Connector
-upgradeProtocol.init();
-}
 }
 
 
@@ -702,16 +695,6 @@ public abstract class AbstractProtocol implements 
ProtocolHandler,
 logPortOffset();
 }
 
-UpgradeProtocol[] upgradeProtocols = findUpgradeProtocols();
-for (UpgradeProtocol upgradeProtocol : upgradeProtocols) {
-try {
-upgradeProtocol.destroy();
-} catch (Throwable t) {
-ExceptionUtils.handleThrowable(t);
-
getLog().error(sm.getString("abstractProtocol.upgradeProtocolDestroyError"), t);
-}
-}
-
 try {
 endpoint.destroy();
 } finally {
diff --git a/java/org/apache/coyote/LocalStrings.properties 
b/java/org/apache/coyote/LocalStrings.properties
index 43c8d64..83960cb 100644
--- a/java/org/apache/coyote/LocalStrings.properties
+++ b/java/org/apache/coyote/LocalStrings.properties
@@ -36,7 +36,6 @@ abstractProcessor.socket.ssl=Exception getting SSL attributes
 abstractProtocol.mbeanDeregistrationFailed=Failed to deregister MBean named 
[{0}] from MBean server [{1}]
 abstractProtocol.processorRegisterError=Error registering request processor
 abstractProtocol.processorUnregisterError=Error unregistering request processor
-abstractProtocol.upgradeProtocolDestroyError=Error destroying upgrade protocol
 abstractProtocol.waitingProcessor.add=Added pro

[tomcat] branch 9.0.x updated: Fix typo

2020-10-15 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 1e81e4c  Fix typo
1e81e4c is described below

commit 1e81e4c3bf3ca3ee40a241c4949e39d2244e326a
Author: Mark Thomas 
AuthorDate: Thu Oct 15 09:43:30 2020 +0100

Fix typo
---
 webapps/docs/changelog.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index f37af02..278a0b7 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -55,7 +55,7 @@
 Context. (markt)
   
   
-64805: Correct imports used by JMXPorxyServlet.
+64805: Correct imports used by JMXProxyServlet.
 (markt)
   
   


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



[tomcat] branch 9.0.x updated: Fix possible NPE. Correct ExceptionUtils import.

2020-10-15 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 6b02273  Fix possible NPE. Correct ExceptionUtils import.
6b02273 is described below

commit 6b022733e12d0cffef413d880a238ba5ef0ddd6b
Author: Mark Thomas 
AuthorDate: Thu Oct 15 10:01:57 2020 +0100

Fix possible NPE. Correct ExceptionUtils import.
---
 java/org/apache/catalina/valves/JsonErrorReportValve.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/valves/JsonErrorReportValve.java 
b/java/org/apache/catalina/valves/JsonErrorReportValve.java
index a438e77..5233bff 100644
--- a/java/org/apache/catalina/valves/JsonErrorReportValve.java
+++ b/java/org/apache/catalina/valves/JsonErrorReportValve.java
@@ -22,8 +22,8 @@ import java.util.concurrent.atomic.AtomicBoolean;
 
 import org.apache.catalina.connector.Request;
 import org.apache.catalina.connector.Response;
-import org.apache.catalina.tribes.util.ExceptionUtils;
 import org.apache.coyote.ActionCode;
+import org.apache.tomcat.util.ExceptionUtils;
 import org.apache.tomcat.util.res.StringManager;
 
 /**
@@ -75,7 +75,7 @@ public class JsonErrorReportValve extends ErrorReportValve {
 String description = null;
 description = smClient.getString("http." + statusCode + ".desc");
 if (description == null) {
-if (message.isEmpty()) {
+if (message == null || message.isEmpty()) {
 return;
 } else {
 description = 
smClient.getString("errorReportValve.noDescription");


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



[tomcat] branch master updated: Align with 9.0.x

2020-10-15 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 4c54a2b  Align with 9.0.x
4c54a2b is described below

commit 4c54a2bf1642b147b7604362d07e6dbdbd3cfc36
Author: Mark Thomas 
AuthorDate: Thu Oct 15 10:11:13 2020 +0100

Align with 9.0.x
---
 java/org/apache/coyote/UpgradeProtocol.java | 3 ++-
 java/org/apache/coyote/http2/Http2Protocol.java | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/coyote/UpgradeProtocol.java 
b/java/org/apache/coyote/UpgradeProtocol.java
index dc840df..bd80e83 100644
--- a/java/org/apache/coyote/UpgradeProtocol.java
+++ b/java/org/apache/coyote/UpgradeProtocol.java
@@ -16,6 +16,7 @@
  */
 package org.apache.coyote;
 
+import org.apache.coyote.http11.AbstractHttp11Protocol;
 import org.apache.coyote.http11.upgrade.InternalHttpUpgradeHandler;
 import org.apache.tomcat.util.net.SocketWrapperBase;
 
@@ -104,7 +105,7 @@ public interface UpgradeProtocol {
  * handle any connections passed to this UpgradeProtocol 
via
  * the HTTP upgrade mechanism
  */
-public default void setHttp11Protocol(AbstractProtocol protocol) {
+public default void setHttp11Protocol(AbstractHttp11Protocol protocol) {
 // NO-OP
 }
 }
diff --git a/java/org/apache/coyote/http2/Http2Protocol.java 
b/java/org/apache/coyote/http2/Http2Protocol.java
index f2a97b5..5c4e5e0 100644
--- a/java/org/apache/coyote/http2/Http2Protocol.java
+++ b/java/org/apache/coyote/http2/Http2Protocol.java
@@ -344,8 +344,8 @@ public class Http2Protocol implements UpgradeProtocol {
 
 
 @Override
-public void setHttp11Protocol(AbstractProtocol http11Protocol) {
-this.http11Protocol = (AbstractHttp11Protocol) http11Protocol;
+public void setHttp11Protocol(AbstractHttp11Protocol http11Protocol) {
+this.http11Protocol = http11Protocol;
 
 try {
 ObjectName oname = 
this.http11Protocol.getONameForUpgrade(getUpgradeProtocolName());


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



[tomcat] branch master updated: Fix possible NPE. Correct ExceptionUtils import.

2020-10-15 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 4db6733  Fix possible NPE. Correct ExceptionUtils import.
4db6733 is described below

commit 4db67333e133df54cad5a7f51253fc101293ac79
Author: Mark Thomas 
AuthorDate: Thu Oct 15 10:01:57 2020 +0100

Fix possible NPE. Correct ExceptionUtils import.
---
 java/org/apache/catalina/valves/JsonErrorReportValve.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/valves/JsonErrorReportValve.java 
b/java/org/apache/catalina/valves/JsonErrorReportValve.java
index a438e77..5233bff 100644
--- a/java/org/apache/catalina/valves/JsonErrorReportValve.java
+++ b/java/org/apache/catalina/valves/JsonErrorReportValve.java
@@ -22,8 +22,8 @@ import java.util.concurrent.atomic.AtomicBoolean;
 
 import org.apache.catalina.connector.Request;
 import org.apache.catalina.connector.Response;
-import org.apache.catalina.tribes.util.ExceptionUtils;
 import org.apache.coyote.ActionCode;
+import org.apache.tomcat.util.ExceptionUtils;
 import org.apache.tomcat.util.res.StringManager;
 
 /**
@@ -75,7 +75,7 @@ public class JsonErrorReportValve extends ErrorReportValve {
 String description = null;
 description = smClient.getString("http." + statusCode + ".desc");
 if (description == null) {
-if (message.isEmpty()) {
+if (message == null || message.isEmpty()) {
 return;
 } else {
 description = 
smClient.getString("errorReportValve.noDescription");


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

2020-10-15 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 507b9c5  Fix typo
507b9c5 is described below

commit 507b9c5b29d8a081542dcb61ebbe57eaa55d2e82
Author: Mark Thomas 
AuthorDate: Thu Oct 15 09:43:30 2020 +0100

Fix typo
---
 webapps/docs/changelog.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 7e3c4b9..7fabb3b 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -58,7 +58,7 @@
 Add connection pooling to JNDI realm. (remm)
   
   
-64805: Correct imports used by JMXPorxyServlet.
+64805: Correct imports used by JMXProxyServlet.
 (markt)
   
   


-
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: Fix typo

2020-10-15 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


The following commit(s) were added to refs/heads/7.0.x by this push:
 new 8cd6c13  Fix typo
8cd6c13 is described below

commit 8cd6c130c6c40442a6b55e8bfad7584ddf0b423d
Author: Mark Thomas 
AuthorDate: Thu Oct 15 09:52:31 2020 +0100

Fix typo
---
 webapps/docs/changelog.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index c23ba40..e20a9f8 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -84,7 +84,7 @@
 detection code. (markt)
   
   
-64805: Correct imports used by JMXPorxyServlet.
+64805: Correct imports used by JMXProxyServlet.
 (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: Fix typo

2020-10-15 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 507b9c5  Fix typo
507b9c5 is described below

commit 507b9c5b29d8a081542dcb61ebbe57eaa55d2e82
Author: Mark Thomas 
AuthorDate: Thu Oct 15 09:43:30 2020 +0100

Fix typo
---
 webapps/docs/changelog.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 7e3c4b9..7fabb3b 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -58,7 +58,7 @@
 Add connection pooling to JNDI realm. (remm)
   
   
-64805: Correct imports used by JMXPorxyServlet.
+64805: Correct imports used by JMXProxyServlet.
 (markt)
   
   


-
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: Fix typo

2020-10-15 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


The following commit(s) were added to refs/heads/7.0.x by this push:
 new 8cd6c13  Fix typo
8cd6c13 is described below

commit 8cd6c130c6c40442a6b55e8bfad7584ddf0b423d
Author: Mark Thomas 
AuthorDate: Thu Oct 15 09:52:31 2020 +0100

Fix typo
---
 webapps/docs/changelog.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index c23ba40..e20a9f8 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -84,7 +84,7 @@
 detection code. (markt)
   
   
-64805: Correct imports used by JMXPorxyServlet.
+64805: Correct imports used by JMXProxyServlet.
 (markt)
   
 


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



[tomcat] branch 9.0.x updated: Fix typo

2020-10-15 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 1e81e4c  Fix typo
1e81e4c is described below

commit 1e81e4c3bf3ca3ee40a241c4949e39d2244e326a
Author: Mark Thomas 
AuthorDate: Thu Oct 15 09:43:30 2020 +0100

Fix typo
---
 webapps/docs/changelog.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index f37af02..278a0b7 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -55,7 +55,7 @@
 Context. (markt)
   
   
-64805: Correct imports used by JMXPorxyServlet.
+64805: Correct imports used by JMXProxyServlet.
 (markt)
   
   


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



[tomcat] branch 9.0.x updated: Fix possible NPE. Correct ExceptionUtils import.

2020-10-15 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 6b02273  Fix possible NPE. Correct ExceptionUtils import.
6b02273 is described below

commit 6b022733e12d0cffef413d880a238ba5ef0ddd6b
Author: Mark Thomas 
AuthorDate: Thu Oct 15 10:01:57 2020 +0100

Fix possible NPE. Correct ExceptionUtils import.
---
 java/org/apache/catalina/valves/JsonErrorReportValve.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/valves/JsonErrorReportValve.java 
b/java/org/apache/catalina/valves/JsonErrorReportValve.java
index a438e77..5233bff 100644
--- a/java/org/apache/catalina/valves/JsonErrorReportValve.java
+++ b/java/org/apache/catalina/valves/JsonErrorReportValve.java
@@ -22,8 +22,8 @@ import java.util.concurrent.atomic.AtomicBoolean;
 
 import org.apache.catalina.connector.Request;
 import org.apache.catalina.connector.Response;
-import org.apache.catalina.tribes.util.ExceptionUtils;
 import org.apache.coyote.ActionCode;
+import org.apache.tomcat.util.ExceptionUtils;
 import org.apache.tomcat.util.res.StringManager;
 
 /**
@@ -75,7 +75,7 @@ public class JsonErrorReportValve extends ErrorReportValve {
 String description = null;
 description = smClient.getString("http." + statusCode + ".desc");
 if (description == null) {
-if (message.isEmpty()) {
+if (message == null || message.isEmpty()) {
 return;
 } else {
 description = 
smClient.getString("errorReportValve.noDescription");


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



[tomcat] branch master updated: Fix possible NPE. Correct ExceptionUtils import.

2020-10-15 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 4db6733  Fix possible NPE. Correct ExceptionUtils import.
4db6733 is described below

commit 4db67333e133df54cad5a7f51253fc101293ac79
Author: Mark Thomas 
AuthorDate: Thu Oct 15 10:01:57 2020 +0100

Fix possible NPE. Correct ExceptionUtils import.
---
 java/org/apache/catalina/valves/JsonErrorReportValve.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/valves/JsonErrorReportValve.java 
b/java/org/apache/catalina/valves/JsonErrorReportValve.java
index a438e77..5233bff 100644
--- a/java/org/apache/catalina/valves/JsonErrorReportValve.java
+++ b/java/org/apache/catalina/valves/JsonErrorReportValve.java
@@ -22,8 +22,8 @@ import java.util.concurrent.atomic.AtomicBoolean;
 
 import org.apache.catalina.connector.Request;
 import org.apache.catalina.connector.Response;
-import org.apache.catalina.tribes.util.ExceptionUtils;
 import org.apache.coyote.ActionCode;
+import org.apache.tomcat.util.ExceptionUtils;
 import org.apache.tomcat.util.res.StringManager;
 
 /**
@@ -75,7 +75,7 @@ public class JsonErrorReportValve extends ErrorReportValve {
 String description = null;
 description = smClient.getString("http." + statusCode + ".desc");
 if (description == null) {
-if (message.isEmpty()) {
+if (message == null || message.isEmpty()) {
 return;
 } else {
 description = 
smClient.getString("errorReportValve.noDescription");


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

2020-10-15 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 507b9c5  Fix typo
507b9c5 is described below

commit 507b9c5b29d8a081542dcb61ebbe57eaa55d2e82
Author: Mark Thomas 
AuthorDate: Thu Oct 15 09:43:30 2020 +0100

Fix typo
---
 webapps/docs/changelog.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 7e3c4b9..7fabb3b 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -58,7 +58,7 @@
 Add connection pooling to JNDI realm. (remm)
   
   
-64805: Correct imports used by JMXPorxyServlet.
+64805: Correct imports used by JMXProxyServlet.
 (markt)
   
   


-
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: Fix typo

2020-10-15 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


The following commit(s) were added to refs/heads/7.0.x by this push:
 new 8cd6c13  Fix typo
8cd6c13 is described below

commit 8cd6c130c6c40442a6b55e8bfad7584ddf0b423d
Author: Mark Thomas 
AuthorDate: Thu Oct 15 09:52:31 2020 +0100

Fix typo
---
 webapps/docs/changelog.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index c23ba40..e20a9f8 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -84,7 +84,7 @@
 detection code. (markt)
   
   
-64805: Correct imports used by JMXPorxyServlet.
+64805: Correct imports used by JMXProxyServlet.
 (markt)
   
 


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



[tomcat] branch 9.0.x updated: Fix typo

2020-10-15 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 1e81e4c  Fix typo
1e81e4c is described below

commit 1e81e4c3bf3ca3ee40a241c4949e39d2244e326a
Author: Mark Thomas 
AuthorDate: Thu Oct 15 09:43:30 2020 +0100

Fix typo
---
 webapps/docs/changelog.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index f37af02..278a0b7 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -55,7 +55,7 @@
 Context. (markt)
   
   
-64805: Correct imports used by JMXPorxyServlet.
+64805: Correct imports used by JMXProxyServlet.
 (markt)
   
   


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



[tomcat] branch 9.0.x updated: Fix typo

2020-10-15 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 1e81e4c  Fix typo
1e81e4c is described below

commit 1e81e4c3bf3ca3ee40a241c4949e39d2244e326a
Author: Mark Thomas 
AuthorDate: Thu Oct 15 09:43:30 2020 +0100

Fix typo
---
 webapps/docs/changelog.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index f37af02..278a0b7 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -55,7 +55,7 @@
 Context. (markt)
   
   
-64805: Correct imports used by JMXPorxyServlet.
+64805: Correct imports used by JMXProxyServlet.
 (markt)
   
   


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



[tomcat] branch 9.0.x updated: Fix typo

2020-10-15 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 1e81e4c  Fix typo
1e81e4c is described below

commit 1e81e4c3bf3ca3ee40a241c4949e39d2244e326a
Author: Mark Thomas 
AuthorDate: Thu Oct 15 09:43:30 2020 +0100

Fix typo
---
 webapps/docs/changelog.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index f37af02..278a0b7 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -55,7 +55,7 @@
 Context. (markt)
   
   
-64805: Correct imports used by JMXPorxyServlet.
+64805: Correct imports used by JMXProxyServlet.
 (markt)
   
   


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



Re: [tomcat] 02/02: Complete fix for BZ 63362. Collect stats for h2, websocket and upgrade

2020-10-15 Thread Mark Thomas
On 15/10/2020 09:46, ma...@apache.org wrote:
> 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 c5e4066fc25c2b8611e476199d3361341c473257
> Author: Mark Thomas 
> AuthorDate: Thu Oct 15 09:45:47 2020 +0100
> 
> Complete fix for BZ 63362. Collect stats for h2, websocket and upgrade

This has more moving parts than I would like because of all the
different variations that need to be covered. There may be some
simplifications that I missed.

Mark

> 
> https://bz.apache.org/bugzilla/show_bug.cgi?id=63362
> ---
>  java/org/apache/catalina/connector/Request.java|   2 +-
>  java/org/apache/coyote/AbstractProtocol.java   |  17 ---
>  java/org/apache/coyote/LocalStrings.properties |   1 -
>  java/org/apache/coyote/UpgradeProtocol.java|  22 
>  java/org/apache/coyote/UpgradeToken.java   |   9 +-
>  .../coyote/http11/AbstractHttp11Protocol.java  |  97 -
>  java/org/apache/coyote/http11/Http11Processor.java |   2 +-
>  .../apache/coyote/http11/LocalStrings.properties   |   2 +
>  .../http11/upgrade/InternalHttpUpgradeHandler.java |   4 +
>  .../coyote/http11/upgrade/UpgradeGroupInfo.java| 120 
> +
>  .../apache/coyote/http11/upgrade/UpgradeInfo.java  |  96 +
>  .../http11/upgrade/UpgradeProcessorExternal.java   |  14 ++-
>  .../http11/upgrade/UpgradeProcessorInternal.java   |  12 ++-
>  .../http11/upgrade/UpgradeServletInputStream.java  |  17 ++-
>  .../http11/upgrade/UpgradeServletOutputStream.java |   7 +-
>  java/org/apache/coyote/http2/Http2Protocol.java|  49 -
>  .../apache/coyote/http2/LocalStrings.properties|   2 +
>  java/org/apache/coyote/http2/StreamProcessor.java  |   6 +-
>  java/org/apache/coyote/mbeans-descriptors.xml  |  30 ++
>  java/org/apache/tomcat/websocket/WsFrameBase.java  |  13 +++
>  .../tomcat/websocket/WsRemoteEndpointImplBase.java |  15 +++
>  .../tomcat/websocket/server/WsFrameServer.java |  14 ++-
>  .../websocket/server/WsHttpUpgradeHandler.java |  12 ++-
>  .../server/WsRemoteEndpointImplServer.java |  12 ++-
>  .../apache/coyote/http11/upgrade/TestUpgrade.java  |   4 +
>  webapps/docs/changelog.xml |   4 +-
>  26 files changed, 489 insertions(+), 94 deletions(-)
> 
> diff --git a/java/org/apache/catalina/connector/Request.java 
> b/java/org/apache/catalina/connector/Request.java
> index 48e0167..2177a92 100644
> --- a/java/org/apache/catalina/connector/Request.java
> +++ b/java/org/apache/catalina/connector/Request.java
> @@ -2017,7 +2017,7 @@ public class Request implements HttpServletRequest {
>  throw new ServletException(e);
>  }
>  UpgradeToken upgradeToken = new UpgradeToken(handler,
> -getContext(), instanceManager);
> +getContext(), instanceManager, 
> response.getHeader("upgrade"));
>  
>  coyoteRequest.action(ActionCode.UPGRADE, upgradeToken);
>  
> diff --git a/java/org/apache/coyote/AbstractProtocol.java 
> b/java/org/apache/coyote/AbstractProtocol.java
> index 159531e..e3ce9d7 100644
> --- a/java/org/apache/coyote/AbstractProtocol.java
> +++ b/java/org/apache/coyote/AbstractProtocol.java
> @@ -559,13 +559,6 @@ public abstract class AbstractProtocol implements 
> ProtocolHandler,
>  endpoint.setDomain(domain);
>  
>  endpoint.init();
> -
> -UpgradeProtocol[] upgradeProtocols = findUpgradeProtocols();
> -for (UpgradeProtocol upgradeProtocol : upgradeProtocols) {
> -// Implementation note: Failure of one upgrade protocol fails the
> -// whole Connector
> -upgradeProtocol.init();
> -}
>  }
>  
>  
> @@ -679,16 +672,6 @@ public abstract class AbstractProtocol implements 
> ProtocolHandler,
>  logPortOffset();
>  }
>  
> -UpgradeProtocol[] upgradeProtocols = findUpgradeProtocols();
> -for (UpgradeProtocol upgradeProtocol : upgradeProtocols) {
> -try {
> -upgradeProtocol.destroy();
> -} catch (Throwable t) {
> -ExceptionUtils.handleThrowable(t);
> -
> getLog().error(sm.getString("abstractProtocol.upgradeProtocolDestroyError"), 
> t);
> -}
> -}
> -
>  try {
>  endpoint.destroy();
>  } finally {
> diff --git a/java/org/apache/coyote/LocalStrings.properties 
> b/java/org/apache/coyote/LocalStrings.properties
> index 43c8d64..83960cb 100644
> --- a/java/org/apache/coyote/LocalStrings.properties
> +++ b/java/org/apache/coyote/LocalStrings.properties
> @@ -36,7 +36,6 @@ abstractProcessor.socket.ssl=Exception getting SSL 
> attributes
>  abstractProtocol.mbeanDeregistrationFailed=Failed to deregister MBean named 
> [{0}] from MBean server [{1}]
>  abstractProtocol.processorRegisterError=Er

[tomcat] 01/02: Fix typo

2020-10-15 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 dbbba7bbe67bd1b1af7dd216d7566859f2b854ec
Author: Mark Thomas 
AuthorDate: Thu Oct 15 09:43:30 2020 +0100

Fix typo
---
 webapps/docs/changelog.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 1abb0ee..ed751ed 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -55,7 +55,7 @@
 Context. (markt)
   
   
-64805: Correct imports used by JMXPorxyServlet.
+64805: Correct imports used by JMXProxyServlet.
 (markt)
   
   


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



[tomcat] 02/02: Complete fix for BZ 63362. Collect stats for h2, websocket and upgrade

2020-10-15 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 c5e4066fc25c2b8611e476199d3361341c473257
Author: Mark Thomas 
AuthorDate: Thu Oct 15 09:45:47 2020 +0100

Complete fix for BZ 63362. Collect stats for h2, websocket and upgrade

https://bz.apache.org/bugzilla/show_bug.cgi?id=63362
---
 java/org/apache/catalina/connector/Request.java|   2 +-
 java/org/apache/coyote/AbstractProtocol.java   |  17 ---
 java/org/apache/coyote/LocalStrings.properties |   1 -
 java/org/apache/coyote/UpgradeProtocol.java|  22 
 java/org/apache/coyote/UpgradeToken.java   |   9 +-
 .../coyote/http11/AbstractHttp11Protocol.java  |  97 -
 java/org/apache/coyote/http11/Http11Processor.java |   2 +-
 .../apache/coyote/http11/LocalStrings.properties   |   2 +
 .../http11/upgrade/InternalHttpUpgradeHandler.java |   4 +
 .../coyote/http11/upgrade/UpgradeGroupInfo.java| 120 +
 .../apache/coyote/http11/upgrade/UpgradeInfo.java  |  96 +
 .../http11/upgrade/UpgradeProcessorExternal.java   |  14 ++-
 .../http11/upgrade/UpgradeProcessorInternal.java   |  12 ++-
 .../http11/upgrade/UpgradeServletInputStream.java  |  17 ++-
 .../http11/upgrade/UpgradeServletOutputStream.java |   7 +-
 java/org/apache/coyote/http2/Http2Protocol.java|  49 -
 .../apache/coyote/http2/LocalStrings.properties|   2 +
 java/org/apache/coyote/http2/StreamProcessor.java  |   6 +-
 java/org/apache/coyote/mbeans-descriptors.xml  |  30 ++
 java/org/apache/tomcat/websocket/WsFrameBase.java  |  13 +++
 .../tomcat/websocket/WsRemoteEndpointImplBase.java |  15 +++
 .../tomcat/websocket/server/WsFrameServer.java |  14 ++-
 .../websocket/server/WsHttpUpgradeHandler.java |  12 ++-
 .../server/WsRemoteEndpointImplServer.java |  12 ++-
 .../apache/coyote/http11/upgrade/TestUpgrade.java  |   4 +
 webapps/docs/changelog.xml |   4 +-
 26 files changed, 489 insertions(+), 94 deletions(-)

diff --git a/java/org/apache/catalina/connector/Request.java 
b/java/org/apache/catalina/connector/Request.java
index 48e0167..2177a92 100644
--- a/java/org/apache/catalina/connector/Request.java
+++ b/java/org/apache/catalina/connector/Request.java
@@ -2017,7 +2017,7 @@ public class Request implements HttpServletRequest {
 throw new ServletException(e);
 }
 UpgradeToken upgradeToken = new UpgradeToken(handler,
-getContext(), instanceManager);
+getContext(), instanceManager, response.getHeader("upgrade"));
 
 coyoteRequest.action(ActionCode.UPGRADE, upgradeToken);
 
diff --git a/java/org/apache/coyote/AbstractProtocol.java 
b/java/org/apache/coyote/AbstractProtocol.java
index 159531e..e3ce9d7 100644
--- a/java/org/apache/coyote/AbstractProtocol.java
+++ b/java/org/apache/coyote/AbstractProtocol.java
@@ -559,13 +559,6 @@ public abstract class AbstractProtocol implements 
ProtocolHandler,
 endpoint.setDomain(domain);
 
 endpoint.init();
-
-UpgradeProtocol[] upgradeProtocols = findUpgradeProtocols();
-for (UpgradeProtocol upgradeProtocol : upgradeProtocols) {
-// Implementation note: Failure of one upgrade protocol fails the
-// whole Connector
-upgradeProtocol.init();
-}
 }
 
 
@@ -679,16 +672,6 @@ public abstract class AbstractProtocol implements 
ProtocolHandler,
 logPortOffset();
 }
 
-UpgradeProtocol[] upgradeProtocols = findUpgradeProtocols();
-for (UpgradeProtocol upgradeProtocol : upgradeProtocols) {
-try {
-upgradeProtocol.destroy();
-} catch (Throwable t) {
-ExceptionUtils.handleThrowable(t);
-
getLog().error(sm.getString("abstractProtocol.upgradeProtocolDestroyError"), t);
-}
-}
-
 try {
 endpoint.destroy();
 } finally {
diff --git a/java/org/apache/coyote/LocalStrings.properties 
b/java/org/apache/coyote/LocalStrings.properties
index 43c8d64..83960cb 100644
--- a/java/org/apache/coyote/LocalStrings.properties
+++ b/java/org/apache/coyote/LocalStrings.properties
@@ -36,7 +36,6 @@ abstractProcessor.socket.ssl=Exception getting SSL attributes
 abstractProtocol.mbeanDeregistrationFailed=Failed to deregister MBean named 
[{0}] from MBean server [{1}]
 abstractProtocol.processorRegisterError=Error registering request processor
 abstractProtocol.processorUnregisterError=Error unregistering request processor
-abstractProtocol.upgradeProtocolDestroyError=Error destroying upgrade protocol
 abstractProtocol.waitingProcessor.add=Added processor [{0}] to waiting 
processors
 abstractProtocol.waitingProcessor.remove=Removed processor [{0}] from waiting 
processors
 
diff --git a/java/org/apache/coyote/UpgradeProtocol.java 

[tomcat] branch master updated (42a0841 -> c5e4066)

2020-10-15 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 42a0841  Add extended ErrorReportValve that returns response as JSON 
instead of HTML
 new dbbba7b  Fix typo
 new c5e4066  Complete fix for BZ 63362. Collect stats for h2, websocket 
and upgrade

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/catalina/connector/Request.java|   2 +-
 java/org/apache/coyote/AbstractProtocol.java   |  17 ---
 java/org/apache/coyote/LocalStrings.properties |   1 -
 java/org/apache/coyote/UpgradeProtocol.java|  22 
 java/org/apache/coyote/UpgradeToken.java   |   9 +-
 .../coyote/http11/AbstractHttp11Protocol.java  |  97 -
 java/org/apache/coyote/http11/Http11Processor.java |   2 +-
 .../apache/coyote/http11/LocalStrings.properties   |   2 +
 .../http11/upgrade/InternalHttpUpgradeHandler.java |   4 +
 .../coyote/http11/upgrade/UpgradeGroupInfo.java| 120 +
 .../apache/coyote/http11/upgrade/UpgradeInfo.java  |  96 +
 .../http11/upgrade/UpgradeProcessorExternal.java   |  14 ++-
 .../http11/upgrade/UpgradeProcessorInternal.java   |  12 ++-
 .../http11/upgrade/UpgradeServletInputStream.java  |  17 ++-
 .../http11/upgrade/UpgradeServletOutputStream.java |   7 +-
 java/org/apache/coyote/http2/Http2Protocol.java|  49 -
 .../apache/coyote/http2/LocalStrings.properties|   2 +
 java/org/apache/coyote/http2/StreamProcessor.java  |   6 +-
 java/org/apache/coyote/mbeans-descriptors.xml  |  30 ++
 java/org/apache/tomcat/websocket/WsFrameBase.java  |  13 +++
 .../tomcat/websocket/WsRemoteEndpointImplBase.java |  15 +++
 .../tomcat/websocket/server/WsFrameServer.java |  14 ++-
 .../websocket/server/WsHttpUpgradeHandler.java |  12 ++-
 .../server/WsRemoteEndpointImplServer.java |  12 ++-
 .../apache/coyote/http11/upgrade/TestUpgrade.java  |   4 +
 webapps/docs/changelog.xml |   6 +-
 26 files changed, 490 insertions(+), 95 deletions(-)
 create mode 100644 java/org/apache/coyote/http11/upgrade/UpgradeGroupInfo.java
 create mode 100644 java/org/apache/coyote/http11/upgrade/UpgradeInfo.java


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



Re: [Bug 60030] Run away CPU with JSSE / OpenSSL with IE8

2020-10-15 Thread Felix Schumacher
Account locked, spam reverted

Felix

Am 15.10.20 um 09:37 schrieb bugzi...@apache.org:
> https://bz.apache.org/bugzilla/show_bug.cgi?id=60030
>
> --- Comment #5 from ayumega  ---

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



[Bug 60030] Run away CPU with JSSE / OpenSSL with IE8

2020-10-15 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60030

--- Comment #5 from ayumega  ---
Untuk menang bermain judi online bukan berarti anda harus bermain di situs judi
terbaru yang buat di tahun ini terus anda menang. Anda harus juga melihat
provider yang membuat situs judi pkv terbaik. Memang benar pada dasarnya situs
qq baru biasanya sering memberikan nilai kemenangan besar guna menarik
pengunjung, Akan tetapi perlu juga anda perhatikan admin yang mengusung situs
tersebut. Jadi kami akan memberikan rekomendasi situs judi terbaru yang diusung
oleh admin situs qq terbaik dan terpercaya sebelumnya, dan dengan kemenangan
pasti diatas 98%.
Berikut ini adalah Agen Game Judi Indonesia Terpercaya
1. Poker 88
Diusung sebelum hadirnya lawanqq. Poker 88 terbukti memiliki banyak member
aktif semenjak awal peluncurannya. Hadir dengan 8 macam permainan kartu yang
memanjakan anda, https://199.192.31.67 seakan menjadikan nafas baru yang dirasa
bisa menjadi tambang yang baik untuk member menarik banyak keuntungan ketika
bermain judi poker 88 online.
Di Dewabet anda bisa Bermain Aneka Permanan Khas server IDN Games yaitu;
•   Domino 99 Kiu Kiu,
•   Texas Hold’Em Poker,
•   Bandar QQ,
•   Bandar 66,
•   Capsa Susun,
•   Bandar Poker,
•   Bandar 66, dan
•   AduQ,
2. DEWATOGELONLINE88
Dewatogelonline88 Merupakan Situs togel online Terbaru di akhir tahun 2019.
Situs Ini Berhasil Memperoleh banyak member dan memberikan banyak kemenangan
sehingga di akreditasi terbaik oleh banyak situs referensi untuk dimainkan.
http://www.dewatogelonline88.com/ merupakan Situs judi pkv terbaik dan yang
menjajikan kemenangan bermain di situs nya hingga 98%, Angka yang begitu
menjanjikan untuk kemenangan dalam permainan kartu online anda.
3. PokerAce
PokerAce  merupakan Agen Poker QQ Online Terbaik yang menyediakan semua jenis
permainan kartu di main gamenya. Hadir dengan dengan segala kemudahan sebagai
agen judi terpercaya, https://199.192.26.181  mengusung slogan mudah, murah dan
aman.
•   Mudah
PokerAce bisa dimainkan kapan saja dimana pun selama ada jaringan internet,
bahkan di android sekalipun
•   Murah
Dengan Minimal Deposit 25.000 saja anda sudah berkesempatan mendapatkan
kemenangan hingga jutaan rupiah dan bisa bermain di semua permainan yang
disediakan.
•   Aman
Permainan di PokerAce dijamin 100% fairplay.

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