Re: [Bug 56492] Avoid eclipse debugger pausing on uncaught exceptions when tomcat renews its threads

2020-08-12 Thread Felix Schumacher
Am 12.08.20 um 22:13 schrieb bugzi...@apache.org:
> https://bz.apache.org/bugzilla/show_bug.cgi?id=56492
>
> --- Comment #7 from ganjilgenap  ---
>
Spam reverted and the account has been disabled.

 Felix


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



[Bug 56492] Avoid eclipse debugger pausing on uncaught exceptions when tomcat renews its threads

2020-08-12 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=56492

--- Comment #7 from ganjilgenap  ---
https://ganjilgenap.com/forum-prediksi-singapura/ Forum Syair sgp ,The
prediction of the king of singapore lottery

-- 
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: Attempt to get JDK 8 smoke tests working on Github

2020-08-12 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 cb52d5d  Attempt to get JDK 8 smoke tests working on Github
cb52d5d is described below

commit cb52d5d62f45f2bb32ca316f97fe84bf2ef7b780
Author: Mark Thomas 
AuthorDate: Wed Aug 12 19:52:35 2020 +0100

Attempt to get JDK 8 smoke tests working on Github

Github uses Zulu which supports TLS 1.3 but does not enable it by
default.
---
 test/org/apache/tomcat/util/net/TesterSupport.java | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/test/org/apache/tomcat/util/net/TesterSupport.java 
b/test/org/apache/tomcat/util/net/TesterSupport.java
index d54f5d0..2be5728 100644
--- a/test/org/apache/tomcat/util/net/TesterSupport.java
+++ b/test/org/apache/tomcat/util/net/TesterSupport.java
@@ -200,7 +200,12 @@ public final class TesterSupport {
 public static ClientSSLSocketFactory configureClientSsl() {
 ClientSSLSocketFactory clientSSLSocketFactory = null;
 try {
-SSLContext sc = SSLContext.getInstance(Constants.SSL_PROTO_TLS);
+SSLContext sc;
+if (TesterSupport.TLSV13_AVAILABLE) {
+ sc = SSLContext.getInstance("TLSv1.3");
+} else {
+sc = SSLContext.getInstance(Constants.SSL_PROTO_TLS);
+}
 sc.init(TesterSupport.getUser1KeyManagers(),
 TesterSupport.getTrustManagers(),
 null);


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



[tomcat] branch 9.0.x updated: Add in an ability to configure a custom class loader

2020-08-12 Thread fhanik
This is an automated email from the ASF dual-hosted git repository.

fhanik 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 44c8234  Add in an ability to configure a custom class loader
44c8234 is described below

commit 44c82344ecb1d436d4e88a81fc3788981d3bad6f
Author: Filip Hanik 
AuthorDate: Wed Aug 12 11:14:13 2020 -0700

Add in an ability to configure a custom class loader

without using reflection
beneficial for programmatic usage
and building native images using GraalVM
---
 java/org/apache/catalina/loader/WebappLoader.java  | 16 +
 .../catalina/loader/TestVirtualWebappLoader.java   | 27 ++
 2 files changed, 43 insertions(+)

diff --git a/java/org/apache/catalina/loader/WebappLoader.java 
b/java/org/apache/catalina/loader/WebappLoader.java
index 95d70c2..7076c20 100644
--- a/java/org/apache/catalina/loader/WebappLoader.java
+++ b/java/org/apache/catalina/loader/WebappLoader.java
@@ -243,6 +243,18 @@ public class WebappLoader extends LifecycleMBeanBase
 this.loaderClass = loaderClass;
 }
 
+/**
+ * Set the ClassLoader instance, without relying on reflection
+ * This method will also invoke {@link #setLoaderClass(String)} with
+ * {@code loaderInstance.getClass().getName()} as an argument
+ *
+ * @param loaderInstance The new ClassLoader instance to use
+ */
+public void setLoaderInstance(WebappClassLoaderBase loaderInstance) {
+this.classLoader = loaderInstance;
+setLoaderClass(loaderInstance.getClass().getName());
+}
+
 
 /**
  * Return the reloadable flag for this Loader.
@@ -507,6 +519,10 @@ public class WebappLoader extends LifecycleMBeanBase
 private WebappClassLoaderBase createClassLoader()
 throws Exception {
 
+if (classLoader != null) {
+return classLoader;
+}
+
 if (parentClassLoader == null) {
 parentClassLoader = context.getParentClassLoader();
 } else {
diff --git a/test/org/apache/catalina/loader/TestVirtualWebappLoader.java 
b/test/org/apache/catalina/loader/TestVirtualWebappLoader.java
index afcd8a3..11d840e 100644
--- a/test/org/apache/catalina/loader/TestVirtualWebappLoader.java
+++ b/test/org/apache/catalina/loader/TestVirtualWebappLoader.java
@@ -37,6 +37,33 @@ public class TestVirtualWebappLoader extends TomcatBaseTest {
 }
 
 @Test
+public void testLoaderInstance() throws Exception {
+WebappLoader loader = new WebappLoader();
+Assert.assertNull(loader.getClassLoader());
+WebappClassLoader cl = new WebappClassLoader();
+loader.setLoaderInstance(cl);
+Assert.assertSame(cl, loader.getClassLoader());
+Assert.assertEquals(WebappClassLoader.class.getName(), 
loader.getLoaderClass());
+
+Tomcat tomcat = getTomcatInstance();
+
+File appDir = new File("test/webapp");
+StandardContext ctx = (StandardContext) tomcat.addContext("",
+appDir.getAbsolutePath());
+
+loader.setContext(ctx);
+ctx.setLoader(loader);
+
+
+loader.start();
+Assert.assertSame(cl, loader.getClassLoader());
+Assert.assertEquals(WebappClassLoader.class.getName(), 
loader.getLoaderClass());
+loader.stop();
+Assert.assertNull(loader.getClassLoader());
+Assert.assertEquals(WebappClassLoader.class.getName(), 
loader.getLoaderClass());
+}
+
+@Test
 public void testStartInternal() throws Exception {
 Tomcat tomcat = getTomcatInstance();
 


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



[tomcat] branch master updated: It should probably do what JavaDoc says

2020-08-12 Thread fhanik
This is an automated email from the ASF dual-hosted git repository.

fhanik 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 481e448  It should probably do what JavaDoc says
481e448 is described below

commit 481e4487bf4eefbf5f8c1c7e473fb728cdc63f3d
Author: Filip Hanik 
AuthorDate: Wed Aug 12 11:13:35 2020 -0700

It should probably do what JavaDoc says

Change variable modification to method invocation
---
 java/org/apache/catalina/loader/WebappLoader.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/loader/WebappLoader.java 
b/java/org/apache/catalina/loader/WebappLoader.java
index 38292be..636c741 100644
--- a/java/org/apache/catalina/loader/WebappLoader.java
+++ b/java/org/apache/catalina/loader/WebappLoader.java
@@ -198,7 +198,7 @@ public class WebappLoader extends LifecycleMBeanBase 
implements Loader{
  */
 public void setLoaderInstance(WebappClassLoaderBase loaderInstance) {
 this.classLoader = loaderInstance;
-this.loaderClass = loaderInstance.getClass().getName();
+setLoaderClass(loaderInstance.getClass().getName());
 }
 
 // - Public Methods


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



[tomcat] branch master updated: Add in an ability to configure a custom class loader

2020-08-12 Thread fhanik
This is an automated email from the ASF dual-hosted git repository.

fhanik 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 7cd2aaa  Add in an ability to configure a custom class loader
7cd2aaa is described below

commit 7cd2aaacdbf20879b04e4ec57a4dbfa6adee2636
Author: Filip Hanik 
AuthorDate: Wed Aug 12 10:46:09 2020 -0700

Add in an ability to configure a custom class loader

without using reflection
beneficial for programmatic usage
and building native images using GraalVM
---
 java/org/apache/catalina/loader/WebappLoader.java  | 15 
 .../catalina/loader/TestVirtualWebappLoader.java   | 27 ++
 2 files changed, 42 insertions(+)

diff --git a/java/org/apache/catalina/loader/WebappLoader.java 
b/java/org/apache/catalina/loader/WebappLoader.java
index 3c3026b..38292be 100644
--- a/java/org/apache/catalina/loader/WebappLoader.java
+++ b/java/org/apache/catalina/loader/WebappLoader.java
@@ -189,6 +189,17 @@ public class WebappLoader extends LifecycleMBeanBase 
implements Loader{
 this.loaderClass = loaderClass;
 }
 
+/**
+ * Set the ClassLoader instance, without relying on reflection
+ * This method will also invoke {@link #setLoaderClass(String)} with
+ * {@code loaderInstance.getClass().getName()} as an argument
+ *
+ * @param loaderInstance The new ClassLoader instance to use
+ */
+public void setLoaderInstance(WebappClassLoaderBase loaderInstance) {
+this.classLoader = loaderInstance;
+this.loaderClass = loaderInstance.getClass().getName();
+}
 
 // - Public Methods
 
@@ -398,6 +409,10 @@ public class WebappLoader extends LifecycleMBeanBase 
implements Loader{
 private WebappClassLoaderBase createClassLoader()
 throws Exception {
 
+if (classLoader != null) {
+return classLoader;
+}
+
 if (ParallelWebappClassLoader.class.getName().equals(loaderClass)) {
 return new 
ParallelWebappClassLoader(context.getParentClassLoader());
 }
diff --git a/test/org/apache/catalina/loader/TestVirtualWebappLoader.java 
b/test/org/apache/catalina/loader/TestVirtualWebappLoader.java
index afcd8a3..11d840e 100644
--- a/test/org/apache/catalina/loader/TestVirtualWebappLoader.java
+++ b/test/org/apache/catalina/loader/TestVirtualWebappLoader.java
@@ -37,6 +37,33 @@ public class TestVirtualWebappLoader extends TomcatBaseTest {
 }
 
 @Test
+public void testLoaderInstance() throws Exception {
+WebappLoader loader = new WebappLoader();
+Assert.assertNull(loader.getClassLoader());
+WebappClassLoader cl = new WebappClassLoader();
+loader.setLoaderInstance(cl);
+Assert.assertSame(cl, loader.getClassLoader());
+Assert.assertEquals(WebappClassLoader.class.getName(), 
loader.getLoaderClass());
+
+Tomcat tomcat = getTomcatInstance();
+
+File appDir = new File("test/webapp");
+StandardContext ctx = (StandardContext) tomcat.addContext("",
+appDir.getAbsolutePath());
+
+loader.setContext(ctx);
+ctx.setLoader(loader);
+
+
+loader.start();
+Assert.assertSame(cl, loader.getClassLoader());
+Assert.assertEquals(WebappClassLoader.class.getName(), 
loader.getLoaderClass());
+loader.stop();
+Assert.assertNull(loader.getClassLoader());
+Assert.assertEquals(WebappClassLoader.class.getName(), 
loader.getLoaderClass());
+}
+
+@Test
 public void testStartInternal() throws Exception {
 Tomcat tomcat = getTomcatInstance();
 


-
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: Avoid potential NPEs introduced in smaller footprint for closed streams

2020-08-12 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 0cf  Avoid potential NPEs introduced in smaller footprint for 
closed streams
0cf is described below

commit 0cf3514c3dee16e35473946fad82a340f64f
Author: Mark Thomas 
AuthorDate: Wed Aug 12 18:12:43 2020 +0100

Avoid potential NPEs introduced in smaller footprint for closed streams
---
 java/org/apache/coyote/http2/Stream.java | 10 ++
 webapps/docs/changelog.xml   |  4 
 2 files changed, 14 insertions(+)

diff --git a/java/org/apache/coyote/http2/Stream.java 
b/java/org/apache/coyote/http2/Stream.java
index 45fc82a..0371be9 100644
--- a/java/org/apache/coyote/http2/Stream.java
+++ b/java/org/apache/coyote/http2/Stream.java
@@ -548,6 +548,11 @@ public class Stream extends AbstractStream implements 
HeaderEmitter {
 
 
 ByteBuffer getInputByteBuffer() {
+// Avoid NPE if Stream has been closed on Stream specific thread
+StreamInputBuffer inputBuffer = this.inputBuffer;
+if (inputBuffer == null) {
+return null;
+}
 return inputBuffer.getInBuffer();
 }
 
@@ -576,6 +581,11 @@ public class Stream extends AbstractStream implements 
HeaderEmitter {
 
 final void receivedData(int payloadSize) throws ConnectionException {
 contentLengthReceived += payloadSize;
+Request coyoteRequest = this.coyoteRequest;
+// Avoid NPE if Stream has been closed on Stream specific thread
+if (coyoteRequest == null) {
+return;
+}
 long contentLengthHeader = coyoteRequest.getContentLengthLong();
 if (contentLengthHeader > -1 && contentLengthReceived > 
contentLengthHeader) {
 throw new 
ConnectionException(sm.getString("stream.header.contentLength",
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index db9d5a0..7c630ef 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -85,6 +85,10 @@
 ServletInputStream.available() to provide a more accurate
 return value, particularly when end of stream has been reached. (markt)
   
+  
+Avoid several potential NPEs introduced in the changes in the previous
+release to reduce the memory footprint of closed HTTP/2 streams. 
(markt)
+  
 
   
   


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



[tomcat] branch 9.0.x updated: Avoid potential NPEs introduced in smaller footprint for closed streams

2020-08-12 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 868287c  Avoid potential NPEs introduced in smaller footprint for 
closed streams
868287c is described below

commit 868287cafee0bf89a82370701740a035924ed9a0
Author: Mark Thomas 
AuthorDate: Wed Aug 12 18:12:43 2020 +0100

Avoid potential NPEs introduced in smaller footprint for closed streams
---
 java/org/apache/coyote/http2/Stream.java | 18 --
 webapps/docs/changelog.xml   |  4 
 2 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/coyote/http2/Stream.java 
b/java/org/apache/coyote/http2/Stream.java
index fa9394c..4c99103 100644
--- a/java/org/apache/coyote/http2/Stream.java
+++ b/java/org/apache/coyote/http2/Stream.java
@@ -472,8 +472,12 @@ class Stream extends AbstractStream implements 
HeaderEmitter {
 }
 
 if (headerState == HEADER_STATE_TRAILER) {
-// HTTP/2 headers are already always lower case
-coyoteRequest.getTrailerFields().put(name, value);
+// Avoid NPE if Stream has been closed on Stream specific 
thread
+Request coyoteRequest = this.coyoteRequest;
+if (coyoteRequest != null) {
+// HTTP/2 headers are already always lower case
+coyoteRequest.getTrailerFields().put(name, value);
+}
 } else {
 coyoteRequest.getMimeHeaders().addValue(name).setString(value);
 }
@@ -585,6 +589,11 @@ class Stream extends AbstractStream implements 
HeaderEmitter {
 
 
 final ByteBuffer getInputByteBuffer() {
+// Avoid NPE if Stream has been closed on Stream specific thread
+StreamInputBuffer inputBuffer = this.inputBuffer;
+if (inputBuffer == null) {
+return null;
+}
 return inputBuffer.getInBuffer();
 }
 
@@ -615,6 +624,11 @@ class Stream extends AbstractStream implements 
HeaderEmitter {
 
 final void receivedData(int payloadSize) throws ConnectionException {
 contentLengthReceived += payloadSize;
+Request coyoteRequest = this.coyoteRequest;
+// Avoid NPE if Stream has been closed on Stream specific thread
+if (coyoteRequest == null) {
+return;
+}
 long contentLengthHeader = coyoteRequest.getContentLengthLong();
 if (contentLengthHeader > -1 && contentLengthReceived > 
contentLengthHeader) {
 throw new 
ConnectionException(sm.getString("stream.header.contentLength",
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 548456b..7a99c85 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -91,6 +91,10 @@
 ServletInputStream.available() to provide a more accurate
 return value, particularly when end of stream has been reached. (markt)
   
+  
+Avoid several potential NPEs introduced in the changes in the previous
+release to reduce the memory footprint of closed HTTP/2 streams. 
(markt)
+  
 
   
   


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



[tomcat] branch master updated: Avoid potential NPEs introduced in smaller footprint for closed streams

2020-08-12 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 583b7ad  Avoid potential NPEs introduced in smaller footprint for 
closed streams
583b7ad is described below

commit 583b7ad17ff7cd67ac15a50e76cf2e0c5cd9138a
Author: Mark Thomas 
AuthorDate: Wed Aug 12 18:12:43 2020 +0100

Avoid potential NPEs introduced in smaller footprint for closed streams
---
 java/org/apache/coyote/http2/Stream.java | 18 --
 webapps/docs/changelog.xml   |  4 
 2 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/coyote/http2/Stream.java 
b/java/org/apache/coyote/http2/Stream.java
index 396a24e..8b0a501 100644
--- a/java/org/apache/coyote/http2/Stream.java
+++ b/java/org/apache/coyote/http2/Stream.java
@@ -472,8 +472,12 @@ class Stream extends AbstractStream implements 
HeaderEmitter {
 }
 
 if (headerState == HEADER_STATE_TRAILER) {
-// HTTP/2 headers are already always lower case
-coyoteRequest.getTrailerFields().put(name, value);
+// Avoid NPE if Stream has been closed on Stream specific 
thread
+Request coyoteRequest = this.coyoteRequest;
+if (coyoteRequest != null) {
+// HTTP/2 headers are already always lower case
+coyoteRequest.getTrailerFields().put(name, value);
+}
 } else {
 coyoteRequest.getMimeHeaders().addValue(name).setString(value);
 }
@@ -585,6 +589,11 @@ class Stream extends AbstractStream implements 
HeaderEmitter {
 
 
 final ByteBuffer getInputByteBuffer() {
+// Avoid NPE if Stream has been closed on Stream specific thread
+StreamInputBuffer inputBuffer = this.inputBuffer;
+if (inputBuffer == null) {
+return null;
+}
 return inputBuffer.getInBuffer();
 }
 
@@ -615,6 +624,11 @@ class Stream extends AbstractStream implements 
HeaderEmitter {
 
 final void receivedData(int payloadSize) throws ConnectionException {
 contentLengthReceived += payloadSize;
+Request coyoteRequest = this.coyoteRequest;
+// Avoid NPE if Stream has been closed on Stream specific thread
+if (coyoteRequest == null) {
+return;
+}
 long contentLengthHeader = coyoteRequest.getContentLengthLong();
 if (contentLengthHeader > -1 && contentLengthReceived > 
contentLengthHeader) {
 throw new 
ConnectionException(sm.getString("stream.header.contentLength",
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 312e2b9..7f012a4 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -95,6 +95,10 @@
 ServletInputStream.available() to provide a more accurate
 return value, particularly when end of stream has been reached. (markt)
   
+  
+Avoid several potential NPEs introduced in the changes in the previous
+release to reduce the memory footprint of closed HTTP/2 streams. 
(markt)
+  
 
   
   


-
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-08-12 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/1748

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] 89deceb56a13b4d9c8c8b28c5a6fc957e10d6394
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



[GitHub] [tomcat] kamnani commented on pull request #331: Remove White Spaces and extra lines from the JSP files

2020-08-12 Thread GitBox


kamnani commented on pull request #331:
URL: https://github.com/apache/tomcat/pull/331#issuecomment-672976308


   I can remove this optimization for the pre tag, so pre tags are untouched. 



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

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



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



[tomcat] branch 7.0.x updated: Java 6 compat

2020-08-12 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 89deceb  Java 6 compat
89deceb is described below

commit 89deceb56a13b4d9c8c8b28c5a6fc957e10d6394
Author: Mark Thomas 
AuthorDate: Wed Aug 12 16:51:02 2020 +0100

Java 6 compat
---
 java/org/apache/tomcat/util/http/parser/EntityTag.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/tomcat/util/http/parser/EntityTag.java 
b/java/org/apache/tomcat/util/http/parser/EntityTag.java
index 9384b8d..2213075 100644
--- a/java/org/apache/tomcat/util/http/parser/EntityTag.java
+++ b/java/org/apache/tomcat/util/http/parser/EntityTag.java
@@ -37,7 +37,7 @@ public class EntityTag {
  */
 public static Set parseEntityTag(StringReader input, boolean 
includeWeak) throws IOException {
 
-HashSet result = new HashSet<>();
+HashSet result = new HashSet();
 
 while (true) {
 boolean strong = false;


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



Re: Use of "constants" in Manager to generate HTML/CSS content

2020-08-12 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Konstantin,

On 8/12/20 10:02, Konstantin Kolinko wrote:
> вт, 28 июл. 2020 г. в 16:55, Christopher Schultz
> :
>>
>> All,
>>
>> I was looking at this PR[1] and wondering why we have huge swaths
>> of CSS and HTML in a Java source file, instead of using e.g. JSP
>> or some other content-generation framework.
>
> I remember that I once read some praise for being able to use the
> Manager web application when there is no Jasper and no JSP
> compiler available. It was more than 5 years ago and I do not
> remember the details - maybe it was some small system with limited
> hardware.

Agreed.

> The Manager app does use JSPs nowadays, not for some unimportant
> pages: listing of sessions and listing attributes of a session.

Okay. Are you suggesting then that JSP can/should be required for
Manager usage? Or maybe just for certain functions?

>> I know, I hate JSP, too, but having large blocks of HTML and CSS
>> in Java strings is just ... awful.
>>
>> Also, is there a particular reason we are using embedded CSS in
>> the pages instead of an external CSS file?
>
> Originally it was rather small. It grows with time.

Okay. I think it's time to separate.

> A separate file needs a license header, so the size will grow.

I'm okay with that.

>> Ultimately, it would be a good idea to move all CSS and even
>> styles into a separate CSS file so we can tighten-up the Content
>> Security Policy on the manager app. This can help prevent attacks
>> if there happens to be some kind of XSS vulnerability hiding in
>> there somewhere.
>
> I do not get how having a separate file [matters] with Content
> Security Policy.

Having separate CSS allows a site to allow external styles but
prohibit in-page styles. The allow-token for CSP for inline styles is
"unsafe-inline".

The reason this is a security issue is for XSS attacks. If an XSS
attack is in progress, the script may attempt to modify the page's
styles to manipulate the user. For example, hiding some important data
or warning message. XSS would have more difficulty spoofing an
externally-loaded CSS file.

I don't think we have any js in the Manager, but external js is better
as well, as the page is therefore prohibited from running any js code
appearing in the page: all scripts must be external.

Speaking of which, we should look at defining a CSP for the Manager
application.

>> Any objections to evicting the CSS to begin with?
>
> No objection, if you want it.
>
> We already have image files. Thus, why not?

Sine you mentioned it, how to we "license" image files?

>> [1] https://github.com/apache/tomcat/pull/327
>
> An odd PR. I see that it makes some visual changes, but there is
> no description nor discussion what the actual changes are.

I care less about this specific PR and more about cleaning everything up
.

- -chris
-BEGIN PGP SIGNATURE-
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl80Dx8ACgkQHPApP6U8
pFhSSg/9EQQpZ6WLOeMA7o41UJ3o/X49Xu5h7mliFhIQ6xNkoqW6sWkOHy0LURqU
4S+WaPQzNsXqU8gREcKcU1OPNFnh2i3hGaD6mc/Tr5PMg82qBDwozxM9L6pcKo/N
d30RiJ5MeenrLZ/chbC8Kq4pqBbNtChQWmVH4Dp469DIAwhE3A6T7pwiB1bB72Tz
DxW/1PTAZENvkchkhll/UyEd+pJV9rq1CrrR8LRpqkEkZqu50vKFhE7XWIn4AkZf
OXhtI+SLh/1cxeVMfVjq7JyoslMHiZ7d+55wybvdRWZLns+OMeOTjxW6nzAaB8nN
SYEs/x/+HOV2x91btCpurttGFNzjdU3VqnM/Xk0mThVoxP0CktOSePGlUKd8gqi1
Jed/RxeaKSUSjrghhCJLnvsNhqUfXMy35eATWdJ+YPhIyxM1aotBPZN9zZRKh2zp
IPM/VvpFWJsIiIzbzhLfQfRNK9UpLaTL96s+V/5opoIHpPVpW+T8uSVrFpysfErE
fZVC027SgEDzDjtBvPhRN4E8kK4rUKiAOyJJX/M3q7iJKZj1zy5NOo3RQZ7WAqIv
Qx8mAwIi+/cNaQotbCuTkTpObzSHetR6OF9RQDZG/zAMI+W5/9eVTrZucto4yCB8
9fMGf2YTrqnF4qF5JMAKzRH+kucGyZx4q8aX9SY+RTl5GuGcGKI=
=xI8S
-END PGP SIGNATURE-

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



[tomcat] branch master updated: Added changes required for ppc64le support

2020-08-12 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 30e0a59  Added changes required for ppc64le support
30e0a59 is described below

commit 30e0a59635d3606b9780911a5334c5c3f05befe5
Author: kumarvikas2020 <64921043+kumarvikas2...@users.noreply.github.com>
AuthorDate: Tue Jul 28 12:20:54 2020 +0530

Added changes required for ppc64le support
---
 .travis.yml | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index 3d9cecd..a3f7ece 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -21,6 +21,8 @@ jobs:
 jdk: openjdk11
   - arch: arm64
 jdk: oraclejdk8
+  - arch: ppc64le
+jdk: oraclejdk8
 
 addons:
 apt:
@@ -41,7 +43,8 @@ install:
 - 
JDK_X64="https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u252-b09/OpenJDK8U-jdk_x64_linux_hotspot_8u252b09.tar.gz;
 - 
JDK_ARM64="https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u252-b09/OpenJDK8U-jdk_aarch64_linux_hotspot_8u252b09.tar.gz;
 - 
JDK_s390x="https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.7%2B10/OpenJDK11U-jdk_s390x_linux_hotspot_11.0.7_10.tar.gz;
-- if test "X$ARCH" = "Xaarch64"; then JDK_URL=$JDK_ARM64; elif test 
"$ARCH" = "s390x"; then JDK_URL=$JDK_s390x; else JDK_URL=$JDK_X64; fi
+- 
JDK_ppc64le="https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u252-b09/OpenJDK8U-jdk_ppc64le_linux_hotspot_8u252b09.tar.gz;
+- if test "X$ARCH" = "Xaarch64"; then JDK_URL=$JDK_ARM64; elif test 
"$ARCH" = "ppc64le"; then JDK_URL=$JDK_ppc64le; elif test "$ARCH" = "s390x"; 
then JDK_URL=$JDK_s390x; else JDK_URL=$JDK_X64; fi
 - wget -q $JDK_URL && tar xzf OpenJDK*.tar.gz
 - if test "$ARCH" = "s390x"; then mv jdk-11* jdk; else mv jdk8* jdk; fi
 - export JAVA_HOME=`pwd`/jdk


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



[GitHub] [tomcat] markt-asf merged pull request #326: Added changes required for ppc64le support

2020-08-12 Thread GitBox


markt-asf merged pull request #326:
URL: https://github.com/apache/tomcat/pull/326


   



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

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



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



Re: [PROPOSAL] Remove the functional specs from docs webapp

2020-08-12 Thread Coty Sutherland
On Mon, Aug 10, 2020 at 11:46 AM Mark Thomas  wrote:

> Hi all,
>
> I'd like to propose removing all the functional spec pages from the
> documentation web application.
>
> My reasoning for this proposal is, in short, that we aren't using or
> maintaining these pages.
>
> I don't recall any discussion of these docs on the dev list, proposals
> to change them, proposals for additions etc.
>
> There have been changes but going back over the changes from the last 10
> years (and there are very few of them) they each appear to be part of a
> wider global change that is updating something or removing references to
> a feature that has been removed.
>
> Should someone want to revive these pages, or more likely a subset of
> them, they'll always be in the history.
>
> Thoughts?
>

+1 to remove


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


[Bug 64427] --enable-preview no error in log

2020-08-12 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64427

Mark Thomas  changed:

   What|Removed |Added

 Resolution|--- |WORKSFORME
 Status|NEEDINFO|RESOLVED

--- Comment #10 from Mark Thomas  ---
Unable to reproduce and no response for getting on for 3 months.

-- 
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 64616] Change ETag format to Nginx like

2020-08-12 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64616

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #5 from Mark Thomas  ---
The original request (to align with Nginx format) will not be implemented. The
Default Servlet has been refactored to make it simpler for users to provide a
custom entity-tag of they wish.

-- 
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 64619] Regression: Removal of scratchdir fallback affects existing code

2020-08-12 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64619

Mark Thomas  changed:

   What|Removed |Added

 Resolution|--- |WONTFIX
 Status|NEW |RESOLVED

-- 
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: When installing Maven artifacts, install the source as well

2020-08-12 Thread fhanik
This is an automated email from the ASF dual-hosted git repository.

fhanik 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 46ee8f0  When installing Maven artifacts, install the source as well
46ee8f0 is described below

commit 46ee8f0fa6d0b5d421229a44c5e5ae48150bbc09
Author: Filip Hanik 
AuthorDate: Wed Aug 12 08:08:14 2020 -0700

When installing Maven artifacts, install the source as well
---
 res/maven/mvn-pub.xml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/res/maven/mvn-pub.xml b/res/maven/mvn-pub.xml
index 887578b..4ab26f7 100644
--- a/res/maven/mvn-pub.xml
+++ b/res/maven/mvn-pub.xml
@@ -52,6 +52,7 @@
 
 
   
+  
   
   
   


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



[Bug 64645] bin/service.bat doesn't handle wrongly configured JAVA_HOME

2020-08-12 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64645

Mark Thomas  changed:

   What|Removed |Added

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

--- Comment #5 from Mark Thomas  ---
Your understanding is incorrect. The scripts checks the validity of JAVA_HOME
and exits before it attempts to install the service if it is invalid.

Fixed in:
- master for 10.0.0-M8 onwards
- 9.0.x for 9.0.38 onwards
- 8.5.x for 8.5.58 onwards
- 7.0.x for 7.0.106 onwards

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



[tomcat] 01/02: Further ETag fixes

2020-08-12 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 21bb9a017a3c02bb55cd4cee73309e7365ab3692
Author: Mark Thomas 
AuthorDate: Wed Aug 12 12:46:00 2020 +0100

Further ETag fixes

Revert addition of useWeakComparisonWithIfMatch
Always use strong comparison for If-Match
Correct regression previous fix that returned wrong etag for a 304
response to If-None-Match
Based on pull requests by Sergey Ponomarev
---
 conf/web.xml   |  8 ---
 .../apache/catalina/servlets/DefaultServlet.java   | 82 --
 .../TestDefaultServletIfMatchRequests.java | 59 +---
 webapps/docs/changelog.xml |  3 +-
 webapps/docs/default-servlet.xml   |  6 --
 5 files changed, 77 insertions(+), 81 deletions(-)

diff --git a/conf/web.xml b/conf/web.xml
index 5eeb229..dccac75 100644
--- a/conf/web.xml
+++ b/conf/web.xml
@@ -99,14 +99,6 @@
   
   
   
-  
-  
-  
-  
-  
-  
-  
-  
 
 
 default
diff --git a/java/org/apache/catalina/servlets/DefaultServlet.java 
b/java/org/apache/catalina/servlets/DefaultServlet.java
index 103214d..04db1b5 100644
--- a/java/org/apache/catalina/servlets/DefaultServlet.java
+++ b/java/org/apache/catalina/servlets/DefaultServlet.java
@@ -267,8 +267,6 @@ public class DefaultServlet extends HttpServlet {
  */
 protected boolean showServerInfo = true;
 
-protected boolean useWeakComparisonWithIfMatch = true;
-
 
 // - Public Methods
 
@@ -320,11 +318,6 @@ public class DefaultServlet extends HttpServlet {
 useAcceptRanges = 
Boolean.parseBoolean(getServletConfig().getInitParameter("useAcceptRanges"));
 }
 
-if 
(getServletConfig().getInitParameter("useWeakComparisonWithIfMatch") != null) {
-useWeakComparisonWithIfMatch = Boolean.parseBoolean(
-
getServletConfig().getInitParameter("useWeakComparisonWithIfMatch"));
-}
-
 // Sanity check on the specified buffer sizes
 if (input < 256) {
 input = 256;
@@ -1918,31 +1911,32 @@ public class DefaultServlet extends HttpServlet {
  *  request processing is stopped
  * @throws IOException an IO error occurred
  */
-protected boolean checkIfMatch(HttpServletRequest request,
-HttpServletResponse response, ResourceAttributes 
resourceAttributes)
-throws IOException {
+protected boolean checkIfMatch(HttpServletRequest request, 
HttpServletResponse response,
+ResourceAttributes resourceAttributes) throws IOException {
 
-String eTag = generateETag(resourceAttributes);
-// Default servlet uses weak matching so we strip any leading "W/" and
-// then compare using equals
-if (eTag.startsWith("W/")) {
-eTag = eTag.substring(2);
-}
 String headerValue = request.getHeader("If-Match");
-if (headerValue != null && !headerValue.equals("*")) {
+if (headerValue != null) {
 
-Set eTags = EntityTag.parseEntityTag(new 
StringReader(headerValue), useWeakComparisonWithIfMatch);
-if (eTags == null) {
-if (debug > 10) {
-log("DefaultServlet.checkIfMatch:  Invalid header value [" 
+ headerValue + "]");
+boolean conditionSatisfied = false;
+
+if (!headerValue.equals("*")) {
+String resourceETag = generateETag(resourceAttributes);
+
+// RFC 7232 requires strong comparison for If-Match headers
+Set headerETags = EntityTag.parseEntityTag(new 
StringReader(headerValue), false);
+if (headerETags == null) {
+if (debug > 10) {
+log("DefaultServlet.checkIfMatch:  Invalid header 
value [" + headerValue + "]");
+}
+response.sendError(HttpServletResponse.SC_BAD_REQUEST);
+return false;
 }
-response.sendError(HttpServletResponse.SC_BAD_REQUEST);
-return false;
+conditionSatisfied = headerETags.contains(resourceETag);
+} else {
+conditionSatisfied = true;
 }
 
-// If none of the given ETags match, 412 Precondition failed is
-// sent back
-if (!eTags.contains(eTag)) {
+if (!conditionSatisfied) {
 response.sendError(HttpServletResponse.SC_PRECONDITION_FAILED);
 return false;
 }
@@ -1998,31 +1992,35 @@ public class DefaultServlet extends HttpServlet {
  *  request processing is stopped
  * @throws IOException an IO error occurred
  */
-protected boolean checkIfNoneMatch(HttpServletRequest request,
- 

[tomcat] branch 7.0.x updated (6f96d40 -> c26cb86)

2020-08-12 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 6f96d40  Fix indentation of versionLoggerListener.*
 new 21bb9a0  Further ETag fixes
 new c26cb86  Fix BZ 64645 Use non-zero exit code if script fails

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:
 bin/service.bat| 17 +++--
 conf/web.xml   |  8 ---
 .../apache/catalina/servlets/DefaultServlet.java   | 82 --
 .../TestDefaultServletIfMatchRequests.java | 59 +---
 webapps/docs/changelog.xml |  7 +-
 webapps/docs/default-servlet.xml   |  6 --
 6 files changed, 89 insertions(+), 90 deletions(-)


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



[tomcat] 02/02: Fix BZ 64645 Use non-zero exit code if script fails

2020-08-12 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 c26cb86fcdd3d95c480ba6e2a4212c97f362aa5d
Author: Mark Thomas 
AuthorDate: Wed Aug 12 16:12:04 2020 +0100

Fix BZ 64645 Use non-zero exit code if script fails

https://bz.apache.org/bugzilla/show_bug.cgi?id=64645
---
 bin/service.bat| 17 -
 webapps/docs/changelog.xml |  4 
 2 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/bin/service.bat b/bin/service.bat
index d9188ec..b170e64 100755
--- a/bin/service.bat
+++ b/bin/service.bat
@@ -67,7 +67,7 @@ if "x%1x" == "xx" goto displayUsage
 set SERVICE_USER=%1
 shift
 runas /env /savecred /user:%SERVICE_USER% "%COMSPEC% /K \"%SELF%\" 
%SERVICE_CMD% %SERVICE_NAME%"
-goto end
+exit /b 0
 
 rem Check the environment
 :checkEnv
@@ -98,7 +98,7 @@ echo Either the CATALINA_HOME environment variable is not 
defined correctly or
 echo the incorrect service name has been used.
 echo Both the CATALINA_HOME environment variable and the correct service name
 echo are required to run this program.
-goto end
+exit /b 1
 :okHome
 cd "%CURRENT_DIR%"
 
@@ -127,7 +127,7 @@ goto okJavaHome
 echo The JAVA_HOME environment variable is not defined correctly
 echo This environment variable is needed to run this program
 echo NB: JAVA_HOME should point to a JDK not a JRE
-goto end
+exit /b 1
 :okJavaHome
 if not "%CATALINA_BASE%" == "" goto gotBase
 set "CATALINA_BASE=%CATALINA_HOME%"
@@ -154,7 +154,7 @@ echo Unknown parameter "%SERVICE_CMD%"
 :displayUsage
 echo.
 echo Usage: service.bat install/remove [service_name [--rename]] [--user 
username]
-goto end
+exit /b 1
 
 :doRemove
 rem Remove the service
@@ -165,14 +165,14 @@ echo Using CATALINA_BASE:"%CATALINA_BASE%"
 --LogPath "%CATALINA_BASE%\logs"
 if not errorlevel 1 goto removed
 echo Failed removing '%SERVICE_NAME%' service
-goto end
+exit /b 1
 :removed
 echo The service '%SERVICE_NAME%' has been removed
 if exist "%CATALINA_HOME%\bin\%SERVICE_NAME%.exe" (
 rename "%SERVICE_NAME%.exe" "%DEFAULT_SERVICE_NAME%.exe"
 rename "%SERVICE_NAME%w.exe" "%DEFAULT_SERVICE_NAME%w.exe"
 )
-goto end
+exit /b 0
 
 :doInstall
 rem Install the service
@@ -232,8 +232,7 @@ if exist "%CATALINA_HOME%\bin\%DEFAULT_SERVICE_NAME%.exe" (
 --JvmMx "%JvmMx%"
 if not errorlevel 1 goto installed
 echo Failed installing '%SERVICE_NAME%' service
-goto end
+exit /b 1
 :installed
 echo The service '%SERVICE_NAME%' has been installed.
-
-:end
+exit /b 0
\ No newline at end of file
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index ae6e004..6309461 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -116,6 +116,10 @@
 Improve the quality of the Japanese translations provided with Apache
 Tomcat. Includes contributions from Yuki Shira. (markt)
   
+  
+64645: Use a non-zero exit code if the
+service.bat does not complete normally. (markt)
+  
 
   
 


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



[tomcat] branch 8.5.x updated: Fix BZ 64645 Use non-zero exit code if script fails

2020-08-12 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 c493589  Fix BZ 64645 Use non-zero exit code if script fails
c493589 is described below

commit c4935893c34c2a80517e0592cda745ef7fdf983e
Author: Mark Thomas 
AuthorDate: Wed Aug 12 16:12:04 2020 +0100

Fix BZ 64645 Use non-zero exit code if script fails

https://bz.apache.org/bugzilla/show_bug.cgi?id=64645
---
 bin/service.bat| 17 -
 webapps/docs/changelog.xml |  4 
 2 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/bin/service.bat b/bin/service.bat
index d9188ec..b170e64 100755
--- a/bin/service.bat
+++ b/bin/service.bat
@@ -67,7 +67,7 @@ if "x%1x" == "xx" goto displayUsage
 set SERVICE_USER=%1
 shift
 runas /env /savecred /user:%SERVICE_USER% "%COMSPEC% /K \"%SELF%\" 
%SERVICE_CMD% %SERVICE_NAME%"
-goto end
+exit /b 0
 
 rem Check the environment
 :checkEnv
@@ -98,7 +98,7 @@ echo Either the CATALINA_HOME environment variable is not 
defined correctly or
 echo the incorrect service name has been used.
 echo Both the CATALINA_HOME environment variable and the correct service name
 echo are required to run this program.
-goto end
+exit /b 1
 :okHome
 cd "%CURRENT_DIR%"
 
@@ -127,7 +127,7 @@ goto okJavaHome
 echo The JAVA_HOME environment variable is not defined correctly
 echo This environment variable is needed to run this program
 echo NB: JAVA_HOME should point to a JDK not a JRE
-goto end
+exit /b 1
 :okJavaHome
 if not "%CATALINA_BASE%" == "" goto gotBase
 set "CATALINA_BASE=%CATALINA_HOME%"
@@ -154,7 +154,7 @@ echo Unknown parameter "%SERVICE_CMD%"
 :displayUsage
 echo.
 echo Usage: service.bat install/remove [service_name [--rename]] [--user 
username]
-goto end
+exit /b 1
 
 :doRemove
 rem Remove the service
@@ -165,14 +165,14 @@ echo Using CATALINA_BASE:"%CATALINA_BASE%"
 --LogPath "%CATALINA_BASE%\logs"
 if not errorlevel 1 goto removed
 echo Failed removing '%SERVICE_NAME%' service
-goto end
+exit /b 1
 :removed
 echo The service '%SERVICE_NAME%' has been removed
 if exist "%CATALINA_HOME%\bin\%SERVICE_NAME%.exe" (
 rename "%SERVICE_NAME%.exe" "%DEFAULT_SERVICE_NAME%.exe"
 rename "%SERVICE_NAME%w.exe" "%DEFAULT_SERVICE_NAME%w.exe"
 )
-goto end
+exit /b 0
 
 :doInstall
 rem Install the service
@@ -232,8 +232,7 @@ if exist "%CATALINA_HOME%\bin\%DEFAULT_SERVICE_NAME%.exe" (
 --JvmMx "%JvmMx%"
 if not errorlevel 1 goto installed
 echo Failed installing '%SERVICE_NAME%' service
-goto end
+exit /b 1
 :installed
 echo The service '%SERVICE_NAME%' has been installed.
-
-:end
+exit /b 0
\ No newline at end of file
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 83581c4..db9d5a0 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -125,6 +125,10 @@
 Improve the quality of the Japanese translations provided with Apache
 Tomcat. Includes contributions from Yuki Shira. (markt)
   
+  
+64645: Use a non-zero exit code if the
+service.bat does not complete normally. (markt)
+  
 
   
 


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



[tomcat] branch 9.0.x updated: Fix BZ 64645 Use non-zero exit code if script fails

2020-08-12 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 a5060b6  Fix BZ 64645 Use non-zero exit code if script fails
a5060b6 is described below

commit a5060b6718c6658c57c67de7a6ea01ba7ab91892
Author: Mark Thomas 
AuthorDate: Wed Aug 12 16:12:04 2020 +0100

Fix BZ 64645 Use non-zero exit code if script fails

https://bz.apache.org/bugzilla/show_bug.cgi?id=64645
---
 bin/service.bat| 17 -
 webapps/docs/changelog.xml |  4 
 2 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/bin/service.bat b/bin/service.bat
index d9188ec..b170e64 100755
--- a/bin/service.bat
+++ b/bin/service.bat
@@ -67,7 +67,7 @@ if "x%1x" == "xx" goto displayUsage
 set SERVICE_USER=%1
 shift
 runas /env /savecred /user:%SERVICE_USER% "%COMSPEC% /K \"%SELF%\" 
%SERVICE_CMD% %SERVICE_NAME%"
-goto end
+exit /b 0
 
 rem Check the environment
 :checkEnv
@@ -98,7 +98,7 @@ echo Either the CATALINA_HOME environment variable is not 
defined correctly or
 echo the incorrect service name has been used.
 echo Both the CATALINA_HOME environment variable and the correct service name
 echo are required to run this program.
-goto end
+exit /b 1
 :okHome
 cd "%CURRENT_DIR%"
 
@@ -127,7 +127,7 @@ goto okJavaHome
 echo The JAVA_HOME environment variable is not defined correctly
 echo This environment variable is needed to run this program
 echo NB: JAVA_HOME should point to a JDK not a JRE
-goto end
+exit /b 1
 :okJavaHome
 if not "%CATALINA_BASE%" == "" goto gotBase
 set "CATALINA_BASE=%CATALINA_HOME%"
@@ -154,7 +154,7 @@ echo Unknown parameter "%SERVICE_CMD%"
 :displayUsage
 echo.
 echo Usage: service.bat install/remove [service_name [--rename]] [--user 
username]
-goto end
+exit /b 1
 
 :doRemove
 rem Remove the service
@@ -165,14 +165,14 @@ echo Using CATALINA_BASE:"%CATALINA_BASE%"
 --LogPath "%CATALINA_BASE%\logs"
 if not errorlevel 1 goto removed
 echo Failed removing '%SERVICE_NAME%' service
-goto end
+exit /b 1
 :removed
 echo The service '%SERVICE_NAME%' has been removed
 if exist "%CATALINA_HOME%\bin\%SERVICE_NAME%.exe" (
 rename "%SERVICE_NAME%.exe" "%DEFAULT_SERVICE_NAME%.exe"
 rename "%SERVICE_NAME%w.exe" "%DEFAULT_SERVICE_NAME%w.exe"
 )
-goto end
+exit /b 0
 
 :doInstall
 rem Install the service
@@ -232,8 +232,7 @@ if exist "%CATALINA_HOME%\bin\%DEFAULT_SERVICE_NAME%.exe" (
 --JvmMx "%JvmMx%"
 if not errorlevel 1 goto installed
 echo Failed installing '%SERVICE_NAME%' service
-goto end
+exit /b 1
 :installed
 echo The service '%SERVICE_NAME%' has been installed.
-
-:end
+exit /b 0
\ No newline at end of file
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index c884485..548456b 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -142,6 +142,10 @@
 Improve the quality of the Japanese translations provided with Apache
 Tomcat. Includes contributions from Yuki Shira. (markt)
   
+  
+64645: Use a non-zero exit code if the
+service.bat does not complete normally. (markt)
+  
 
   
 


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



[tomcat] branch master updated: Fix BZ 64645 Use non-zero exit code if script fails

2020-08-12 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 75b284c  Fix BZ 64645 Use non-zero exit code if script fails
75b284c is described below

commit 75b284cd71691bb39f44f3c75e23511ad74c0c5c
Author: Mark Thomas 
AuthorDate: Wed Aug 12 16:12:04 2020 +0100

Fix BZ 64645 Use non-zero exit code if script fails

https://bz.apache.org/bugzilla/show_bug.cgi?id=64645
---
 bin/service.bat| 17 -
 webapps/docs/changelog.xml |  4 
 2 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/bin/service.bat b/bin/service.bat
index d9188ec..b170e64 100755
--- a/bin/service.bat
+++ b/bin/service.bat
@@ -67,7 +67,7 @@ if "x%1x" == "xx" goto displayUsage
 set SERVICE_USER=%1
 shift
 runas /env /savecred /user:%SERVICE_USER% "%COMSPEC% /K \"%SELF%\" 
%SERVICE_CMD% %SERVICE_NAME%"
-goto end
+exit /b 0
 
 rem Check the environment
 :checkEnv
@@ -98,7 +98,7 @@ echo Either the CATALINA_HOME environment variable is not 
defined correctly or
 echo the incorrect service name has been used.
 echo Both the CATALINA_HOME environment variable and the correct service name
 echo are required to run this program.
-goto end
+exit /b 1
 :okHome
 cd "%CURRENT_DIR%"
 
@@ -127,7 +127,7 @@ goto okJavaHome
 echo The JAVA_HOME environment variable is not defined correctly
 echo This environment variable is needed to run this program
 echo NB: JAVA_HOME should point to a JDK not a JRE
-goto end
+exit /b 1
 :okJavaHome
 if not "%CATALINA_BASE%" == "" goto gotBase
 set "CATALINA_BASE=%CATALINA_HOME%"
@@ -154,7 +154,7 @@ echo Unknown parameter "%SERVICE_CMD%"
 :displayUsage
 echo.
 echo Usage: service.bat install/remove [service_name [--rename]] [--user 
username]
-goto end
+exit /b 1
 
 :doRemove
 rem Remove the service
@@ -165,14 +165,14 @@ echo Using CATALINA_BASE:"%CATALINA_BASE%"
 --LogPath "%CATALINA_BASE%\logs"
 if not errorlevel 1 goto removed
 echo Failed removing '%SERVICE_NAME%' service
-goto end
+exit /b 1
 :removed
 echo The service '%SERVICE_NAME%' has been removed
 if exist "%CATALINA_HOME%\bin\%SERVICE_NAME%.exe" (
 rename "%SERVICE_NAME%.exe" "%DEFAULT_SERVICE_NAME%.exe"
 rename "%SERVICE_NAME%w.exe" "%DEFAULT_SERVICE_NAME%w.exe"
 )
-goto end
+exit /b 0
 
 :doInstall
 rem Install the service
@@ -232,8 +232,7 @@ if exist "%CATALINA_HOME%\bin\%DEFAULT_SERVICE_NAME%.exe" (
 --JvmMx "%JvmMx%"
 if not errorlevel 1 goto installed
 echo Failed installing '%SERVICE_NAME%' service
-goto end
+exit /b 1
 :installed
 echo The service '%SERVICE_NAME%' has been installed.
-
-:end
+exit /b 0
\ No newline at end of file
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 8b20ced..312e2b9 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -151,6 +151,10 @@
 Improve the quality of the Japanese translations provided with Apache
 Tomcat. Includes contributions from Yuki Shira. (markt)
   
+  
+64645: Use a non-zero exit code if the
+service.bat does not complete normally. (markt)
+  
 
   
 


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



[tomcat] branch 9.0.x updated: When installing Maven artifacts, install the source as well

2020-08-12 Thread fhanik
This is an automated email from the ASF dual-hosted git repository.

fhanik 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 81baa13  When installing Maven artifacts, install the source as well
81baa13 is described below

commit 81baa13b5aadfac5f1d709abc2c0dd39c09d5ae0
Author: Filip Hanik 
AuthorDate: Wed Aug 12 08:08:14 2020 -0700

When installing Maven artifacts, install the source as well
---
 res/maven/mvn-pub.xml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/res/maven/mvn-pub.xml b/res/maven/mvn-pub.xml
index e811bb2..76b786c 100644
--- a/res/maven/mvn-pub.xml
+++ b/res/maven/mvn-pub.xml
@@ -52,6 +52,7 @@
 
 
   
+  
   
   
   


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



[GitHub] [tomcat] stokito opened a new pull request #338: Compare entity tag

2020-08-12 Thread GitBox


stokito opened a new pull request #338:
URL: https://github.com/apache/tomcat/pull/338


   Sorry for being annoying, this is just refactoring and performance 
optimization.
   Instead of parsing `If-Match` header to a HashSet we can make in-place 
comparison.
   Thus we can avoid of generation of garbage.



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

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



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



Re: Use of "constants" in Manager to generate HTML/CSS content

2020-08-12 Thread Konstantin Kolinko
вт, 28 июл. 2020 г. в 16:55, Christopher Schultz :
>
> All,
>
> I was looking at this PR[1] and wondering why we have huge swaths of
> CSS and HTML in a Java source file, instead of using e.g. JSP or some
> other content-generation framework.

I remember that I once read some praise for being able to use the
Manager web application when there is no Jasper and no JSP compiler
available. It was more than 5 years ago and I do not remember the
details - maybe it was some small system with limited hardware.

The Manager app does use JSPs nowadays, not for some unimportant
pages: listing of sessions and listing attributes of a session.

> I know, I hate JSP, too, but having large blocks of HTML and CSS in
> Java strings is just ... awful.
>
> Also, is there a particular reason we are using embedded CSS in the
> pages instead of an external CSS file?

Originally it was rather small. It grows with time.

A separate file needs a license header, so the size will grow.

> Ultimately, it would be a good idea to move all CSS and even styles
> into a separate CSS file so we can tighten-up the Content Security
> Policy on the manager app. This can help prevent attacks if there
> happens to be some kind of XSS vulnerability hiding in there somewhere.

I do not get how having a separate file mappers with Content Security Policy.

> Any objections to evicting the CSS to begin with?

No objection, if you want it.

We already have image files. Thus, why not?

> [1] https://github.com/apache/tomcat/pull/327

An odd PR. I see that it makes some visual changes, but there is no
description nor discussion what the actual changes are.

Best regards,
Konstantin Kolinko

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



Re: [PROPOSAL] Remove the functional specs from docs webapp

2020-08-12 Thread Keiichi Fujino
+1

2020年8月11日(火) 0:46 Mark Thomas :

> Hi all,
>
> I'd like to propose removing all the functional spec pages from the
> documentation web application.
>
> My reasoning for this proposal is, in short, that we aren't using or
> maintaining these pages.
>
> I don't recall any discussion of these docs on the dev list, proposals
> to change them, proposals for additions etc.
>
> There have been changes but going back over the changes from the last 10
> years (and there are very few of them) they each appear to be part of a
> wider global change that is updating something or removing references to
> a feature that has been removed.
>
> Should someone want to revive these pages, or more likely a subset of
> them, they'll always be in the history.
>
> Thoughts?
>
> Mark
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>

-- 
Keiichi.Fujino


[GitHub] [tomcat] stokito commented on pull request #337: Bug fix: If-None-Match: 304 response should return a real resource ETag

2020-08-12 Thread GitBox


stokito commented on pull request #337:
URL: https://github.com/apache/tomcat/pull/337#issuecomment-672871214


   I reviewed and it looks fine and simpler. I just want to note here for 
history that according RFC 7232 sec 2.3.2 if resource's real etag is weak than 
strong comparison always failed:
   
   ETag 1 | ETag 2 | Strong Comparison | Weak Comparison
   -- | -- | -- | --
   W/"1" | W/"1" | no match | match
   W/"1" | W/"2" | no match | no match
   W/"1" | "1" | no match | match
   "1" | "1" | match | match
   
   That's why in my version I added the note:
   
   // BZ 64265: By default Tomcat generates weak etag for resource.
   // But If-Match uses strong matching that expects a strong 
resource etag.
   // So we strip any leading "W/" and then compare using equals
   String resourceEtag = weakEtagToStrong(eTag);
   
   I.e. that code is a workaround for fact that Tomcat generates weak ETag for 
static resource while should generate strong (that was discussed in #324). Now 
when client will send the received weak etag it will always get 412. And this 
is correct according spec but may be unexpected for a client. But I'm pretty 
sure that nobody uses the `If-Match` anyway: a browser never sends it.
   I think that we should keep this version and instead in some feature 
releases switch Tomcat to generate strong etags by default.
   But this is another story.
   



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

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



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



Re: Use of "constants" in Manager to generate HTML/CSS content

2020-08-12 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Igal,

On 8/11/20 23:23, Igal Sapir wrote:
> Chris,
>
> On Mon, Aug 10, 2020 at 12:20 PM Martin Grigorov
> mailto:mgrigo...@apache.org>> wrote:
>
>
> On Tue, Jul 28, 2020, 16:48 Christopher Schultz
>  > wrote:
>
> All,
>
> I was looking at this PR[1] and wondering why we have huge swaths
> of CSS and HTML in a Java source file, instead of using e.g. JSP
> or some other content-generation framework.
>
> I know, I hate JSP, too, but having large blocks of HTML and CSS
> in Java strings is just ... awful.
>
> Also, is there a particular reason we are using embedded CSS in
> the pages instead of an external CSS file?
>
> Ultimately, it would be a good idea to move all CSS and even
> styles into a separate CSS file so we can tighten-up the Content
> Security Policy on the manager app. This can help prevent attacks
> if there happens to be some kind of XSS vulnerability hiding in
> there somewhere.
>
> Any objections to evicting the CSS to begin with?
>
>
>> It's funny, I was thinking the same thing a couple of weeks ago
>> but didn't want to cause a merge conflict for the PR so waited to
>> see what's going on with that, though as I commented on it I
>> don't like that it changes the theme colors, etc.
>
>> If you are already working on that then great.  If you haven't
>> started, and you have better things to do, I'd be happy to clean
>> that up so please LMK.

I've got a bunch of ACAH presentations to get done, so I'd be
perfectly happy to have you do this work :)

- -chris
-BEGIN PGP SIGNATURE-
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl8z7ogACgkQHPApP6U8
pFjMeBAAh3teSq45voa1dMj2BGTPmhTLq2Eu6y4L5KqjABZergqapfNZsKRUuiTZ
ze1Jpmjb+YfRkspi0nHZMN8K8LBibSh5cr+6SRydZSqada2vNdM1j4y2bCGwrJuY
fykU8adsIzbkQreN+70mzyObJFruUz4o/+PE7c5dc6xQXnZQ7TmxZxfHmAeVegNz
DS0itJXdc8Spnl9HFG+bZwQcKAMflakCxyb/aCjfkhZ4yxUwmX8ReL7ihQWoVH7b
IO85ipw8mJ6h89IfQMN89ZKzs2KRFTbVk7jepxOi4YRoG8P1a2lNcigKBQ6qi0DF
aGaiiTck58+q5uvWQDE7kWSm1MGmLz6bec5zknQ7Smgw2sQqykFLRDDia/v/gKRn
B1nmGp0aB8P5sReP3F/ipOFTXXOVT4N/8MHNv3EK2M+b5isYDzyCF96f7Q8ha+mA
NPh+CJlCWTpEvRjSuwd12DVL/12WyDtCI8fOHlrCCI2ks5L45JWFtQX26WvYZl6n
Z2WO4yg58CjTTxr66VAnuriZra6gSRfZyJCTUp2wImcrAR9pBiM7uB6D1e03hgP3
qiMSY/jSLRvv+aaXQTpc+ePFInKWE+iEgNh7s2njgYrS0dcn5ahhFgeioXtDV8ex
nTbucrv9ArTZ+XywnQSI8UHDA3bb2gAM+xnb31d8p83TEDv5how=
=jGCx
-END PGP SIGNATURE-

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



Re: [PROPOSAL] Remove the functional specs from docs webapp

2020-08-12 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Mark,

On 8/11/20 15:04, Mark Thomas wrote:
> On 11/08/2020 17:30, Michael Osipov wrote:
>> Am 2020-08-10 um 17:46 schrieb Mark Thomas:
>>> Hi all,
>>>
>>> I'd like to propose removing all the functional spec pages from
>>> the documentation web application.
>
> 
>
>> +1
>>
>> Can you list them specifically? I am a bit lost which you exactly
>> mean.
>
> Everything under:
>
> https://tomcat.apache.org/tomcat-10.0-doc/funcspecs/

Yeah... it seems like most of this stuff is covered under the Users
Guide and the Configuration guide.

+1 to removing them

- -chris
-BEGIN PGP SIGNATURE-
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl8z7jQACgkQHPApP6U8
pFj1Fw/+KlhG63peGtQyWhPoaQHtzRbnq1XqS9AxYveP7aqCskB24SApniZvd693
WjQmM9okoOMhoSqDWyg0ztvss3anL/jUDSDK3mkJSZ03/i21BnbwHUxJDa2we8AK
wScNkUpvneRxMXyMT5hx14ZSCp6BXe2Zeg2Y0431Su/eeHVAOYyGMrMNEXHWFtup
kVoJ2X0rfwmg12yyOsfvxcbqXFxDnueKX2hsQut6KC7UfyEz//C78AE49HJjrQNx
0Tap7Nz/OlUZ9t/GfHe+6WBQVX8H1q686EqMSiVvPrpmRlWkx67hP7C0eDWgfVty
Y2TWr/qvTQ0OUJXKjlciPnj/KVVLGm4tdFHnf/d+d7fJ6++2DiwTtXuGD0mZc+/W
5xiQFM3PZhqmB3MaP90vvE44rT+M4HMcwkTLWc+UdQlmpPLwPQE+gxwCSkvBnBfu
f8gpIREwPhlDEgwl0E0X9hblVMdEFKJtFZDj+cgv3qfTCm2530oDCucfd0LDzl0t
X294YuovyF1b0rvKRIf+zIVUDOrXOWwvsNZQIeWjdGYnkQdv2Kb4kFL0LjmjB+rl
QffseMDBzjikY2wN4cXXVTjEjfuabNe8vs3x9LuJypOWNyfmqrMV7f8kud+99IHY
G+QYoKc0Wjs3gvKHhYw9fFYEGqiUZirNkQxbhKbkTVjVIlqfpxQ=
=b53b
-END PGP SIGNATURE-

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



[GitHub] [tomcat] ChristopherSchultz commented on pull request #331: Remove White Spaces and extra lines from the JSP files

2020-08-12 Thread GitBox


ChristopherSchultz commented on pull request #331:
URL: https://github.com/apache/tomcat/pull/331#issuecomment-672868967


   Why tag me, specifically?
   
   This seems fragile. The `` tag-handling looks like it will only work if 
all the text is in the same text block. That's probably only going to be true 
in some very special cases.
   
   Adding this configuration should be done via a JSPServlet `` and 
not a system property.



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

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



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



[GitHub] [tomcat] markt-asf closed pull request #337: Bug fix: If-None-Match: 304 response should return a real resource ETag

2020-08-12 Thread GitBox


markt-asf closed pull request #337:
URL: https://github.com/apache/tomcat/pull/337


   



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

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



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



[GitHub] [tomcat] markt-asf commented on pull request #337: Bug fix: If-None-Match: 304 response should return a real resource ETag

2020-08-12 Thread GitBox


markt-asf commented on pull request #337:
URL: https://github.com/apache/tomcat/pull/337#issuecomment-672826428


   After looking at b26ad77 I have reverted the addition of 
`useWeakComparisonWithIfMatch` and switched If-Match to strong comparison. I've 
also fixed the regression you identified. With these changes the If-Match and 
If-None-Match code has diverged a little further. I thin kthe case for 
refactoring is rather borderline at the moment but take a look at the new code 
and see what you think.



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

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



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



[tomcat] branch 8.5.x updated: Further ETag fixes

2020-08-12 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 bc379af  Further ETag fixes
bc379af is described below

commit bc379af8e355e969d02bb60fb49e3026667522fa
Author: Mark Thomas 
AuthorDate: Wed Aug 12 12:46:00 2020 +0100

Further ETag fixes

Revert addition of useWeakComparisonWithIfMatch
Always use strong comparison for If-Match
Correct regression previous fix that returned wrong etag for a 304
response to If-None-Match
Based on pull requests by Sergey Ponomarev
---
 conf/web.xml   |  8 ---
 .../apache/catalina/servlets/DefaultServlet.java   | 76 ++
 .../TestDefaultServletIfMatchRequests.java | 59 +
 webapps/docs/changelog.xml |  3 +-
 webapps/docs/default-servlet.xml   |  6 --
 5 files changed, 70 insertions(+), 82 deletions(-)

diff --git a/conf/web.xml b/conf/web.xml
index d31b3a8..4392dcd 100644
--- a/conf/web.xml
+++ b/conf/web.xml
@@ -109,14 +109,6 @@
   
   
   
-  
-  
-  
-  
-  
-  
-  
-  
 
 
 default
diff --git a/java/org/apache/catalina/servlets/DefaultServlet.java 
b/java/org/apache/catalina/servlets/DefaultServlet.java
index e832a86..6785da2 100644
--- a/java/org/apache/catalina/servlets/DefaultServlet.java
+++ b/java/org/apache/catalina/servlets/DefaultServlet.java
@@ -287,8 +287,6 @@ public class DefaultServlet extends HttpServlet {
  */
 private boolean allowPartialPut = true;
 
-protected boolean useWeakComparisonWithIfMatch = true;
-
 
 // - Public Methods
 
@@ -358,11 +356,6 @@ public class DefaultServlet extends HttpServlet {
 useAcceptRanges = 
Boolean.parseBoolean(getServletConfig().getInitParameter("useAcceptRanges"));
 }
 
-if 
(getServletConfig().getInitParameter("useWeakComparisonWithIfMatch") != null) {
-useWeakComparisonWithIfMatch = Boolean.parseBoolean(
-
getServletConfig().getInitParameter("useWeakComparisonWithIfMatch"));
-}
-
 // Sanity check on the specified buffer sizes
 if (input < 256) {
 input = 256;
@@ -2317,31 +2310,32 @@ public class DefaultServlet extends HttpServlet {
  *  request processing is stopped
  * @throws IOException an IO error occurred
  */
-protected boolean checkIfMatch(HttpServletRequest request,
-HttpServletResponse response, WebResource resource)
+protected boolean checkIfMatch(HttpServletRequest request, 
HttpServletResponse response, WebResource resource)
 throws IOException {
 
-String eTag = generateETag(resource);
-// Default servlet uses weak matching so we strip any leading "W/" and
-// then compare using equals
-if (eTag.startsWith("W/")) {
-eTag = eTag.substring(2);
-}
 String headerValue = request.getHeader("If-Match");
-if (headerValue != null && !headerValue.equals("*")) {
+if (headerValue != null) {
 
-Set eTags = EntityTag.parseEntityTag(new 
StringReader(headerValue), useWeakComparisonWithIfMatch);
-if (eTags == null) {
-if (debug > 10) {
-log("DefaultServlet.checkIfMatch:  Invalid header value [" 
+ headerValue + "]");
+boolean conditionSatisfied = false;
+
+if (!headerValue.equals("*")) {
+String resourceETag = generateETag(resource);
+
+// RFC 7232 requires strong comparison for If-Match headers
+Set headerETags = EntityTag.parseEntityTag(new 
StringReader(headerValue), false);
+if (headerETags == null) {
+if (debug > 10) {
+log("DefaultServlet.checkIfMatch:  Invalid header 
value [" + headerValue + "]");
+}
+response.sendError(HttpServletResponse.SC_BAD_REQUEST);
+return false;
 }
-response.sendError(HttpServletResponse.SC_BAD_REQUEST);
-return false;
+conditionSatisfied = headerETags.contains(resourceETag);
+} else {
+conditionSatisfied = true;
 }
 
-// If none of the given ETags match, 412 Precondition failed is
-// sent back
-if (!eTags.contains(eTag)) {
+if (!conditionSatisfied) {
 response.sendError(HttpServletResponse.SC_PRECONDITION_FAILED);
 return false;
 }
@@ -2397,31 +2391,35 @@ public class DefaultServlet extends HttpServlet {
  *  request processing is stopped
  * @throws IOException an IO error occurred
  */
-protected 

[tomcat] branch 9.0.x updated: Further ETag fixes

2020-08-12 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 f380720  Further ETag fixes
f380720 is described below

commit f3807207447a8126087a5c236f9ceb07304630f6
Author: Mark Thomas 
AuthorDate: Wed Aug 12 12:46:00 2020 +0100

Further ETag fixes

Revert addition of useWeakComparisonWithIfMatch
Always use strong comparison for If-Match
Correct regression previous fix that returned wrong etag for a 304
response to If-None-Match
Based on pull requests by Sergey Ponomarev
---
 conf/web.xml   |  8 ---
 .../apache/catalina/servlets/DefaultServlet.java   | 76 ++
 .../TestDefaultServletIfMatchRequests.java | 59 +
 webapps/docs/changelog.xml |  3 +-
 webapps/docs/default-servlet.xml   |  6 --
 5 files changed, 70 insertions(+), 82 deletions(-)

diff --git a/conf/web.xml b/conf/web.xml
index 9bf1ef6..a9e29ee 100644
--- a/conf/web.xml
+++ b/conf/web.xml
@@ -109,14 +109,6 @@
   
   
   
-  
-  
-  
-  
-  
-  
-  
-  
 
 
 default
diff --git a/java/org/apache/catalina/servlets/DefaultServlet.java 
b/java/org/apache/catalina/servlets/DefaultServlet.java
index 3b6660d..1392bb9 100644
--- a/java/org/apache/catalina/servlets/DefaultServlet.java
+++ b/java/org/apache/catalina/servlets/DefaultServlet.java
@@ -280,8 +280,6 @@ public class DefaultServlet extends HttpServlet {
  */
 private boolean allowPartialPut = true;
 
-protected boolean useWeakComparisonWithIfMatch = true;
-
 
 // - Public Methods
 
@@ -351,11 +349,6 @@ public class DefaultServlet extends HttpServlet {
 useAcceptRanges = 
Boolean.parseBoolean(getServletConfig().getInitParameter("useAcceptRanges"));
 }
 
-if 
(getServletConfig().getInitParameter("useWeakComparisonWithIfMatch") != null) {
-useWeakComparisonWithIfMatch = Boolean.parseBoolean(
-
getServletConfig().getInitParameter("useWeakComparisonWithIfMatch"));
-}
-
 // Sanity check on the specified buffer sizes
 if (input < 256) {
 input = 256;
@@ -2238,31 +2231,32 @@ public class DefaultServlet extends HttpServlet {
  *  request processing is stopped
  * @throws IOException an IO error occurred
  */
-protected boolean checkIfMatch(HttpServletRequest request,
-HttpServletResponse response, WebResource resource)
+protected boolean checkIfMatch(HttpServletRequest request, 
HttpServletResponse response, WebResource resource)
 throws IOException {
 
-String eTag = generateETag(resource);
-// Default servlet uses weak matching so we strip any leading "W/" and
-// then compare using equals
-if (eTag.startsWith("W/")) {
-eTag = eTag.substring(2);
-}
 String headerValue = request.getHeader("If-Match");
-if (headerValue != null && !headerValue.equals("*")) {
+if (headerValue != null) {
 
-Set eTags = EntityTag.parseEntityTag(new 
StringReader(headerValue), useWeakComparisonWithIfMatch);
-if (eTags == null) {
-if (debug > 10) {
-log("DefaultServlet.checkIfMatch:  Invalid header value [" 
+ headerValue + "]");
+boolean conditionSatisfied = false;
+
+if (!headerValue.equals("*")) {
+String resourceETag = generateETag(resource);
+
+// RFC 7232 requires strong comparison for If-Match headers
+Set headerETags = EntityTag.parseEntityTag(new 
StringReader(headerValue), false);
+if (headerETags == null) {
+if (debug > 10) {
+log("DefaultServlet.checkIfMatch:  Invalid header 
value [" + headerValue + "]");
+}
+response.sendError(HttpServletResponse.SC_BAD_REQUEST);
+return false;
 }
-response.sendError(HttpServletResponse.SC_BAD_REQUEST);
-return false;
+conditionSatisfied = headerETags.contains(resourceETag);
+} else {
+conditionSatisfied = true;
 }
 
-// If none of the given ETags match, 412 Precondition failed is
-// sent back
-if (!eTags.contains(eTag)) {
+if (!conditionSatisfied) {
 response.sendError(HttpServletResponse.SC_PRECONDITION_FAILED);
 return false;
 }
@@ -2318,31 +2312,35 @@ public class DefaultServlet extends HttpServlet {
  *  request processing is stopped
  * @throws IOException an IO error occurred
  */
-protected 

[tomcat] branch master updated: Further ETag fixes

2020-08-12 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 c895def  Further ETag fixes
c895def is described below

commit c895deffb1fe881eaf7bd16a94b615266cda4bc0
Author: Mark Thomas 
AuthorDate: Wed Aug 12 12:46:00 2020 +0100

Further ETag fixes

Revert addition of useWeakComparisonWithIfMatch
Always use strong comparison for If-Match
Correct regression previous fix that returned wrong etag for a 304
response to If-None-Match
Based on pull requests by Sergey Ponomarev
---
 conf/web.xml   |  8 ---
 .../apache/catalina/servlets/DefaultServlet.java   | 76 ++
 .../TestDefaultServletIfMatchRequests.java | 59 +
 webapps/docs/changelog.xml |  3 +-
 webapps/docs/default-servlet.xml   |  6 --
 5 files changed, 70 insertions(+), 82 deletions(-)

diff --git a/conf/web.xml b/conf/web.xml
index b5e0b30..a685947 100644
--- a/conf/web.xml
+++ b/conf/web.xml
@@ -114,14 +114,6 @@
   
   
   
-  
-  
-  
-  
-  
-  
-  
-  
 
 
 default
diff --git a/java/org/apache/catalina/servlets/DefaultServlet.java 
b/java/org/apache/catalina/servlets/DefaultServlet.java
index 513353f..fac8907 100644
--- a/java/org/apache/catalina/servlets/DefaultServlet.java
+++ b/java/org/apache/catalina/servlets/DefaultServlet.java
@@ -280,8 +280,6 @@ public class DefaultServlet extends HttpServlet {
  */
 private boolean allowPartialPut = true;
 
-protected boolean useWeakComparisonWithIfMatch = true;
-
 
 // - Public Methods
 
@@ -351,11 +349,6 @@ public class DefaultServlet extends HttpServlet {
 useAcceptRanges = 
Boolean.parseBoolean(getServletConfig().getInitParameter("useAcceptRanges"));
 }
 
-if 
(getServletConfig().getInitParameter("useWeakComparisonWithIfMatch") != null) {
-useWeakComparisonWithIfMatch = Boolean.parseBoolean(
-
getServletConfig().getInitParameter("useWeakComparisonWithIfMatch"));
-}
-
 // Sanity check on the specified buffer sizes
 if (input < 256) {
 input = 256;
@@ -2171,31 +2164,32 @@ public class DefaultServlet extends HttpServlet {
  *  request processing is stopped
  * @throws IOException an IO error occurred
  */
-protected boolean checkIfMatch(HttpServletRequest request,
-HttpServletResponse response, WebResource resource)
+protected boolean checkIfMatch(HttpServletRequest request, 
HttpServletResponse response, WebResource resource)
 throws IOException {
 
-String eTag = generateETag(resource);
-// Default servlet uses weak matching so we strip any leading "W/" and
-// then compare using equals
-if (eTag.startsWith("W/")) {
-eTag = eTag.substring(2);
-}
 String headerValue = request.getHeader("If-Match");
-if (headerValue != null && !headerValue.equals("*")) {
+if (headerValue != null) {
 
-Set eTags = EntityTag.parseEntityTag(new 
StringReader(headerValue), useWeakComparisonWithIfMatch);
-if (eTags == null) {
-if (debug > 10) {
-log("DefaultServlet.checkIfMatch:  Invalid header value [" 
+ headerValue + "]");
+boolean conditionSatisfied = false;
+
+if (!headerValue.equals("*")) {
+String resourceETag = generateETag(resource);
+
+// RFC 7232 requires strong comparison for If-Match headers
+Set headerETags = EntityTag.parseEntityTag(new 
StringReader(headerValue), false);
+if (headerETags == null) {
+if (debug > 10) {
+log("DefaultServlet.checkIfMatch:  Invalid header 
value [" + headerValue + "]");
+}
+response.sendError(HttpServletResponse.SC_BAD_REQUEST);
+return false;
 }
-response.sendError(HttpServletResponse.SC_BAD_REQUEST);
-return false;
+conditionSatisfied = headerETags.contains(resourceETag);
+} else {
+conditionSatisfied = true;
 }
 
-// If none of the given ETags match, 412 Precondition failed is
-// sent back
-if (!eTags.contains(eTag)) {
+if (!conditionSatisfied) {
 response.sendError(HttpServletResponse.SC_PRECONDITION_FAILED);
 return false;
 }
@@ -2251,31 +2245,35 @@ public class DefaultServlet extends HttpServlet {
  *  request processing is stopped
  * @throws IOException an IO error occurred
  */
-protected 

Re: [tomcat] branch master updated: Improve entity tag handling

2020-08-12 Thread Mark Thomas
On 11/08/2020 18:52, Mark Thomas wrote:
> On 11/08/2020 18:06, Michael Osipov wrote:
>> Am 2020-08-11 um 18:53 schrieb Mark Thomas:
>>> On 11/08/2020 17:29, Michael Osipov wrote:
 Am 2020-08-11 um 16:52 schrieb ma...@apache.org:
>>>
>>> 
>>>
> commit bef507e1b7ac2eb0ff012d0d40035e218a5839cc
> Author: Mark Thomas 
> AuthorDate: Tue Aug 11 15:27:45 2020 +0100
>
>   Improve entity tag handling
> 
> 
> 
 Even an option for this is wrong. I agree that we cannto produce strong
 ETags by default, but it is now better decoupled and a subclass can
 handle this. Please retain the semantics as described in RFC 7232.
>>>
>>> It isn't possible to retain the semantics of RFC 7232 because Tomcat
>>> prior to this commit did not implement them.
>>>
>>> If you look at the code prior to this commit, any "W/" was stripped from
>>> the resource ETag and the ETag values in the If-Match header before
>>> comparison. The result of doing that is that the comparison is
>>> effectively a weak one rather than a strong one.
>>>
>>> The option is required to preserve backwards compatibility.
>>
>> Granted. This ultimately means that Tomcat 10 should remove this cruft
>> and be RFC-compliant. For previous versions a comment about behavioral
>> change/deprecation should be added too.
>>
>> Can we agree on this?
> 
> Maybe.
> 
> I'd lean towards changing the default in Tomcat 10 to the RFC 7232
> compliant behaviour with a view to removing the option in Tomcat 11 if
> the change in default doesn't trigger a bunch of user questions / bug
> reports etc.
> 
> If the consensus is to remove the option immediately in Tomcat 10 I can
> live with that but my preference would be to change the default in 10
> and remove in 11.
> 
> What do others think?

As pointed out in PR #337, using weak comparison with If-Match is fairly
new (Match 2020). Therefore, I think it is reasonable to treat that as a
regression and fix it. That means reverting the addition of the
useWeakComparisonWithIfMatch option.

Mark

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



[GitHub] [tomcat] markt-asf commented on pull request #337: Bug fix: If-None-Match: 304 response should return a real resource ETag

2020-08-12 Thread GitBox


markt-asf commented on pull request #337:
URL: https://github.com/apache/tomcat/pull/337#issuecomment-672805585


   Let me go an look at `b26ad77` in more detail. If the switch to weak 
comparison was introduced there then the case for fixing that and dropping 
`useWeakComparisonWithIfMatch` entirely is much stronger.



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

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



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



[GitHub] [tomcat] stokito commented on pull request #337: Bug fix: If-None-Match: 304 response should return a real resource ETag

2020-08-12 Thread GitBox


stokito commented on pull request #337:
URL: https://github.com/apache/tomcat/pull/337#issuecomment-672785490


   I added a commit that extracts common matching logic 



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

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



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



[Bug 64645] bin/service.bat doesn't handle wrongly configured JAVA_HOME

2020-08-12 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64645

--- Comment #4 from Jakub Moravec  ---
Hi Mark, 

   changing the exit code is definitely the most important action here. 

   That being said, my understanding is that at the moment, the validation
doesn't recognize that JRE is referenced by JAVA_HOME and thus the process
fails during installation of the service. If the validation was able to
recognize this and fail it sooner (with proper exit code), that seems to me to
be a better solution.

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



[GitHub] [tomcat] stokito commented on pull request #337: Bug fix: If-None-Match: 304 response should return a real resource ETag

2020-08-12 Thread GitBox


stokito commented on pull request #337:
URL: https://github.com/apache/tomcat/pull/337#issuecomment-672777683


   yes, you are right and I wanted to discuss it latter. The PR fixes only one 
specific problem + small refactoring.
   The problem that I see is that the new `useWeakComparisonWithIfMatch` flag 
is not complaint with RFC because it always should be strict.
   
   An origin server MUST use the strong comparison function when comparing 
entity-tags for If-Match (Section 2.3.2), since the client intends this 
precondition to prevent the method from being applied if there have been any 
changes to the representation data.
   
   In fact as far I understood the weak comparison for `If-Match` was 
implemented by mistake in scope of b26ad77f659de34d49dda5a248566a38383cec0e. 
And this happened recently. That means that in fact here we making the bug as a 
feature. This may have sense if there is a lot of users who used this behavior 
but in fact we definitely haven't any of them.
   
   Did I miss something? Can we simplify logic and and inline 
useWeakComparisonWithIfMatch as a false?



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

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



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



[GitHub] [tomcat] markt-asf commented on pull request #337: Bug fix: If-None-Match: 304 response should return a real resource ETag

2020-08-12 Thread GitBox


markt-asf commented on pull request #337:
URL: https://github.com/apache/tomcat/pull/337#issuecomment-672771845


   In reviewing this PR I've noticed another issue. The ETag obtained from the 
resource is unconditionally made strong before the comparison but that 
conversion should depend on `useWeakComparisonWithIfMatch`.
   I'm not convinced of the case for aligning the two methods and fixing this 
new issue looks like it will weaken that case.
   The test case change looks good. I'll add that, add a test for the new issue 
and then look at a fix for both issues.
   



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

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



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



[GitHub] [tomcat] michael-o commented on pull request #337: Bug fix: If-None-Match: 304 response should return a real resource ETag

2020-08-12 Thread GitBox


michael-o commented on pull request #337:
URL: https://github.com/apache/tomcat/pull/337#issuecomment-672641726


   The entire ETag handling requires an overhaul.



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

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



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



[GitHub] [tomcat] malaysf commented on pull request #332: Support sending the 100 continue response when the servlet reads the …

2020-08-12 Thread GitBox


malaysf commented on pull request #332:
URL: https://github.com/apache/tomcat/pull/332#issuecomment-672635038


   @michael-o Can you please review the updates? I believe I've addressed your 
comments. Thanks!



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

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



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