buildbot success in on tomcat-trunk

2020-02-17 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/4947

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] 14245fd07fa9e52d3fe675b06d0cd3145eb3dd7b
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] branch 8.5.x updated: Fix (hopefully) intermittent Gump failure

2020-02-17 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 5d0da14  Fix (hopefully) intermittent Gump failure
5d0da14 is described below

commit 5d0da1447367dbd1c98f2fcbe674f5d55e4be2c5
Author: Mark Thomas 
AuthorDate: Mon Feb 17 16:57:57 2020 +

Fix (hopefully) intermittent Gump failure

result needs to be volatile because it is written from the container
thread and read from the test thread (like done)
---
 test/org/apache/catalina/core/TestAsyncContextImpl.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/org/apache/catalina/core/TestAsyncContextImpl.java 
b/test/org/apache/catalina/core/TestAsyncContextImpl.java
index 31942f5..b80c29a 100644
--- a/test/org/apache/catalina/core/TestAsyncContextImpl.java
+++ b/test/org/apache/catalina/core/TestAsyncContextImpl.java
@@ -311,7 +311,7 @@ public class TestAsyncContextImpl extends TomcatBaseTest {
 
 private volatile boolean done = false;
 
-private StringBuilder result;
+private volatile StringBuilder result;
 
 public static final long THREAD_SLEEP_TIME = 1000;
 


-
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 (hopefully) intermittent Gump failure

2020-02-17 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 75cec48  Fix (hopefully) intermittent Gump failure
75cec48 is described below

commit 75cec48b92d593b0beed19d3befedf86d497edfa
Author: Mark Thomas 
AuthorDate: Mon Feb 17 16:57:57 2020 +

Fix (hopefully) intermittent Gump failure

result needs to be volatile because it is written from the container
thread and read from the test thread (like done)
---
 test/org/apache/catalina/core/TestAsyncContextImpl.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/org/apache/catalina/core/TestAsyncContextImpl.java 
b/test/org/apache/catalina/core/TestAsyncContextImpl.java
index 8afe26f..008e208 100644
--- a/test/org/apache/catalina/core/TestAsyncContextImpl.java
+++ b/test/org/apache/catalina/core/TestAsyncContextImpl.java
@@ -307,7 +307,7 @@ public class TestAsyncContextImpl extends TomcatBaseTest {
 
 private volatile boolean done = false;
 
-private StringBuilder result;
+private volatile StringBuilder result;
 
 public static final long THREAD_SLEEP_TIME = 1000;
 


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



[tomcat] branch master updated: Fix (hopefully) intermittent Gump failure

2020-02-17 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 9144e85  Fix (hopefully) intermittent Gump failure
9144e85 is described below

commit 9144e854def9fe213382a87fca6d9c68ff3ed531
Author: Mark Thomas 
AuthorDate: Mon Feb 17 16:57:57 2020 +

Fix (hopefully) intermittent Gump failure

result needs to be volatile because it is written from the container
thread and read from the test thread (like done)
---
 test/org/apache/catalina/core/TestAsyncContextImpl.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/org/apache/catalina/core/TestAsyncContextImpl.java 
b/test/org/apache/catalina/core/TestAsyncContextImpl.java
index cd90776..80beac6 100644
--- a/test/org/apache/catalina/core/TestAsyncContextImpl.java
+++ b/test/org/apache/catalina/core/TestAsyncContextImpl.java
@@ -310,7 +310,7 @@ public class TestAsyncContextImpl extends TomcatBaseTest {
 
 private volatile boolean done = false;
 
-private StringBuilder result;
+private volatile StringBuilder result;
 
 public static final long THREAD_SLEEP_TIME = 1000;
 


-
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 (hopefully) intermittent Gump failure

2020-02-17 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 90b873e  Fix (hopefully) intermittent Gump failure
90b873e is described below

commit 90b873e791857a2d6327dc191d7a7469a831043b
Author: Mark Thomas 
AuthorDate: Mon Feb 17 16:57:57 2020 +

Fix (hopefully) intermittent Gump failure

result needs to be volatile because it is written from the container
thread and read from the test thread (like done)
---
 test/org/apache/catalina/core/TestAsyncContextImpl.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/org/apache/catalina/core/TestAsyncContextImpl.java 
b/test/org/apache/catalina/core/TestAsyncContextImpl.java
index e4a9b63..c768624 100644
--- a/test/org/apache/catalina/core/TestAsyncContextImpl.java
+++ b/test/org/apache/catalina/core/TestAsyncContextImpl.java
@@ -310,7 +310,7 @@ public class TestAsyncContextImpl extends TomcatBaseTest {
 
 private volatile boolean done = false;
 
-private StringBuilder result;
+private volatile StringBuilder result;
 
 public static final long THREAD_SLEEP_TIME = 1000;
 


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



[tomcat] branch master updated: Correctly handle inner classes (and fix failing test)

2020-02-17 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 14245fd  Correctly handle inner classes (and fix failing test)
14245fd is described below

commit 14245fd07fa9e52d3fe675b06d0cd3145eb3dd7b
Author: Mark Thomas 
AuthorDate: Mon Feb 17 16:41:05 2020 +

Correctly handle inner classes (and fix failing test)
---
 test/jakarta/el/TestImportHandlerStandardPackages.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/jakarta/el/TestImportHandlerStandardPackages.java 
b/test/jakarta/el/TestImportHandlerStandardPackages.java
index 203b3e4..b8e1aee 100644
--- a/test/jakarta/el/TestImportHandlerStandardPackages.java
+++ b/test/jakarta/el/TestImportHandlerStandardPackages.java
@@ -127,7 +127,7 @@ public class TestImportHandlerStandardPackages {
 // Skip directories
 continue;
 }
-Class clazz = Class.forName(packageName + "." + name);
+Class clazz = Class.forName(packageName + "." + 
name.replaceAll("\\.", "\\$"));
 if (!Modifier.isPublic(clazz.getModifiers())) {
 // Skip non-public classes
 continue;


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



[tomcat-connectors] 02/02: 1.2.47 release prep

2020-02-17 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-connectors.git

commit 00a87deb91e17f63f2cfcf566366ee85d7c1a828
Author: Mark Thomas 
AuthorDate: Mon Feb 17 15:59:14 2020 +

1.2.47 release prep
---
 xdocs/index.xml |  6 +++---
 xdocs/news/20200201.xml | 48 
 2 files changed, 51 insertions(+), 3 deletions(-)

diff --git a/xdocs/index.xml b/xdocs/index.xml
index 364080b..79bb0ec 100644
--- a/xdocs/index.xml
+++ b/xdocs/index.xml
@@ -63,12 +63,12 @@ manual is described in more detail below.
 
 
 
-JK-1.2.46 
released
+JK-1.2.47 
released
 The Apache Tomcat team is proud to announce the immediate availability
-   of Tomcat Connectors 1.2.46 Stable. This release contains improvements and
+   of Tomcat Connectors 1.2.47 Stable. This release contains improvements and
bug fixes for issues found in previous releases.

-Download the JK 1.2.46
+Download the JK 1.2.47
release.
 
 
diff --git a/xdocs/news/20200201.xml b/xdocs/news/20200201.xml
new file mode 100644
index 000..4b46745
--- /dev/null
+++ b/xdocs/news/20200201.xml
@@ -0,0 +1,48 @@
+
+
+
+]>
+
+
+  
+
+  
+Apache Tomcat Connectors 
Project
+2018 News  Status
+  
+
+
+
+
+
+
+The Apache Tomcat team is proud to announce the immediate availability
+   of Tomcat Connectors 1.2.47. This is a maintenance release.
+
+Please see the ChangeLog
+   for a full list of changes.
+
+If you find any bugs while using this release, please fill in the
+https://bz.apache.org/bugzilla/enter_bug.cgi?product=Tomcat%20Connectors;>Bugzilla
+Bug Report.
+
+
+
+
+


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



[tomcat-connectors] 01/02: svn -> git updates

2020-02-17 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-connectors.git

commit a8a7db6ce26c5d64fe974b9c8bb08681f6381313
Author: Mark Thomas 
AuthorDate: Mon Feb 17 15:59:02 2020 +

svn -> git updates
---
 HOWTO-RELEASE.txt | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/HOWTO-RELEASE.txt b/HOWTO-RELEASE.txt
index 5a090fe..57fdd2a 100644
--- a/HOWTO-RELEASE.txt
+++ b/HOWTO-RELEASE.txt
@@ -16,9 +16,9 @@
 How to do a mod_jk 1.2 Release
 ==
 
-Check out a clean copy of tomcat/connectors from subversion to
-make sure you don't have any lingering configure or build files.
-This will make sure that the source distribution created is clean.
+Clone a clean copy of tomcat/connectors from git to make sure you don't have
+any lingering configure or build files. This will make sure that the source
+distribution created is clean.
 
 We assume, that you cloned out g...@github.com:apache/tomcat-connectors.git
 to a directory named mod_jk. All further path names will be relative to this
@@ -77,12 +77,12 @@ Index: native/common/jk_version.h
  #define JK_VERRC0
  #define JK_RCSTRING "0"
 
-After updating revision numbers, commit your changes to subversion.
+After updating revision numbers, commit your changes to git.
 
-Tag and branch tomcat-connectors in subversion
---
+Tag tomcat-connectors in git
+
 
-Use the pattern below for branching and tagging the tomcat-connectors 
directory.
+Use the pattern below for tagging the tomcat-connectors directory.
 
 TAG=JK_{MAJOR_REVISION}_{MINOR_REVISION}_{RELEASE}
 


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



[tomcat-connectors] branch master updated (92b4bc1 -> 00a87de)

2020-02-17 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-connectors.git.


from 92b4bc1  Fix BZ 64051. Update session cookie on failover
 new a8a7db6  svn -> git updates
 new 00a87de  1.2.47 release prep

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:
 HOWTO-RELEASE.txt | 14 +++---
 xdocs/index.xml   |  6 +++---
 xdocs/news/{20160901.xml => 20200201.xml} | 11 ++-
 3 files changed, 16 insertions(+), 15 deletions(-)
 copy xdocs/news/{20160901.xml => 20200201.xml} (86%)


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



buildbot failure in on tomcat-trunk

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

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] 94cdbc3286765d0a86a07ee1268f5f03f9579478
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 64149] NullPointerException in AbstractAccessLogValve

2020-02-17 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64149

--- Comment #3 from Mark Thomas  ---
We need to find out why the NPE is occurring first. We don't want to mask a
symptom of a bug elsewhere. Better to see the NPE so we know there is a
problem. Hence the request for more info so we can figure out what is going on.

-- 
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: Refactor doOptions() to improve performance

2020-02-17 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 94cdbc3  Refactor doOptions() to improve performance
94cdbc3 is described below

commit 94cdbc3286765d0a86a07ee1268f5f03f9579478
Author: Mark Thomas 
AuthorDate: Mon Feb 17 14:10:43 2020 +

Refactor doOptions() to improve performance

Move the Tomcat specific hack to an inner class and do most of the
reflection once on first use rather than on every doOptions() call.
Cache the constant part of the allow value for options on first request
For 10,000,000 iterations this represents ~70x improvement.
As expected improvement is smaller for fewer iterations although it
is measureable from ~10 iterations upwards.
At very low (<5) iterations there is ~10% additional overhead.
Note: Users that really care about performance will implement their
  own doOptions() method
---
 java/jakarta/servlet/http/HttpServlet.java | 186 ++---
 .../servlet/http/TestHttpServletPerformance.java   |  70 
 webapps/docs/changelog.xml |   8 +
 3 files changed, 207 insertions(+), 57 deletions(-)

diff --git a/java/jakarta/servlet/http/HttpServlet.java 
b/java/jakarta/servlet/http/HttpServlet.java
index fff8468..56b4ce1 100644
--- a/java/jakarta/servlet/http/HttpServlet.java
+++ b/java/jakarta/servlet/http/HttpServlet.java
@@ -92,6 +92,9 @@ public abstract class HttpServlet extends GenericServlet {
 private static final ResourceBundle lStrings =
 ResourceBundle.getBundle(LSTRING_FILE);
 
+private final Object cachedAllowHeaderValueLock = new Object();
+private volatile String cachedAllowHeaderValue = null;
+
 
 /**
  * Does nothing, because this is an abstract class.
@@ -421,6 +424,89 @@ public abstract class HttpServlet extends GenericServlet {
 }
 
 
+private String getCachedAllowHeaderValue() {
+if (cachedAllowHeaderValue == null) {
+synchronized (cachedAllowHeaderValueLock) {
+if (cachedAllowHeaderValue == null) {
+
+Method[] methods = getAllDeclaredMethods(this.getClass());
+
+// RFC 7230 does not define an order for this header
+// This code aims to retain, broadly, the order of method
+// tokens returned in earlier versions of this code. If 
that
+// constraint is dropped then the code can be simplified
+// further.
+
+boolean allowGet = false;
+boolean allowHead = false;
+boolean allowPost = false;
+boolean allowPut = false;
+boolean allowDelete = false;
+
+for (int i = 0; i < methods.length; i++) {
+switch (methods[i].getName()) {
+case "doGet": {
+allowGet = true;
+allowHead = true;
+break;
+}
+case "doPost": {
+allowPost = true;
+break;
+}
+case "doPut": {
+allowPut = true;
+break;
+}
+case "doDelete": {
+allowDelete = true;
+break;
+}
+default:
+// NO-OP
+}
+
+}
+
+StringBuilder allow = new StringBuilder();
+
+if (allowGet) {
+allow.append(METHOD_GET);
+allow.append(", ");
+}
+
+if (allowHead) {
+allow.append(METHOD_HEAD);
+allow.append(", ");
+}
+
+if (allowPost) {
+allow.append(METHOD_POST);
+allow.append(", ");
+}
+
+if (allowPut) {
+allow.append(METHOD_PUT);
+allow.append(", ");
+}
+
+if (allowDelete) {
+allow.append(METHOD_DELETE);
+allow.append(", ");
+}
+
+// Options is always allowed
+allow.append(METHOD_OPTIONS);
+
+cachedAllowHeaderValue = allow.toString();
+}
+}
+}
+
+return 

[Bug 64149] NullPointerException in AbstractAccessLogValve

2020-02-17 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64149

--- Comment #2 from Roland Wachinger  ---
Sorry, can't help you with that atm as I don't have access. I'll see what I can
get.

Aside from that, I suppose a null check won't hurt?

-- 
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 64149] NullPointerException in AbstractAccessLogValve

2020-02-17 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64149

Remy Maucherat  changed:

   What|Removed |Added

 Status|NEW |NEEDINFO

--- Comment #1 from Remy Maucherat  ---
Please post the configuration.

-- 
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 64149] New: NullPointerException in AbstractAccessLogValve

2020-02-17 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64149

Bug ID: 64149
   Summary: NullPointerException in AbstractAccessLogValve
   Product: Tomcat 9
   Version: 9.0.31
  Hardware: PC
OS: Linux
Status: NEW
  Severity: regression
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: r...@is2.de
  Target Milestone: -

Hello,

we have a regression with version 9.0.31, it worked before with 9.0.30.

Cause seems to be this commit:
https://github.com/apache/tomcat/commit/fdcb3656239065654909ca55994787c027dbe583#diff-dc73b9f0609a4d3593f8a1f789ac1496


17-Feb-2020 09:45:56.925 SCHWERWIEGEND [catalina-exec-5]
org.apache.coyote.http11.Http11Processor.service Fehler bei der Verarbeitung
der Anfrage
java.lang.NullPointerException
at
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:685)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:367)
at
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1639)
at
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

Kind regards,
Roland

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



buildbot success in on tomcat-7-trunk

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

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

Buildslave for this Build: asf946_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-7-commit' 
triggered this build
Build Source Stamp: [branch 7.0.x] 8c2f5c829ef64edfb5cfe7624aa7e9e3770e1ce7
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] branch 7.0.x updated: 7.0.x doesn't have the Tomcat specific TRACE handling

2020-02-17 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 8c2f5c8  7.0.x doesn't have the Tomcat specific TRACE handling
8c2f5c8 is described below

commit 8c2f5c829ef64edfb5cfe7624aa7e9e3770e1ce7
Author: Mark Thomas 
AuthorDate: Mon Feb 17 11:25:41 2020 +

7.0.x doesn't have the Tomcat specific TRACE handling
---
 test/javax/servlet/http/TestHttpServlet.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/javax/servlet/http/TestHttpServlet.java 
b/test/javax/servlet/http/TestHttpServlet.java
index 76bc92e..80593d5 100644
--- a/test/javax/servlet/http/TestHttpServlet.java
+++ b/test/javax/servlet/http/TestHttpServlet.java
@@ -160,13 +160,13 @@ public class TestHttpServlet extends TomcatBaseTest {
 
 @Test
 public void testDoOptions() throws Exception {
-doTestDoOptions(new OptionsServlet(), "GET, HEAD, OPTIONS");
+doTestDoOptions(new OptionsServlet(), "GET, HEAD, TRACE, OPTIONS");
 }
 
 
 @Test
 public void testDoOptionsSub() throws Exception {
-doTestDoOptions(new OptionsServletSub(), "GET, HEAD, POST, OPTIONS");
+doTestDoOptions(new OptionsServletSub(), "GET, HEAD, POST, TRACE, 
OPTIONS");
 }
 
 


-
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 (ac15275 -> d7bd772)

2020-02-17 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 ac15275  Clean-up. Align with 8.5.x
 new 236bec6  Clean-up. Fix Javadoc warnings with newer JREs. Align with 
8.5.x.
 new d7bd772  Clean-up. Fix Javdoc warnings on newer JREs. Align with 8.5.x.

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/Response.java   |   3 +
 java/org/apache/catalina/core/ContainerBase.java   |  67 +--
 java/org/apache/catalina/core/StandardContext.java | 550 +
 3 files changed, 272 insertions(+), 348 deletions(-)


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



[tomcat] 02/02: Clean-up. Fix Javdoc warnings on newer JREs. Align with 8.5.x.

2020-02-17 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 d7bd7729b686929e33559e16635e8a235dcecf48
Author: Mark Thomas 
AuthorDate: Mon Feb 17 11:17:14 2020 +

Clean-up. Fix Javdoc warnings on newer JREs. Align with 8.5.x.
---
 java/org/apache/catalina/core/StandardContext.java | 550 +
 1 file changed, 244 insertions(+), 306 deletions(-)

diff --git a/java/org/apache/catalina/core/StandardContext.java 
b/java/org/apache/catalina/core/StandardContext.java
index 85a6147..d96deab 100644
--- a/java/org/apache/catalina/core/StandardContext.java
+++ b/java/org/apache/catalina/core/StandardContext.java
@@ -14,8 +14,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
-
 package org.apache.catalina.core;
 
 import java.io.BufferedReader;
@@ -201,7 +199,6 @@ public class StandardContext extends ContainerBase
 
 // - Instance Variables
 
-
 /**
  * Allow multipart/form-data requests to be parsed even when the
  * target servlet doesn't specify @MultipartConfig or have a
@@ -259,7 +256,6 @@ public class StandardContext extends ContainerBase
  * The set of application listeners that are required to have limited 
access
  * to ServletContext methods. See Servlet 3.0 section 4.4.
  */
-
 private final Set noPluggabilityListeners = new HashSet();
 
 /**
@@ -767,6 +763,7 @@ public class StandardContext extends ContainerBase
  */
 private boolean webXmlNamespaceAware = Globals.STRICT_SERVLET_COMPLIANCE;
 
+
 /**
  * Attribute value used to turn on/off TLD processing
  */
@@ -867,12 +864,10 @@ public class StandardContext extends ContainerBase
 /**
  * If an HttpClient keep-alive timer thread has been started by this web
  * application and is still running, should Tomcat change the context class
- * loader from the current
- * {@link org.apache.catalina.loader.WebappClassLoaderBase} to
- * {@link org.apache.catalina.loader.WebappClassLoaderBase#parent} to
- * prevent a memory leak? Note that the keep-alive timer thread will stop 
on
- * its own once the keep-alives all expire however, on a busy system that
- * might not happen for some time.
+ * loader from the current {@link ClassLoader} to
+ * {@link ClassLoader#getParent()} to prevent a memory leak? Note that the
+ * keep-alive timer thread will stop on its own once the keep-alives all
+ * expire however, on a busy system that might not happen for some time.
  */
 private boolean clearReferencesHttpClientKeepAliveThread = true;
 
@@ -880,7 +875,7 @@ public class StandardContext extends ContainerBase
  * Should Tomcat renew the threads of the thread pool when the application
  * is stopped to avoid memory leaks because of uncleaned ThreadLocal
  * variables. This also requires that the threadRenewalDelay property of 
the
- * StandardThreadExecutor of ThreadPoolExecutor be set to a positive value.
+ * StandardThreadExecutor or ThreadPoolExecutor be set to a positive value.
  */
 private boolean renewThreadsWhenStoppingContext = true;
 
@@ -1280,7 +1275,7 @@ public class StandardContext extends ContainerBase
 
 
 /**
- * Is caching allowed ?
+ * @return Is caching allowed?
  */
 public boolean isCachingAllowed() {
 return cachingAllowed;
@@ -1289,6 +1284,8 @@ public class StandardContext extends ContainerBase
 
 /**
  * Set caching allowed flag.
+ *
+ * @param cachingAllowed {@code true} to permit caching
  */
 public void setCachingAllowed(boolean cachingAllowed) {
 this.cachingAllowed = cachingAllowed;
@@ -1297,6 +1294,8 @@ public class StandardContext extends ContainerBase
 
 /**
  * Set allow linking.
+ *
+ * @param allowLinking {@code true} to permit linking
  */
 public void setAllowLinking(boolean allowLinking) {
 this.allowLinking = allowLinking;
@@ -1304,7 +1303,7 @@ public class StandardContext extends ContainerBase
 
 
 /**
- * Is linking allowed.
+ * @return Is linking allowed?
  */
 public boolean isAllowLinking() {
 return allowLinking;
@@ -1364,6 +1363,8 @@ public class StandardContext extends ContainerBase
 
 /**
  * Set cache TTL.
+ *
+ * @param cacheTTL Time between cache entry revalidation in milliseconds
  */
 public void setCacheTTL(int cacheTTL) {
 this.cacheTTL = cacheTTL;
@@ -1371,7 +1372,7 @@ public class StandardContext extends ContainerBase
 
 
 /**
- * Get cache TTL.
+ * @return cache TTL.
  */
 public int getCacheTTL() {
 return cacheTTL;
@@ -1379,7 +1380,7 @@ public class StandardContext extends ContainerBase
 
 
 /**
- * Return the maximum size of the cache 

[tomcat] 02/02: Clean-up. Align with 9.0.x

2020-02-17 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 2b31bed3a0951f77a5fae77e8fcf7e26ffa3ee7a
Author: Mark Thomas 
AuthorDate: Mon Feb 17 11:11:36 2020 +

Clean-up. Align with 9.0.x
---
 java/org/apache/catalina/core/StandardContext.java | 10 +++---
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/java/org/apache/catalina/core/StandardContext.java 
b/java/org/apache/catalina/core/StandardContext.java
index 80e6558..24a5296 100644
--- a/java/org/apache/catalina/core/StandardContext.java
+++ b/java/org/apache/catalina/core/StandardContext.java
@@ -3610,13 +3610,10 @@ public class StandardContext extends ContainerBase
  */
 @Override
 public String[] findServletMappings() {
-
 synchronized (servletMappingsLock) {
 String results[] = new String[servletMappings.size()];
-return
-   (servletMappings.keySet().toArray(results));
+return servletMappings.keySet().toArray(results);
 }
-
 }
 
 
@@ -5084,7 +5081,7 @@ public class StandardContext extends ContainerBase
 Boolean.valueOf((getCluster() != null)),
 Boolean.valueOf(distributable)));
 }
-if ( (getCluster() != null) && distributable) {
+if ((getCluster() != null) && distributable) {
 try {
 contextManager = 
getCluster().createManager(getName());
 } catch (Exception ex) {
@@ -6129,8 +6126,7 @@ public class StandardContext extends ContainerBase
 } else
 return false;
 }
-if ( (urlPattern.startsWith("/")) &&
-(urlPattern.indexOf("*.") < 0)) {
+if (urlPattern.startsWith("/") && !urlPattern.contains("*.")) {
 checkUnusualURLPattern(urlPattern);
 return true;
 } else


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



[tomcat] 01/02: Correct Javadoc comment

2020-02-17 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 cb7bc377100c4a1a06a0da9280a1bb9c42b41290
Author: Mark Thomas 
AuthorDate: Mon Feb 17 10:21:41 2020 +

Correct Javadoc comment
---
 java/org/apache/catalina/core/ContainerBase.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/core/ContainerBase.java 
b/java/org/apache/catalina/core/ContainerBase.java
index adc458b..4668c1a 100644
--- a/java/org/apache/catalina/core/ContainerBase.java
+++ b/java/org/apache/catalina/core/ContainerBase.java
@@ -1331,7 +1331,7 @@ public abstract class ContainerBase extends 
LifecycleMBeanBase
 // -- ContainerExecuteDelay Inner Class
 
 /**
- * Private thread class to invoke the backgroundProcess method
+ * Private runnable class to invoke the backgroundProcess method
  * of this container and its children after a fixed delay.
  */
 protected class ContainerBackgroundProcessor implements Runnable {
@@ -1397,7 +1397,7 @@ public abstract class ContainerBase extends 
LifecycleMBeanBase
 }
 
 
-// - Inner classes used with start/stop 
Executor
+//  Inner classes used with start/stop Executor
 
 private static class StartChild implements Callable {
 


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



[tomcat] 01/02: Clean-up. Fix Javadoc warnings with newer JREs. Align with 8.5.x.

2020-02-17 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 236bec697747762a1147f8039f2fd36d6ec0dfad
Author: Mark Thomas 
AuthorDate: Mon Feb 17 10:22:18 2020 +

Clean-up. Fix Javadoc warnings with newer JREs. Align with 8.5.x.
---
 java/org/apache/catalina/connector/Response.java |  3 ++
 java/org/apache/catalina/core/ContainerBase.java | 67 +---
 2 files changed, 28 insertions(+), 42 deletions(-)

diff --git a/java/org/apache/catalina/connector/Response.java 
b/java/org/apache/catalina/connector/Response.java
index 14182f1..61ecf0e 100644
--- a/java/org/apache/catalina/connector/Response.java
+++ b/java/org/apache/catalina/connector/Response.java
@@ -944,6 +944,9 @@ public class Response implements HttpServletResponse {
  * Reset this response, and specify the values for the HTTP status code
  * and corresponding message.
  *
+ * @param status The new HTTP status
+ * @param message The associated text message
+ *
  * @exception IllegalStateException if this response has already been
  *  committed
  */
diff --git a/java/org/apache/catalina/core/ContainerBase.java 
b/java/org/apache/catalina/core/ContainerBase.java
index f22f4f6..9a48670 100644
--- a/java/org/apache/catalina/core/ContainerBase.java
+++ b/java/org/apache/catalina/core/ContainerBase.java
@@ -304,6 +304,7 @@ public abstract class ContainerBase extends 
LifecycleMBeanBase
 private int startStopThreads = 1;
 protected ThreadPoolExecutor startStopExecutor;
 
+
 // - Properties
 
 @Override
@@ -475,12 +476,10 @@ public abstract class ContainerBase extends 
LifecycleMBeanBase
  */
 @Override
 public Log getLogger() {
-
 if (logger != null)
-return (logger);
+return logger;
 logger = LogFactory.getLog(logName());
-return (logger);
-
+return logger;
 }
 
 
@@ -621,6 +620,7 @@ public abstract class ContainerBase extends 
LifecycleMBeanBase
  */
 @Override
 public void setCluster(Cluster cluster) {
+
 Cluster oldCluster = null;
 Lock writeLock = clusterLock.writeLock();
 writeLock.lock();
@@ -633,7 +633,7 @@ public abstract class ContainerBase extends 
LifecycleMBeanBase
 
 // Stop the old component if necessary
 if (getState().isAvailable() && (oldCluster != null) &&
-(oldCluster instanceof Lifecycle)) {
+(oldCluster instanceof Lifecycle)) {
 try {
 ((Lifecycle) oldCluster).stop();
 } catch (LifecycleException e) {
@@ -669,9 +669,7 @@ public abstract class ContainerBase extends 
LifecycleMBeanBase
  */
 @Override
 public String getName() {
-
-return (name);
-
+return name;
 }
 
 
@@ -700,11 +698,11 @@ public abstract class ContainerBase extends 
LifecycleMBeanBase
 /**
  * Return if children of this container will be started automatically when
  * they are added to this container.
+ *
+ * @return true if the children will be started
  */
 public boolean getStartChildren() {
-
-return (startChildren);
-
+return startChildren;
 }
 
 
@@ -728,9 +726,7 @@ public abstract class ContainerBase extends 
LifecycleMBeanBase
  */
 @Override
 public Container getParent() {
-
-return (parent);
-
+return parent;
 }
 
 
@@ -763,12 +759,11 @@ public abstract class ContainerBase extends 
LifecycleMBeanBase
 @Override
 public ClassLoader getParentClassLoader() {
 if (parentClassLoader != null)
-return (parentClassLoader);
+return parentClassLoader;
 if (parent != null) {
-return (parent.getParentClassLoader());
+return parent.getParentClassLoader();
 }
-return (ClassLoader.getSystemClassLoader());
-
+return ClassLoader.getSystemClassLoader();
 }
 
 
@@ -797,9 +792,7 @@ public abstract class ContainerBase extends 
LifecycleMBeanBase
  */
 @Override
 public Pipeline getPipeline() {
-
-return (this.pipeline);
-
+return this.pipeline;
 }
 
 
@@ -812,12 +805,12 @@ public abstract class ContainerBase extends 
LifecycleMBeanBase
 public Realm getRealm() {
 
 Lock l = realmLock.readLock();
+l.lock();
 try {
-l.lock();
 if (realm != null)
-return (realm);
+return realm;
 if (parent != null)
-return (parent.getRealm());
+return parent.getRealm();
 return null;
 } finally {
 l.unlock();
@@ -827,8 +820,8 @@ public abstract class ContainerBase extends 
LifecycleMBeanBase
 
 protected Realm getRealmInternal() {
  

[tomcat] branch 8.5.x updated (b911432 -> 2b31bed)

2020-02-17 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 b911432  clean-up
 new cb7bc37  Correct Javadoc comment
 new 2b31bed  Clean-up. Align with 9.0.x

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/core/ContainerBase.java   |  4 ++--
 java/org/apache/catalina/core/StandardContext.java | 10 +++---
 2 files changed, 5 insertions(+), 9 deletions(-)


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



buildbot failure in on tomcat-7-trunk

2020-02-17 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-7-trunk while 
building tomcat. Full details are available at:
https://ci.apache.org/builders/tomcat-7-trunk/builds/1603

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

Buildslave for this Build: asf946_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-7-commit' 
triggered this build
Build Source Stamp: [branch 7.0.x] ac15275a07892815b3376d081f1898c226e52a26
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



[tomcat] 04/04: Clean-up. Align with 8.5.x

2020-02-17 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 ac15275a07892815b3376d081f1898c226e52a26
Author: Mark Thomas 
AuthorDate: Mon Feb 17 10:03:27 2020 +

Clean-up. Align with 8.5.x
---
 test/javax/servlet/http/TestHttpServlet.java | 8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/test/javax/servlet/http/TestHttpServlet.java 
b/test/javax/servlet/http/TestHttpServlet.java
index f3e643d..76bc92e 100644
--- a/test/javax/servlet/http/TestHttpServlet.java
+++ b/test/javax/servlet/http/TestHttpServlet.java
@@ -41,8 +41,7 @@ public class TestHttpServlet extends TomcatBaseTest {
 Tomcat tomcat = getTomcatInstance();
 
 // No file system docBase required
-StandardContext ctx = (StandardContext)
-tomcat.addContext("", null);
+StandardContext ctx = (StandardContext) tomcat.addContext("", null);
 
 // Map the test Servlet
 LargeBodyServlet largeBodyServlet = new LargeBodyServlet();
@@ -51,8 +50,7 @@ public class TestHttpServlet extends TomcatBaseTest {
 
 tomcat.start();
 
-Map> resHeaders=
-new HashMap>();
+Map> resHeaders= new HashMap>();
 int rc = headUrl("http://localhost:; + getPort() + "/", new 
ByteChunk(),
resHeaders);
 
@@ -75,7 +73,7 @@ public class TestHttpServlet extends TomcatBaseTest {
 }
 
 
-/**
+/*
  * Verifies that the same Content-Length is returned for both GET and HEAD
  * operations when a Servlet includes content from another Servlet
  */


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



[tomcat] 03/04: Test case for OPTIONS request on a sub-class

2020-02-17 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 1dddab93b0b29da4250a20a41d723c451f47920d
Author: Mark Thomas 
AuthorDate: Mon Feb 17 09:37:12 2020 +

Test case for OPTIONS request on a sub-class
---
 test/javax/servlet/http/TestHttpServlet.java | 61 
 1 file changed, 61 insertions(+)

diff --git a/test/javax/servlet/http/TestHttpServlet.java 
b/test/javax/servlet/http/TestHttpServlet.java
index d7e78d8..f3e643d 100644
--- a/test/javax/servlet/http/TestHttpServlet.java
+++ b/test/javax/servlet/http/TestHttpServlet.java
@@ -22,6 +22,7 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import javax.servlet.Servlet;
 import javax.servlet.ServletException;
 
 import org.junit.Assert;
@@ -159,6 +160,39 @@ public class TestHttpServlet extends TomcatBaseTest {
 }
 
 
+@Test
+public void testDoOptions() throws Exception {
+doTestDoOptions(new OptionsServlet(), "GET, HEAD, OPTIONS");
+}
+
+
+@Test
+public void testDoOptionsSub() throws Exception {
+doTestDoOptions(new OptionsServletSub(), "GET, HEAD, POST, OPTIONS");
+}
+
+
+private void doTestDoOptions(Servlet servlet, String expectedAllow) throws 
Exception{
+Tomcat tomcat = getTomcatInstance();
+
+// No file system docBase required
+StandardContext ctx = (StandardContext) tomcat.addContext("", null);
+
+// Map the test Servlet
+Tomcat.addServlet(ctx, "servlet", servlet);
+ctx.addServletMapping("/", "servlet");
+
+tomcat.start();
+
+Map> resHeaders= new 
HashMap>();
+int rc = methodUrl("http://localhost:; + getPort() + "/", new 
ByteChunk(),
+   DEFAULT_CLIENT_TIMEOUT_MS, null, resHeaders, "OPTIONS");
+
+Assert.assertEquals(HttpServletResponse.SC_OK, rc);
+Assert.assertEquals(expectedAllow, resHeaders.get("Allow").get(0));
+}
+
+
 private static class Bug57602ServletOuter extends HttpServlet {
 
 private static final long serialVersionUID = 1L;
@@ -206,4 +240,31 @@ public class TestHttpServlet extends TomcatBaseTest {
 pw.println("Data");
 }
 }
+
+
+private static class OptionsServlet extends HttpServlet {
+
+private static final long serialVersionUID = 1L;
+
+@Override
+protected void doGet(HttpServletRequest req, HttpServletResponse resp)
+throws ServletException, IOException {
+resp.setContentType("text/plain");
+resp.setCharacterEncoding("UTF-8");
+PrintWriter pw = resp.getWriter();
+pw.print("OK");
+}
+}
+
+
+private static class OptionsServletSub extends OptionsServlet {
+
+private static final long serialVersionUID = 1L;
+
+@Override
+protected void doPost(HttpServletRequest req, HttpServletResponse resp)
+throws ServletException, IOException {
+doGet(req, resp);
+}
+}
 }


-
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 (e7ea351 -> b911432)

2020-02-17 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 e7ea351  Test case for OPTIONS request on a sub-class
 new 3256af8  Fix typo
 new b911432  clean-up

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/javax/servlet/http/HttpServlet.java | 2 +-
 test/javax/servlet/http/TestHttpServlet.java | 2 --
 2 files changed, 1 insertion(+), 3 deletions(-)


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



[tomcat] 02/04: Fix HEAD response when chunking is used

2020-02-17 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 c42c1e5a41392b6feb82f790d919dd2cf32b83ce
Author: Mark Thomas 
AuthorDate: Mon Feb 17 10:00:30 2020 +

Fix HEAD response when chunking is used

Ensure that the HEAD response is consistent with the GET response when
HttpServlet is relied upon to generate the HEAD response and the GET
response uses chunking.
---
 java/javax/servlet/http/HttpServlet.java   | 19 +--
 test/javax/servlet/http/TestHttpServlet.java   | 63 ++
 .../apache/catalina/startup/TomcatBaseTest.java|  9 +++-
 webapps/docs/changelog.xml |  5 ++
 4 files changed, 90 insertions(+), 6 deletions(-)

diff --git a/java/javax/servlet/http/HttpServlet.java 
b/java/javax/servlet/http/HttpServlet.java
index fa69ef5..28c2dc8 100644
--- a/java/javax/servlet/http/HttpServlet.java
+++ b/java/javax/servlet/http/HttpServlet.java
@@ -745,7 +745,7 @@ class NoBodyResponse extends HttpServletResponseWrapper {
 // file private
 NoBodyResponse(HttpServletResponse r) {
 super(r);
-noBody = new NoBodyOutputStream();
+noBody = new NoBodyOutputStream(this);
 }
 
 // file private
@@ -828,11 +828,13 @@ class NoBodyOutputStream extends ServletOutputStream {
 private static final ResourceBundle lStrings =
 ResourceBundle.getBundle(LSTRING_FILE);
 
+private final HttpServletResponse response;
+private boolean flushed = false;
 private int contentLength = 0;
 
 // file private
-NoBodyOutputStream() {
-// NOOP
+NoBodyOutputStream(HttpServletResponse response) {
+this.response = response;
 }
 
 // file private
@@ -841,8 +843,9 @@ class NoBodyOutputStream extends ServletOutputStream {
 }
 
 @Override
-public void write(int b) {
+public void write(int b) throws IOException {
 contentLength++;
+checkCommit();
 }
 
 @Override
@@ -863,5 +866,13 @@ class NoBodyOutputStream extends ServletOutputStream {
 }
 
 contentLength += len;
+checkCommit();
+}
+
+private void checkCommit() throws IOException {
+if (!flushed && contentLength > response.getBufferSize()) {
+response.flushBuffer();
+flushed = true;
+}
 }
 }
diff --git a/test/javax/servlet/http/TestHttpServlet.java 
b/test/javax/servlet/http/TestHttpServlet.java
index 2190baa..d7e78d8 100644
--- a/test/javax/servlet/http/TestHttpServlet.java
+++ b/test/javax/servlet/http/TestHttpServlet.java
@@ -28,6 +28,7 @@ import org.junit.Assert;
 import org.junit.Test;
 
 import org.apache.catalina.core.StandardContext;
+import org.apache.catalina.startup.CaseInsensitiveKeyMap;
 import org.apache.catalina.startup.Tomcat;
 import org.apache.catalina.startup.TomcatBaseTest;
 import org.apache.tomcat.util.buf.ByteChunk;
@@ -113,6 +114,51 @@ public class TestHttpServlet extends TomcatBaseTest {
 }
 
 
+@Test
+public void testChunkingWithHead() throws Exception {
+Tomcat tomcat = getTomcatInstance();
+
+// No file system docBase required
+StandardContext ctx = (StandardContext) tomcat.addContext("", null);
+
+ChunkingServlet s = new ChunkingServlet();
+Tomcat.addServlet(ctx, "ChunkingServlet", s);
+ctx.addServletMapping("/chunking", "ChunkingServlet");
+
+tomcat.start();
+
+Map> getHeaders = new 
CaseInsensitiveKeyMap>();
+String path = "http://localhost:; + getPort() + "/chunking";
+ByteChunk out = new ByteChunk();
+
+int rc = getUrl(path, out, getHeaders);
+Assert.assertEquals(HttpServletResponse.SC_OK, rc);
+out.recycle();
+
+Map> headHeaders = new 
HashMap>();
+rc = headUrl(path, out, headHeaders);
+Assert.assertEquals(HttpServletResponse.SC_OK, rc);
+
+// Headers should be the same (apart from Date)
+Assert.assertEquals(getHeaders.size(), headHeaders.size());
+for (Map.Entry> getHeader : 
getHeaders.entrySet()) {
+String headerName = getHeader.getKey();
+if ("date".equalsIgnoreCase(headerName)) {
+continue;
+}
+Assert.assertTrue(headerName, headHeaders.containsKey(headerName));
+List getValues = getHeader.getValue();
+List headValues = headHeaders.get(headerName);
+Assert.assertEquals(getValues.size(), headValues.size());
+for (String value : getValues) {
+Assert.assertTrue(headValues.contains(value));
+}
+}
+
+tomcat.stop();
+}
+
+
 private static class Bug57602ServletOuter extends HttpServlet {
 
 private static final long serialVersionUID = 1L;
@@ -143,4 +189,21 @@ public class TestHttpServlet extends TomcatBaseTest {
 

[tomcat] 02/02: clean-up

2020-02-17 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 b91143221e4fe12d95373afcfe4818c4e6660220
Author: Mark Thomas 
AuthorDate: Mon Feb 17 10:05:09 2020 +

clean-up
---
 test/javax/servlet/http/TestHttpServlet.java | 2 --
 1 file changed, 2 deletions(-)

diff --git a/test/javax/servlet/http/TestHttpServlet.java 
b/test/javax/servlet/http/TestHttpServlet.java
index 8de9d9f..28be42d 100644
--- a/test/javax/servlet/http/TestHttpServlet.java
+++ b/test/javax/servlet/http/TestHttpServlet.java
@@ -158,8 +158,6 @@ public class TestHttpServlet extends TomcatBaseTest {
 }
 
 
-
-
 @Test
 public void testDoOptions() throws Exception {
 doTestDoOptions(new OptionsServlet(), "GET, HEAD, OPTIONS");


-
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: Clean-up

2020-02-17 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 cea039c  Clean-up
cea039c is described below

commit cea039c72a278716b5dc7cb12c71465f05b29a11
Author: Mark Thomas 
AuthorDate: Mon Feb 17 10:03:52 2020 +

Clean-up
---
 test/javax/servlet/http/TestHttpServlet.java | 2 --
 1 file changed, 2 deletions(-)

diff --git a/test/javax/servlet/http/TestHttpServlet.java 
b/test/javax/servlet/http/TestHttpServlet.java
index 8de9d9f..28be42d 100644
--- a/test/javax/servlet/http/TestHttpServlet.java
+++ b/test/javax/servlet/http/TestHttpServlet.java
@@ -158,8 +158,6 @@ public class TestHttpServlet extends TomcatBaseTest {
 }
 
 
-
-
 @Test
 public void testDoOptions() throws Exception {
 doTestDoOptions(new OptionsServlet(), "GET, HEAD, OPTIONS");


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



[Bug 64141] APR SSL: Required certificate verification uses -Djavax.net.ssl.trustStore instead of caCertificateFile

2020-02-17 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64141

--- Comment #7 from Martin Wegner  ---
(In reply to Remy Maucherat from comment #6)
> Since the TLS configuration types for the properties are not the same, it
> seemed possible to fix it. The fix will be in 10.0.0-M2, 9.0.32 and 8.5.52.

Thank you, looks good to me. I will test it after the release of 8.5.52.

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

2020-02-17 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 3256af87d3df9e66dbd8d4cb9bd439fdca443f94
Author: Mark Thomas 
AuthorDate: Mon Feb 17 10:05:00 2020 +

Fix typo
---
 java/javax/servlet/http/HttpServlet.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/javax/servlet/http/HttpServlet.java 
b/java/javax/servlet/http/HttpServlet.java
index f28eac3..aedbee6 100644
--- a/java/javax/servlet/http/HttpServlet.java
+++ b/java/javax/servlet/http/HttpServlet.java
@@ -447,7 +447,7 @@ public abstract class HttpServlet extends GenericServlet {
 
 /**
  * Called by the server (via the service method)
- * to allow a servlet to handle a OPTIONS request.
+ * to allow a servlet to handle an OPTIONS request.
  *
  * The OPTIONS request determines which HTTP methods
  * the server supports and


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



[tomcat] 01/04: Fix comment typo

2020-02-17 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 9343daed837bc290b2766bfdf49bce53e92ff744
Author: Mark Thomas 
AuthorDate: Mon Feb 17 09:53:36 2020 +

Fix comment typo
---
 java/javax/servlet/http/HttpServlet.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/javax/servlet/http/HttpServlet.java 
b/java/javax/servlet/http/HttpServlet.java
index 8478e4c..fa69ef5 100644
--- a/java/javax/servlet/http/HttpServlet.java
+++ b/java/javax/servlet/http/HttpServlet.java
@@ -446,7 +446,7 @@ public abstract class HttpServlet extends GenericServlet {
 
 /**
  * Called by the server (via the service method)
- * to allow a servlet to handle a OPTIONS request.
+ * to allow a servlet to handle an OPTIONS request.
  *
  * The OPTIONS request determines which HTTP methods
  * the server supports and


-
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 (53d1c1f -> ac15275)

2020-02-17 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 53d1c1f  Update Tomcat 7.0.100 release date
 new 9343dae  Fix comment typo
 new c42c1e5  Fix HEAD response when chunking is used
 new 1dddab9  Test case for OPTIONS request on a sub-class
 new ac15275  Clean-up. Align with 8.5.x

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


Summary of changes:
 java/javax/servlet/http/HttpServlet.java   |  21 +++-
 test/javax/servlet/http/TestHttpServlet.java   | 132 -
 .../apache/catalina/startup/TomcatBaseTest.java|   9 +-
 webapps/docs/changelog.xml |   5 +
 4 files changed, 155 insertions(+), 12 deletions(-)


-
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: Test case for OPTIONS request on a sub-class

2020-02-17 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 e7ea351  Test case for OPTIONS request on a sub-class
e7ea351 is described below

commit e7ea351e70b3ed480a4942a61e58e61e6069569c
Author: Mark Thomas 
AuthorDate: Mon Feb 17 09:37:12 2020 +

Test case for OPTIONS request on a sub-class
---
 test/javax/servlet/http/TestHttpServlet.java | 63 
 1 file changed, 63 insertions(+)

diff --git a/test/javax/servlet/http/TestHttpServlet.java 
b/test/javax/servlet/http/TestHttpServlet.java
index 8c03ee3..8de9d9f 100644
--- a/test/javax/servlet/http/TestHttpServlet.java
+++ b/test/javax/servlet/http/TestHttpServlet.java
@@ -22,6 +22,7 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import javax.servlet.Servlet;
 import javax.servlet.ServletException;
 
 import org.junit.Assert;
@@ -157,6 +158,41 @@ public class TestHttpServlet extends TomcatBaseTest {
 }
 
 
+
+
+@Test
+public void testDoOptions() throws Exception {
+doTestDoOptions(new OptionsServlet(), "GET, HEAD, OPTIONS");
+}
+
+
+@Test
+public void testDoOptionsSub() throws Exception {
+doTestDoOptions(new OptionsServletSub(), "GET, HEAD, POST, OPTIONS");
+}
+
+
+private void doTestDoOptions(Servlet servlet, String expectedAllow) throws 
Exception{
+Tomcat tomcat = getTomcatInstance();
+
+// No file system docBase required
+StandardContext ctx = (StandardContext) tomcat.addContext("", null);
+
+// Map the test Servlet
+Tomcat.addServlet(ctx, "servlet", servlet);
+ctx.addServletMappingDecoded("/", "servlet");
+
+tomcat.start();
+
+Map> resHeaders= new HashMap<>();
+int rc = methodUrl("http://localhost:; + getPort() + "/", new 
ByteChunk(),
+   DEFAULT_CLIENT_TIMEOUT_MS, null, resHeaders, "OPTIONS");
+
+Assert.assertEquals(HttpServletResponse.SC_OK, rc);
+Assert.assertEquals(expectedAllow, resHeaders.get("Allow").get(0));
+}
+
+
 private static class Bug57602ServletOuter extends HttpServlet {
 
 private static final long serialVersionUID = 1L;
@@ -204,4 +240,31 @@ public class TestHttpServlet extends TomcatBaseTest {
 pw.println("Data");
 }
 }
+
+
+private static class OptionsServlet extends HttpServlet {
+
+private static final long serialVersionUID = 1L;
+
+@Override
+protected void doGet(HttpServletRequest req, HttpServletResponse resp)
+throws ServletException, IOException {
+resp.setContentType("text/plain");
+resp.setCharacterEncoding("UTF-8");
+PrintWriter pw = resp.getWriter();
+pw.print("OK");
+}
+}
+
+
+private static class OptionsServletSub extends OptionsServlet {
+
+private static final long serialVersionUID = 1L;
+
+@Override
+protected void doPost(HttpServletRequest req, HttpServletResponse resp)
+throws ServletException, IOException {
+doGet(req, resp);
+}
+}
 }


-
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: Test case for OPTIONS request on a sub-class

2020-02-17 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 b206ba6  Test case for OPTIONS request on a sub-class
b206ba6 is described below

commit b206ba69e9a196ab5274abb962ee0a448bf0fd9a
Author: Mark Thomas 
AuthorDate: Mon Feb 17 09:37:12 2020 +

Test case for OPTIONS request on a sub-class
---
 test/javax/servlet/http/TestHttpServlet.java | 63 
 1 file changed, 63 insertions(+)

diff --git a/test/javax/servlet/http/TestHttpServlet.java 
b/test/javax/servlet/http/TestHttpServlet.java
index 8c03ee3..8de9d9f 100644
--- a/test/javax/servlet/http/TestHttpServlet.java
+++ b/test/javax/servlet/http/TestHttpServlet.java
@@ -22,6 +22,7 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import javax.servlet.Servlet;
 import javax.servlet.ServletException;
 
 import org.junit.Assert;
@@ -157,6 +158,41 @@ public class TestHttpServlet extends TomcatBaseTest {
 }
 
 
+
+
+@Test
+public void testDoOptions() throws Exception {
+doTestDoOptions(new OptionsServlet(), "GET, HEAD, OPTIONS");
+}
+
+
+@Test
+public void testDoOptionsSub() throws Exception {
+doTestDoOptions(new OptionsServletSub(), "GET, HEAD, POST, OPTIONS");
+}
+
+
+private void doTestDoOptions(Servlet servlet, String expectedAllow) throws 
Exception{
+Tomcat tomcat = getTomcatInstance();
+
+// No file system docBase required
+StandardContext ctx = (StandardContext) tomcat.addContext("", null);
+
+// Map the test Servlet
+Tomcat.addServlet(ctx, "servlet", servlet);
+ctx.addServletMappingDecoded("/", "servlet");
+
+tomcat.start();
+
+Map> resHeaders= new HashMap<>();
+int rc = methodUrl("http://localhost:; + getPort() + "/", new 
ByteChunk(),
+   DEFAULT_CLIENT_TIMEOUT_MS, null, resHeaders, "OPTIONS");
+
+Assert.assertEquals(HttpServletResponse.SC_OK, rc);
+Assert.assertEquals(expectedAllow, resHeaders.get("Allow").get(0));
+}
+
+
 private static class Bug57602ServletOuter extends HttpServlet {
 
 private static final long serialVersionUID = 1L;
@@ -204,4 +240,31 @@ public class TestHttpServlet extends TomcatBaseTest {
 pw.println("Data");
 }
 }
+
+
+private static class OptionsServlet extends HttpServlet {
+
+private static final long serialVersionUID = 1L;
+
+@Override
+protected void doGet(HttpServletRequest req, HttpServletResponse resp)
+throws ServletException, IOException {
+resp.setContentType("text/plain");
+resp.setCharacterEncoding("UTF-8");
+PrintWriter pw = resp.getWriter();
+pw.print("OK");
+}
+}
+
+
+private static class OptionsServletSub extends OptionsServlet {
+
+private static final long serialVersionUID = 1L;
+
+@Override
+protected void doPost(HttpServletRequest req, HttpServletResponse resp)
+throws ServletException, IOException {
+doGet(req, resp);
+}
+}
 }


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



[tomcat] branch master updated: Test case for OPTIONS request on a sub-class

2020-02-17 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 445251f  Test case for OPTIONS request on a sub-class
445251f is described below

commit 445251f4d46d6718a991ec21e0ea545b63dcc2b7
Author: Mark Thomas 
AuthorDate: Mon Feb 17 09:32:46 2020 +

Test case for OPTIONS request on a sub-class
---
 test/jakarta/servlet/http/TestHttpServlet.java | 61 ++
 1 file changed, 61 insertions(+)

diff --git a/test/jakarta/servlet/http/TestHttpServlet.java 
b/test/jakarta/servlet/http/TestHttpServlet.java
index de2ae94..2473799 100644
--- a/test/jakarta/servlet/http/TestHttpServlet.java
+++ b/test/jakarta/servlet/http/TestHttpServlet.java
@@ -22,6 +22,7 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import jakarta.servlet.Servlet;
 import jakarta.servlet.ServletException;
 
 import org.junit.Assert;
@@ -157,6 +158,39 @@ public class TestHttpServlet extends TomcatBaseTest {
 }
 
 
+@Test
+public void testDoOptions() throws Exception {
+doTestDoOptions(new OptionsServlet(), "GET, HEAD, OPTIONS");
+}
+
+
+@Test
+public void testDoOptionsSub() throws Exception {
+doTestDoOptions(new OptionsServletSub(), "GET, HEAD, POST, OPTIONS");
+}
+
+
+private void doTestDoOptions(Servlet servlet, String expectedAllow) throws 
Exception{
+Tomcat tomcat = getTomcatInstance();
+
+// No file system docBase required
+StandardContext ctx = (StandardContext) tomcat.addContext("", null);
+
+// Map the test Servlet
+Tomcat.addServlet(ctx, "servlet", servlet);
+ctx.addServletMappingDecoded("/", "servlet");
+
+tomcat.start();
+
+Map> resHeaders= new HashMap<>();
+int rc = methodUrl("http://localhost:; + getPort() + "/", new 
ByteChunk(),
+   DEFAULT_CLIENT_TIMEOUT_MS, null, resHeaders, "OPTIONS");
+
+Assert.assertEquals(HttpServletResponse.SC_OK, rc);
+Assert.assertEquals(expectedAllow, resHeaders.get("Allow").get(0));
+}
+
+
 private static class Bug57602ServletOuter extends HttpServlet {
 
 private static final long serialVersionUID = 1L;
@@ -204,4 +238,31 @@ public class TestHttpServlet extends TomcatBaseTest {
 pw.println("Data");
 }
 }
+
+
+private static class OptionsServlet extends HttpServlet {
+
+private static final long serialVersionUID = 1L;
+
+@Override
+protected void doGet(HttpServletRequest req, HttpServletResponse resp)
+throws ServletException, IOException {
+resp.setContentType("text/plain");
+resp.setCharacterEncoding("UTF-8");
+PrintWriter pw = resp.getWriter();
+pw.print("OK");
+}
+}
+
+
+private static class OptionsServletSub extends OptionsServlet {
+
+private static final long serialVersionUID = 1L;
+
+@Override
+protected void doPost(HttpServletRequest req, HttpServletResponse resp)
+throws ServletException, IOException {
+doGet(req, resp);
+}
+}
 }


-
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: Changelog update for PR243

2020-02-17 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm 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 738a6bb  Changelog update for PR243
738a6bb is described below

commit 738a6bb1ddfdd4f490b75d5629eff29b2066bb02
Author: remm 
AuthorDate: Mon Feb 17 10:22:31 2020 +0100

Changelog update for PR243
---
 webapps/docs/changelog.xml | 4 
 1 file changed, 4 insertions(+)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index ed478e1..5a8ec2e 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -102,6 +102,10 @@
 DNS_MEMBERSHIP_SERVICE_NAME environment for use with the
 DNS membership provider. Submitted by Bernd Bohmann. (remm)
   
+  
+Allow configuring the DNSMembershipProvider using the
+dns alias. Submitted by Bernd Bohmann. (remm)
+  
 
   
   


-
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: Improved CloudMembershipService documentation and configuration

2020-02-17 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm 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 a49816d  Improved CloudMembershipService documentation and 
configuration
a49816d is described below

commit a49816da8d93ef4d0d4d032d6cda49f885347ddc
Author: bohmber 
AuthorDate: Sun Feb 16 17:24:32 2020 +0100

Improved CloudMembershipService documentation and configuration
---
 .../membership/cloud/CloudMembershipService.java   | 39 +++
 .../membership/cloud/DNSMembershipProvider.java| 55 ++
 .../cloud/KubernetesMembershipProvider.java|  4 ++
 3 files changed, 98 insertions(+)

diff --git 
a/java/org/apache/catalina/tribes/membership/cloud/CloudMembershipService.java 
b/java/org/apache/catalina/tribes/membership/cloud/CloudMembershipService.java
index bcb213e..e840349 100644
--- 
a/java/org/apache/catalina/tribes/membership/cloud/CloudMembershipService.java
+++ 
b/java/org/apache/catalina/tribes/membership/cloud/CloudMembershipService.java
@@ -31,6 +31,41 @@ import org.apache.catalina.tribes.util.StringManager;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 
+/**
+ * A {@link org.apache.catalina.tribes.MembershipService} that uses Kubernetes 
API(default) or DNS to retrieve
+ * the members of a cluster.
+ * 
+ * The default implementation of the MembershipProvider component is the 
{@link KubernetesMembershipProvider}.
+ * The MembershipProvider can be configured by the 
membershipProviderClassName property.
+ * Possible shortcuts are {@code kubernetes} and {@code dns}. For dns look at 
the {@link DNSMembershipProvider}.
+ * 
+ * 
+ * Configuration example
+ * 
+ *
+ * {@code server.xml }
+ *
+ * 
+ * {@code
+ * 
+ *   
+ * 
+ *   
+ * 
+ * ...
+ *  }
+ *  
+ *
+ */
+
 public class CloudMembershipService extends MembershipServiceBase
 implements CloudMembershipServiceMBean {
 
@@ -39,7 +74,9 @@ public class CloudMembershipService extends 
MembershipServiceBase
 
 public static final String MEMBERSHIP_PROVIDER_CLASS_NAME = 
"membershipProviderClassName";
 private static final String KUBE = "kubernetes";
+private static final String DNS = "dns";
 private static final String KUBE_PROVIDER_CLASS = 
"org.apache.catalina.tribes.membership.cloud.KubernetesMembershipProvider";
+private static final String DNS_PROVIDER_CLASS = 
"org.apache.catalina.tribes.membership.cloud.DNSMembershipProvider";
 protected static final byte[] INITIAL_ID = new byte[16];
 
 private MembershipProvider membershipProvider;
@@ -101,6 +138,8 @@ public class CloudMembershipService extends 
MembershipServiceBase
 String provider = getMembershipProviderClassName();
 if (provider == null || KUBE.equals(provider)) {
 provider = KUBE_PROVIDER_CLASS;
+} else if (DNS.equals(provider)) {
+provider = DNS_PROVIDER_CLASS;
 }
 if (log.isDebugEnabled()) {
 log.debug("Using membershipProvider: " + provider);
diff --git 
a/java/org/apache/catalina/tribes/membership/cloud/DNSMembershipProvider.java 
b/java/org/apache/catalina/tribes/membership/cloud/DNSMembershipProvider.java
index 7b57d97..551aaec 100644
--- 
a/java/org/apache/catalina/tribes/membership/cloud/DNSMembershipProvider.java
+++ 
b/java/org/apache/catalina/tribes/membership/cloud/DNSMembershipProvider.java
@@ -30,6 +30,61 @@ import org.apache.catalina.tribes.membership.MemberImpl;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 
+/**
+ * A {@link org.apache.catalina.tribes.MembershipProvider} that uses DNS to 
retrieve the members of a cluster.
+ *
+ * 
+ * Configuration example for Kubernetes
+ * 
+ *
+ * {@code server.xml }
+ *
+ * 
+ * {@code
+ * 
+ *   
+ * 
+ *   
+ * 
+ * ...
+ *  }
+ *  
+ *
+ * {@code dns-membership-service.yml }
+ *
+ * 
+ * {@code
+ * apiVersion: v1
+ * kind: Service
+ * metadata:
+ *   annotations:
+ * service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
+ * description: "The service for tomcat cluster membership."
+ *   name: my-tomcat-app-membership
+ * spec:
+ *   clusterIP: None
+ *   ports:
+ *   - name: membership
+ * port: 
+ *   selector:
+ * app: my-tomcat-app
+ * }
+ * 
+ *
+ * Environment variable configuration
+ *
+ * {@code DNS_MEMBERSHIP_SERVICE_NAME=my-tomcat-app-membership }
+ */
+
 public class DNSMembershipProvider extends CloudMembershipProvider {
 private static final Log log = 
LogFactory.getLog(DNSMembershipProvider.class);
 
diff --git 
a/java/org/apache/catalina/tribes/membership/cloud/KubernetesMembershipProvider.java
 
b/java/org/apache/catalina/tribes/membership/cloud/KubernetesMembershipProvider.java
index 

Re: [VOTE] Release Apache Tomcat 10.0.0-M1

2020-02-17 Thread Martin Grigorov
On Fri, Feb 14, 2020 at 4:49 PM Mark Thomas  wrote:

> The proposed Apache Tomcat 10.0.0-M1 release is now available for
> voting. This is the first release of 10.0.x and is based on 9.0.31.
>
> The major changes compared to 9.0.31  are:
>
> - Complete the javax to jakarta package rename
>
> - Remove duplication of configuration between HTTP/1.1 and HTTP/2.
>   HTTP/2 will now inherit values from HTTP/1.1.
>
> - Remove deprecated code
>
> Along with lots of other bug fixes and improvements.
>
> For full details, see the changelog:
> https://ci.apache.org/projects/tomcat/tomcat10/docs/changelog.html
>
> It can be obtained from:
> https://dist.apache.org/repos/dist/dev/tomcat/tomcat-10/v10.0.0-M1/
> The Maven staging repo is:
> https://repository.apache.org/content/repositories/orgapachetomcat-1249/
> The tag is:
> https://github.com/apache/tomcat/tree/10.0.0-M1
> b0b074b683ed2e09ff9e9755825bfce83d303a93
>
> The proposed 10.0.0-M1 release is:
> [ ] Broken - do not release
> [ X ] Alpha  - go ahead and release as 10.0.0-M1
>

Regards,
Martin


> I opted to only include alpha here as there are still some potentially
> significant changes on the TOMCAT-NEXT list.
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>


[tomcat] branch master updated: Changelog update for PR243

2020-02-17 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm 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 71370e1  Changelog update for PR243
71370e1 is described below

commit 71370e19075d72c8f6067f6d2ea45cb6644206c1
Author: remm 
AuthorDate: Mon Feb 17 10:16:23 2020 +0100

Changelog update for PR243
---
 webapps/docs/changelog.xml | 8 
 1 file changed, 8 insertions(+)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index e0673d1..87fd5be 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -57,6 +57,14 @@
   
 
   
+  
+
+  
+Allow configuring the DNSMembershipProvider using the
+dns alias. Submitted by Bernd Bohmann. (remm)
+  
+
+  
 
 
   


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



[GitHub] [tomcat] martin-g commented on issue #244: The '$' in the class name of Digester$EnvironmentPropertySource is no…

2020-02-17 Thread GitBox
martin-g commented on issue #244: The '$' in the class name of 
Digester$EnvironmentPropertySource is no…
URL: https://github.com/apache/tomcat/pull/244#issuecomment-586891816
 
 
   I am not against using a proper class! I'm just trying to understand what 
kind of problem you have faced.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] [tomcat] bohmber commented on issue #244: The '$' in the class name of Digester$EnvironmentPropertySource is no…

2020-02-17 Thread GitBox
bohmber commented on issue #244: The '$' in the class name of 
Digester$EnvironmentPropertySource is no…
URL: https://github.com/apache/tomcat/pull/244#issuecomment-586890634
 
 
   The only reliable way was to add this to catalina.properties. Please test it 
yourself. I still belief it's a really bad idea to use '$' in a classname that 
is configurable via -D command line parameter.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] [tomcat] martin-g commented on issue #244: The '$' in the class name of Digester$EnvironmentPropertySource is no…

2020-02-17 Thread GitBox
martin-g commented on issue #244: The '$' in the class name of 
Digester$EnvironmentPropertySource is no…
URL: https://github.com/apache/tomcat/pull/244#issuecomment-586889945
 
 
   I meant quote it, e.g. `-Dsome.key="Some$Value"`, not _escape_ it.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] [tomcat] martin-g edited a comment on issue #244: The '$' in the class name of Digester$EnvironmentPropertySource is no…

2020-02-17 Thread GitBox
martin-g edited a comment on issue #244: The '$' in the class name of 
Digester$EnvironmentPropertySource is no…
URL: https://github.com/apache/tomcat/pull/244#issuecomment-586889945
 
 
   I meant _quote_ it, e.g. `-Dsome.key="Some$Value"`, not _escape_ it.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] [tomcat] rmaucher merged pull request #243: Improved CloudMembershipService documentation and configuration

2020-02-17 Thread GitBox
rmaucher merged pull request #243: Improved CloudMembershipService 
documentation and configuration
URL: https://github.com/apache/tomcat/pull/243
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[tomcat] branch master updated: Improved CloudMembershipService documentation and configuration

2020-02-17 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm 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 d6abbe3  Improved CloudMembershipService documentation and 
configuration
 new c1a8aaf  Merge pull request #243 from bohmber/dnsmembership_doc
d6abbe3 is described below

commit d6abbe3f6684c71a27b4739c78580c8fed82eaa9
Author: bohmber 
AuthorDate: Sun Feb 16 17:24:32 2020 +0100

Improved CloudMembershipService documentation and configuration
---
 .../membership/cloud/CloudMembershipService.java   | 39 +++
 .../membership/cloud/DNSMembershipProvider.java| 55 ++
 .../cloud/KubernetesMembershipProvider.java|  4 ++
 3 files changed, 98 insertions(+)

diff --git 
a/java/org/apache/catalina/tribes/membership/cloud/CloudMembershipService.java 
b/java/org/apache/catalina/tribes/membership/cloud/CloudMembershipService.java
index bcb213e..e840349 100644
--- 
a/java/org/apache/catalina/tribes/membership/cloud/CloudMembershipService.java
+++ 
b/java/org/apache/catalina/tribes/membership/cloud/CloudMembershipService.java
@@ -31,6 +31,41 @@ import org.apache.catalina.tribes.util.StringManager;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 
+/**
+ * A {@link org.apache.catalina.tribes.MembershipService} that uses Kubernetes 
API(default) or DNS to retrieve
+ * the members of a cluster.
+ * 
+ * The default implementation of the MembershipProvider component is the 
{@link KubernetesMembershipProvider}.
+ * The MembershipProvider can be configured by the 
membershipProviderClassName property.
+ * Possible shortcuts are {@code kubernetes} and {@code dns}. For dns look at 
the {@link DNSMembershipProvider}.
+ * 
+ * 
+ * Configuration example
+ * 
+ *
+ * {@code server.xml }
+ *
+ * 
+ * {@code
+ * 
+ *   
+ * 
+ *   
+ * 
+ * ...
+ *  }
+ *  
+ *
+ */
+
 public class CloudMembershipService extends MembershipServiceBase
 implements CloudMembershipServiceMBean {
 
@@ -39,7 +74,9 @@ public class CloudMembershipService extends 
MembershipServiceBase
 
 public static final String MEMBERSHIP_PROVIDER_CLASS_NAME = 
"membershipProviderClassName";
 private static final String KUBE = "kubernetes";
+private static final String DNS = "dns";
 private static final String KUBE_PROVIDER_CLASS = 
"org.apache.catalina.tribes.membership.cloud.KubernetesMembershipProvider";
+private static final String DNS_PROVIDER_CLASS = 
"org.apache.catalina.tribes.membership.cloud.DNSMembershipProvider";
 protected static final byte[] INITIAL_ID = new byte[16];
 
 private MembershipProvider membershipProvider;
@@ -101,6 +138,8 @@ public class CloudMembershipService extends 
MembershipServiceBase
 String provider = getMembershipProviderClassName();
 if (provider == null || KUBE.equals(provider)) {
 provider = KUBE_PROVIDER_CLASS;
+} else if (DNS.equals(provider)) {
+provider = DNS_PROVIDER_CLASS;
 }
 if (log.isDebugEnabled()) {
 log.debug("Using membershipProvider: " + provider);
diff --git 
a/java/org/apache/catalina/tribes/membership/cloud/DNSMembershipProvider.java 
b/java/org/apache/catalina/tribes/membership/cloud/DNSMembershipProvider.java
index 7b57d97..551aaec 100644
--- 
a/java/org/apache/catalina/tribes/membership/cloud/DNSMembershipProvider.java
+++ 
b/java/org/apache/catalina/tribes/membership/cloud/DNSMembershipProvider.java
@@ -30,6 +30,61 @@ import org.apache.catalina.tribes.membership.MemberImpl;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 
+/**
+ * A {@link org.apache.catalina.tribes.MembershipProvider} that uses DNS to 
retrieve the members of a cluster.
+ *
+ * 
+ * Configuration example for Kubernetes
+ * 
+ *
+ * {@code server.xml }
+ *
+ * 
+ * {@code
+ * 
+ *   
+ * 
+ *   
+ * 
+ * ...
+ *  }
+ *  
+ *
+ * {@code dns-membership-service.yml }
+ *
+ * 
+ * {@code
+ * apiVersion: v1
+ * kind: Service
+ * metadata:
+ *   annotations:
+ * service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
+ * description: "The service for tomcat cluster membership."
+ *   name: my-tomcat-app-membership
+ * spec:
+ *   clusterIP: None
+ *   ports:
+ *   - name: membership
+ * port: 
+ *   selector:
+ * app: my-tomcat-app
+ * }
+ * 
+ *
+ * Environment variable configuration
+ *
+ * {@code DNS_MEMBERSHIP_SERVICE_NAME=my-tomcat-app-membership }
+ */
+
 public class DNSMembershipProvider extends CloudMembershipProvider {
 private static final Log log = 
LogFactory.getLog(DNSMembershipProvider.class);
 
diff --git 
a/java/org/apache/catalina/tribes/membership/cloud/KubernetesMembershipProvider.java
 

[GitHub] [tomcat] bohmber commented on issue #244: The '$' in the class name of Digester$EnvironmentPropertySource is no…

2020-02-17 Thread GitBox
bohmber commented on issue #244: The '$' in the class name of 
Digester$EnvironmentPropertySource is no…
URL: https://github.com/apache/tomcat/pull/244#issuecomment-586885144
 
 
   > I haven't needed to set this particular class but usually one just needs 
to quote such values.
   
   Did you try to quote it? I don't know how many \\ are needed until it's 
working this is not reliable. Therefore a '$' should be avoided if you are 
using a shell.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] [tomcat] rmaucher commented on a change in pull request #243: Improved CloudMembershipService documentation and configuration

2020-02-17 Thread GitBox
rmaucher commented on a change in pull request #243: Improved 
CloudMembershipService documentation and configuration
URL: https://github.com/apache/tomcat/pull/243#discussion_r380049410
 
 

 ##
 File path: 
java/org/apache/catalina/tribes/membership/cloud/DNSMembershipProvider.java
 ##
 @@ -30,6 +30,61 @@
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 
+/**
+ * A {@link org.apache.catalina.tribes.MembershipProvider} that uses DNS to 
retrieve the members of a cluster.
+ *
+ * 
+ * Configuration example for Kubernetes
+ * 
+ *
+ * {@code server.xml }
+ *
+ * 
+ * {@code
+ * 
+ *   
+ * 
+ *   
+ * 
+ * ...
+ *  }
+ *  
+ *
+ * {@code dns-membership-service.yml }
+ *
+ * 
+ * {@code
+ * apiVersion: v1
 
 Review comment:
   DNSMembershipProvider does the DNS hack request, and 
KubernetesMembershipProvider is the one using the Kubernetes REST API.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] [tomcat] martin-g commented on issue #244: The '$' in the class name of Digester$EnvironmentPropertySource is no…

2020-02-17 Thread GitBox
martin-g commented on issue #244: The '$' in the class name of 
Digester$EnvironmentPropertySource is no…
URL: https://github.com/apache/tomcat/pull/244#issuecomment-586880522
 
 
   I haven't needed to set this particular class but usually one just needs to 
quote such values.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] [tomcat] martin-g commented on a change in pull request #243: Improved CloudMembershipService documentation and configuration

2020-02-17 Thread GitBox
martin-g commented on a change in pull request #243: Improved 
CloudMembershipService documentation and configuration
URL: https://github.com/apache/tomcat/pull/243#discussion_r380046859
 
 

 ##
 File path: 
java/org/apache/catalina/tribes/membership/cloud/DNSMembershipProvider.java
 ##
 @@ -30,6 +30,61 @@
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 
+/**
+ * A {@link org.apache.catalina.tribes.MembershipProvider} that uses DNS to 
retrieve the members of a cluster.
+ *
+ * 
+ * Configuration example for Kubernetes
+ * 
+ *
+ * {@code server.xml }
+ *
+ * 
+ * {@code
+ * 
+ *   
+ * 
+ *   
+ * 
+ * ...
+ *  }
+ *  
+ *
+ * {@code dns-membership-service.yml }
+ *
+ * 
+ * {@code
+ * apiVersion: v1
 
 Review comment:
   I am confused. 
   `"One uses rhe Kubernetes API..."` - is this DNSMembershipProvider ?
   `...the other one is "lightweight" and does the same with a DNS hack 
request` - is this KubernetesMembershipProvider ?
   If this is the case then IMO those classes should swap their names.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] [tomcat] bohmber edited a comment on issue #243: Improved CloudMembershipService documentation and configuration

2020-02-17 Thread GitBox
bohmber edited a comment on issue #243: Improved CloudMembershipService 
documentation and configuration
URL: https://github.com/apache/tomcat/pull/243#issuecomment-586875798
 
 
   DnsMembershipProvider is needed if you are in the cloud and you don't have 
kubernetes api access and multicast is not available. Therefore I added an 
example how to configure DNSMembershipProvider in kubernetes. 
   
   Here is an example from Jean-Frederic Clere
   https://github.com/jfclere/tomcat-openshift/blob/master/conf/server.xml
   
   DNSMembershipProvider is inspired by this i guess: 
   http://jgroups.org/manual4/index.html#_dns_ping
   
   Please read the first few lines


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] [tomcat] bohmber commented on issue #243: Improved CloudMembershipService documentation and configuration

2020-02-17 Thread GitBox
bohmber commented on issue #243: Improved CloudMembershipService documentation 
and configuration
URL: https://github.com/apache/tomcat/pull/243#issuecomment-586875798
 
 
   DnsMembershipProvider is need if you are in the cloud and you don't have 
kubernetes api access and multicast is not available. Therefor I added an 
example how to configure DNSMembershipProvider in kubernetes. In other env you 
have 
   
   Here is an example from Jean-Frederic Clere
   https://github.com/jfclere/tomcat-openshift/blob/master/conf/server.xml
   
   DNSMembershipProvider is inspired by this i guess: 
   http://jgroups.org/manual4/index.html#_dns_ping
   
   Please read the first few lines


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] [tomcat] rmaucher commented on a change in pull request #243: Improved CloudMembershipService documentation and configuration

2020-02-17 Thread GitBox
rmaucher commented on a change in pull request #243: Improved 
CloudMembershipService documentation and configuration
URL: https://github.com/apache/tomcat/pull/243#discussion_r380040258
 
 

 ##
 File path: 
java/org/apache/catalina/tribes/membership/cloud/DNSMembershipProvider.java
 ##
 @@ -30,6 +30,61 @@
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 
+/**
+ * A {@link org.apache.catalina.tribes.MembershipProvider} that uses DNS to 
retrieve the members of a cluster.
+ *
+ * 
+ * Configuration example for Kubernetes
+ * 
+ *
+ * {@code server.xml }
+ *
+ * 
+ * {@code
+ * 
+ *   
+ * 
+ *   
+ * 
+ * ...
+ *  }
+ *  
+ *
+ * {@code dns-membership-service.yml }
+ *
+ * 
+ * {@code
+ * apiVersion: v1
 
 Review comment:
   One uses rhe Kubernetes API and parses the JSON, the other one is 
"lightweight" and does the same with a DNS hack request. Personally, I have 
found the DNS technique wasn't so reliable, so I don't like it. But this is 
"recommended" as the proper way (access to the REST API) needs security tuning.
   At line 150, it uses Kubernetes logging message because the two do the same 
thing and run into the same error. If you would want a separate key "because", 
feel free to "fix" it.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] [tomcat] bohmber commented on issue #244: The '$' in the class name of Digester$EnvironmentPropertySource is no…

2020-02-17 Thread GitBox
bohmber commented on issue #244: The '$' in the class name of 
Digester$EnvironmentPropertySource is no…
URL: https://github.com/apache/tomcat/pull/244#issuecomment-586870673
 
 
   If you set it via CATALINA_OPTS is almost impossible to set this value. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



Re: [tomcat] branch master updated: 64141: Allow overriding JVM trust store

2020-02-17 Thread Martin Grigorov
On Sat, Feb 15, 2020 at 2:22 PM  wrote:

> This is an automated email from the ASF dual-hosted git repository.
>
> remm 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 d14c5b4  64141: Allow overriding JVM trust store
> d14c5b4 is described below
>
> commit d14c5b409d08df88ab437f76334342b8f8094b44
> Author: remm 
> AuthorDate: Sat Feb 15 13:21:53 2020 +0100
>
> 64141: Allow overriding JVM trust store
>
> If using a CA certificate, remove a default value for the trust store
> file when not using a JSSE configuration.
> ---
>  java/org/apache/tomcat/util/net/SSLHostConfig.java | 26
> +++---
>  webapps/docs/changelog.xml |  4 
>  2 files changed, 27 insertions(+), 3 deletions(-)
>
> diff --git a/java/org/apache/tomcat/util/net/SSLHostConfig.java
> b/java/org/apache/tomcat/util/net/SSLHostConfig.java
> index 4a8549d..724497f 100644
> --- a/java/org/apache/tomcat/util/net/SSLHostConfig.java
> +++ b/java/org/apache/tomcat/util/net/SSLHostConfig.java
> @@ -151,15 +151,24 @@ public class SSLHostConfig implements Serializable {
>  }
>
>
> -void setProperty(String name, Type configType) {
> +/**
> + * Set property which belongs to the specified configuration type.
> + * @param name the property name
> + * @param configType the configuration type
> + * @return true if the property belongs to the current confuguration,
> + *   and false otherwise
> + */
> +boolean setProperty(String name, Type configType) {
>  if (this.configType == null) {
>  this.configType = configType;
>  } else {
>  if (configType != this.configType) {
>  log.warn(sm.getString("sslHostConfig.mismatch",
>  name, getHostName(), configType,
> this.configType));
> +return false;
>  }
>  }
> +return true;
>  }
>
>
> @@ -662,7 +671,13 @@ public class SSLHostConfig implements Serializable {
>
>
>  public void setCaCertificateFile(String caCertificateFile) {
> -setProperty("caCertificateFile", Type.OPENSSL);
> +if (setProperty("caCertificateFile", Type.OPENSSL)) {
> +// Reset default JSSE trust store if not a JSSE configuration
> +if (truststoreFile != null) {
> +System.out.println("RESET !");
>

Debug leftover.


> +truststoreFile = null;
> +}
> +}
>  this.caCertificateFile = caCertificateFile;
>  }
>
> @@ -673,7 +688,12 @@ public class SSLHostConfig implements Serializable {
>
>
>  public void setCaCertificatePath(String caCertificatePath) {
> -setProperty("caCertificatePath", Type.OPENSSL);
> +if (setProperty("caCertificatePath", Type.OPENSSL)) {
> +// Reset default JSSE trust store if not a JSSE configuration
> +if (truststoreFile != null) {
> +truststoreFile = null;
> +}
> +}
>  this.caCertificatePath = caCertificatePath;
>  }
>
> diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
> index 753fb4c..e0673d1 100644
> --- a/webapps/docs/changelog.xml
> +++ b/webapps/docs/changelog.xml
> @@ -51,6 +51,10 @@
>  Fix support of native jakarta servlet attributes in AJP connector.
>  (remm)
>
> +  
> +64141: If using a CA certificate, remove a default
> value
> +for the truststore file when not using a JSSE configuration.
> (remm)
> +  
>  
>
>  
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>


[GitHub] [tomcat] martin-g commented on a change in pull request #243: Improved CloudMembershipService documentation and configuration

2020-02-17 Thread GitBox
martin-g commented on a change in pull request #243: Improved 
CloudMembershipService documentation and configuration
URL: https://github.com/apache/tomcat/pull/243#discussion_r380034929
 
 

 ##
 File path: 
java/org/apache/catalina/tribes/membership/cloud/DNSMembershipProvider.java
 ##
 @@ -30,6 +30,61 @@
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 
+/**
+ * A {@link org.apache.catalina.tribes.MembershipProvider} that uses DNS to 
retrieve the members of a cluster.
+ *
+ * 
+ * Configuration example for Kubernetes
+ * 
+ *
+ * {@code server.xml }
+ *
+ * 
+ * {@code
+ * 
+ *   
+ * 
+ *   
+ * 
+ * ...
+ *  }
+ *  
+ *
+ * {@code dns-membership-service.yml }
+ *
+ * 
+ * {@code
+ * apiVersion: v1
 
 Review comment:
   At line 150 it uses Kubernetes logging message too. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] [tomcat] martin-g commented on a change in pull request #243: Improved CloudMembershipService documentation and configuration

2020-02-17 Thread GitBox
martin-g commented on a change in pull request #243: Improved 
CloudMembershipService documentation and configuration
URL: https://github.com/apache/tomcat/pull/243#discussion_r380034690
 
 

 ##
 File path: 
java/org/apache/catalina/tribes/membership/cloud/DNSMembershipProvider.java
 ##
 @@ -30,6 +30,61 @@
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 
+/**
+ * A {@link org.apache.catalina.tribes.MembershipProvider} that uses DNS to 
retrieve the members of a cluster.
+ *
+ * 
+ * Configuration example for Kubernetes
+ * 
+ *
+ * {@code server.xml }
+ *
+ * 
+ * {@code
+ * 
+ *   
+ * 
+ *   
+ * 
+ * ...
+ *  }
+ *  
+ *
+ * {@code dns-membership-service.yml }
+ *
+ * 
+ * {@code
+ * apiVersion: v1
 
 Review comment:
   This is Kubernetes config. Why it is in DNSMembershipProvider ?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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



[GitHub] [tomcat] martin-g commented on issue #244: The '$' in the class name of Digester$EnvironmentPropertySource is no…

2020-02-17 Thread GitBox
martin-g commented on issue #244: The '$' in the class name of 
Digester$EnvironmentPropertySource is no…
URL: https://github.com/apache/tomcat/pull/244#issuecomment-586865680
 
 
   Just curious: why does it have to be Shell friendly ?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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