(tomcat) branch 9.0.x updated: Allow different implementations for RateLimitFilter
This is an automated email from the ASF dual-hosted git repository. isapir 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 f5f2d956f4 Allow different implementations for RateLimitFilter f5f2d956f4 is described below commit f5f2d956f45adad6506a1aee8cccdfd506b379e2 Author: Igal Sapir AuthorDate: Sat Oct 5 23:49:17 2024 -0700 Allow different implementations for RateLimitFilter --- .../apache/catalina/filters/RateLimitFilter.java | 82 ++-- java/org/apache/catalina/util/FastRateLimiter.java | 88 ++ java/org/apache/catalina/util/RateLimiter.java | 67 .../catalina/filters/TestRateLimitFilter.java | 7 +- webapps/docs/config/filter.xml | 4 + 5 files changed, 206 insertions(+), 42 deletions(-) diff --git a/java/org/apache/catalina/filters/RateLimitFilter.java b/java/org/apache/catalina/filters/RateLimitFilter.java index 58b8572a0c..688b54bda9 100644 --- a/java/org/apache/catalina/filters/RateLimitFilter.java +++ b/java/org/apache/catalina/filters/RateLimitFilter.java @@ -18,7 +18,7 @@ package org.apache.catalina.filters; import java.io.IOException; -import java.util.concurrent.ScheduledExecutorService; +import java.lang.reflect.InvocationTargetException; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; @@ -28,11 +28,10 @@ import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletResponse; -import org.apache.catalina.util.TimeBucketCounter; +import org.apache.catalina.util.RateLimiter; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; import org.apache.tomcat.util.res.StringManager; -import org.apache.tomcat.util.threads.ScheduledThreadPoolExecutor; /** * @@ -46,11 +45,13 @@ import org.apache.tomcat.util.threads.ScheduledThreadPoolExecutor; * the bucket time ends and a new bucket starts. * * - * The filter is optimized for efficiency and low overhead, so it converts some configured values to more efficient - * values. For example, a configuration of a 60 seconds time bucket is converted to 65.536 seconds. That allows for very - * fast bucket calculation using bit shift arithmetic. In order to remain true to the user intent, the configured number - * of requests is then multiplied by the same ratio, so a configuration of 100 Requests per 60 seconds, has the real - * values of 109 Requests per 65 seconds. + * The RateLimiter implementation can be set via the className init param. The default implementation, + * org.apache.catalina.util.FastRateLimiter, is optimized for efficiency and low overhead so it converts + * some configured values to more efficient values. For example, a configuration of a 60 seconds time bucket is + * converted to 65.536 seconds. That allows for very fast bucket calculation using bit shift arithmetic. In order to + * remain true to the user intent, the configured number of requests is then multiplied by the same ratio, so a + * configuration of 100 Requests per 60 seconds, has the real values of 109 Requests per 65 seconds. You can specify + * a different class as long as it implements the org.apache.catalina.util.RateLimiter interface. * * * It is common to set up different restrictions for different URIs. For example, a login page or authentication script @@ -125,14 +126,19 @@ public class RateLimitFilter extends GenericFilter { */ public static final String PARAM_STATUS_CODE = "statusCode"; +/** + * init-param to set a class name that implements RateLimiter + */ +public static final String PARAM_CLASS_NAME = "className"; + /** * init-param to set a custom status message if requests per duration exceeded */ public static final String PARAM_STATUS_MESSAGE = "statusMessage"; -transient TimeBucketCounter bucketCounter; +transient RateLimiter rateLimiter; -private int actualRequests; +private String rateLimitClassName = "org.apache.catalina.util.FastRateLimiter"; private int bucketRequests = DEFAULT_BUCKET_REQUESTS; @@ -148,20 +154,6 @@ public class RateLimitFilter extends GenericFilter { private static final StringManager sm = StringManager.getManager(RateLimitFilter.class); -/** - * @return the actual maximum allowed requests per time bucket - */ -public int getActualRequests() { -return actualRequests; -} - -/** - * @return the actual duration of a time bucket in milliseconds - */ -public int getActualDurationInSeconds() { -return bucketCounter.getActualDuration() / 1000; -} - @Override public void init() throws ServletException { @@ -193,18 +185,26 @@ public class RateLimitFilter extends GenericFilter { statusMessage = param; } -Sc
(tomcat) branch main updated: Allow different implementations for RateLimitFilter
This is an automated email from the ASF dual-hosted git repository. isapir pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/main by this push: new 9cc44dcca2 Allow different implementations for RateLimitFilter 9cc44dcca2 is described below commit 9cc44dcca224ebc5fc4f8c835e3c64f42ab04fc1 Author: Igal Sapir AuthorDate: Sat Oct 5 22:54:21 2024 -0700 Allow different implementations for RateLimitFilter --- .../apache/catalina/filters/RateLimitFilter.java | 82 ++-- java/org/apache/catalina/util/FastRateLimiter.java | 88 ++ java/org/apache/catalina/util/RateLimiter.java | 67 .../catalina/filters/TestRateLimitFilter.java | 7 +- webapps/docs/config/filter.xml | 4 + 5 files changed, 206 insertions(+), 42 deletions(-) diff --git a/java/org/apache/catalina/filters/RateLimitFilter.java b/java/org/apache/catalina/filters/RateLimitFilter.java index fe4674ccb7..a6cccbea30 100644 --- a/java/org/apache/catalina/filters/RateLimitFilter.java +++ b/java/org/apache/catalina/filters/RateLimitFilter.java @@ -18,7 +18,7 @@ package org.apache.catalina.filters; import java.io.IOException; -import java.util.concurrent.ScheduledExecutorService; +import java.lang.reflect.InvocationTargetException; import jakarta.servlet.FilterChain; import jakarta.servlet.FilterConfig; @@ -28,11 +28,10 @@ import jakarta.servlet.ServletRequest; import jakarta.servlet.ServletResponse; import jakarta.servlet.http.HttpServletResponse; -import org.apache.catalina.util.TimeBucketCounter; +import org.apache.catalina.util.RateLimiter; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; import org.apache.tomcat.util.res.StringManager; -import org.apache.tomcat.util.threads.ScheduledThreadPoolExecutor; /** * @@ -46,11 +45,13 @@ import org.apache.tomcat.util.threads.ScheduledThreadPoolExecutor; * the bucket time ends and a new bucket starts. * * - * The filter is optimized for efficiency and low overhead, so it converts some configured values to more efficient - * values. For example, a configuration of a 60 seconds time bucket is converted to 65.536 seconds. That allows for very - * fast bucket calculation using bit shift arithmetic. In order to remain true to the user intent, the configured number - * of requests is then multiplied by the same ratio, so a configuration of 100 Requests per 60 seconds, has the real - * values of 109 Requests per 65 seconds. + * The RateLimiter implementation can be set via the className init param. The default implementation, + * org.apache.catalina.util.FastRateLimiter, is optimized for efficiency and low overhead so it converts + * some configured values to more efficient values. For example, a configuration of a 60 seconds time bucket is + * converted to 65.536 seconds. That allows for very fast bucket calculation using bit shift arithmetic. In order to + * remain true to the user intent, the configured number of requests is then multiplied by the same ratio, so a + * configuration of 100 Requests per 60 seconds, has the real values of 109 Requests per 65 seconds. You can specify + * a different class as long as it implements the org.apache.catalina.util.RateLimiter interface. * * * It is common to set up different restrictions for different URIs. For example, a login page or authentication script @@ -125,14 +126,19 @@ public class RateLimitFilter extends GenericFilter { */ public static final String PARAM_STATUS_CODE = "statusCode"; +/** + * init-param to set a class name that implements RateLimiter + */ +public static final String PARAM_CLASS_NAME = "className"; + /** * init-param to set a custom status message if requests per duration exceeded */ public static final String PARAM_STATUS_MESSAGE = "statusMessage"; -transient TimeBucketCounter bucketCounter; +transient RateLimiter rateLimiter; -private int actualRequests; +private String rateLimitClassName = "org.apache.catalina.util.FastRateLimiter"; private int bucketRequests = DEFAULT_BUCKET_REQUESTS; @@ -148,20 +154,6 @@ public class RateLimitFilter extends GenericFilter { private static final StringManager sm = StringManager.getManager(RateLimitFilter.class); -/** - * @return the actual maximum allowed requests per time bucket - */ -public int getActualRequests() { -return actualRequests; -} - -/** - * @return the actual duration of a time bucket in milliseconds - */ -public int getActualDurationInSeconds() { -return bucketCounter.getActualDuration() / 1000; -} - @Override public void init() throws ServletException { @@ -193,18 +185,26 @@ public class RateLimitFilter extends GenericFilter { statusMessage = param; } -
Buildbot failure in on tomcat-12.0.x
Build status: BUILD FAILED: failed Snapshot deployed to ASF Maven snapshot repository (failure) Worker used: bb_worker2_ubuntu URL: https://ci2.apache.org/#builders/120/builds/115 Blamelist: Igal Sapir Build Text: failed Snapshot deployed to ASF Maven snapshot repository (failure) Status Detected: new failure Build Source Stamp: [branch main] 9cc44dcca224ebc5fc4f8c835e3c64f42ab04fc1 Steps: worker_preparation: 0 git: 0 shell: 0 shell_1: 0 shell_2: 0 shell_3: 0 shell_4: 0 shell_5: 0 shell_6: 0 compile: 1 shell_7: 0 shell_8: 0 shell_9: 2 -- ASF Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 11.0.x updated: Allow different implementations for RateLimitFilter
This is an automated email from the ASF dual-hosted git repository. isapir pushed a commit to branch 11.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/11.0.x by this push: new 80d96acf4e Allow different implementations for RateLimitFilter 80d96acf4e is described below commit 80d96acf4e899f91c11ff961a5d0d0103e139ee1 Author: Igal Sapir AuthorDate: Sat Oct 5 23:19:16 2024 -0700 Allow different implementations for RateLimitFilter --- .../apache/catalina/filters/RateLimitFilter.java | 82 ++-- java/org/apache/catalina/util/FastRateLimiter.java | 88 ++ java/org/apache/catalina/util/RateLimiter.java | 67 .../catalina/filters/TestRateLimitFilter.java | 7 +- webapps/docs/config/filter.xml | 4 + 5 files changed, 206 insertions(+), 42 deletions(-) diff --git a/java/org/apache/catalina/filters/RateLimitFilter.java b/java/org/apache/catalina/filters/RateLimitFilter.java index fe4674ccb7..a6cccbea30 100644 --- a/java/org/apache/catalina/filters/RateLimitFilter.java +++ b/java/org/apache/catalina/filters/RateLimitFilter.java @@ -18,7 +18,7 @@ package org.apache.catalina.filters; import java.io.IOException; -import java.util.concurrent.ScheduledExecutorService; +import java.lang.reflect.InvocationTargetException; import jakarta.servlet.FilterChain; import jakarta.servlet.FilterConfig; @@ -28,11 +28,10 @@ import jakarta.servlet.ServletRequest; import jakarta.servlet.ServletResponse; import jakarta.servlet.http.HttpServletResponse; -import org.apache.catalina.util.TimeBucketCounter; +import org.apache.catalina.util.RateLimiter; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; import org.apache.tomcat.util.res.StringManager; -import org.apache.tomcat.util.threads.ScheduledThreadPoolExecutor; /** * @@ -46,11 +45,13 @@ import org.apache.tomcat.util.threads.ScheduledThreadPoolExecutor; * the bucket time ends and a new bucket starts. * * - * The filter is optimized for efficiency and low overhead, so it converts some configured values to more efficient - * values. For example, a configuration of a 60 seconds time bucket is converted to 65.536 seconds. That allows for very - * fast bucket calculation using bit shift arithmetic. In order to remain true to the user intent, the configured number - * of requests is then multiplied by the same ratio, so a configuration of 100 Requests per 60 seconds, has the real - * values of 109 Requests per 65 seconds. + * The RateLimiter implementation can be set via the className init param. The default implementation, + * org.apache.catalina.util.FastRateLimiter, is optimized for efficiency and low overhead so it converts + * some configured values to more efficient values. For example, a configuration of a 60 seconds time bucket is + * converted to 65.536 seconds. That allows for very fast bucket calculation using bit shift arithmetic. In order to + * remain true to the user intent, the configured number of requests is then multiplied by the same ratio, so a + * configuration of 100 Requests per 60 seconds, has the real values of 109 Requests per 65 seconds. You can specify + * a different class as long as it implements the org.apache.catalina.util.RateLimiter interface. * * * It is common to set up different restrictions for different URIs. For example, a login page or authentication script @@ -125,14 +126,19 @@ public class RateLimitFilter extends GenericFilter { */ public static final String PARAM_STATUS_CODE = "statusCode"; +/** + * init-param to set a class name that implements RateLimiter + */ +public static final String PARAM_CLASS_NAME = "className"; + /** * init-param to set a custom status message if requests per duration exceeded */ public static final String PARAM_STATUS_MESSAGE = "statusMessage"; -transient TimeBucketCounter bucketCounter; +transient RateLimiter rateLimiter; -private int actualRequests; +private String rateLimitClassName = "org.apache.catalina.util.FastRateLimiter"; private int bucketRequests = DEFAULT_BUCKET_REQUESTS; @@ -148,20 +154,6 @@ public class RateLimitFilter extends GenericFilter { private static final StringManager sm = StringManager.getManager(RateLimitFilter.class); -/** - * @return the actual maximum allowed requests per time bucket - */ -public int getActualRequests() { -return actualRequests; -} - -/** - * @return the actual duration of a time bucket in milliseconds - */ -public int getActualDurationInSeconds() { -return bucketCounter.getActualDuration() / 1000; -} - @Override public void init() throws ServletException { @@ -193,18 +185,26 @@ public class RateLimitFilter extends GenericFilter { statusMessage = param; }
(tomcat) branch 10.1.x updated: Allow different implementations for RateLimitFilter
This is an automated email from the ASF dual-hosted git repository. isapir pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/10.1.x by this push: new ae96cbd19c Allow different implementations for RateLimitFilter ae96cbd19c is described below commit ae96cbd19ca776e74f701b1bca0014c2529a47f3 Author: Igal Sapir AuthorDate: Sat Oct 5 23:34:14 2024 -0700 Allow different implementations for RateLimitFilter --- .../apache/catalina/filters/RateLimitFilter.java | 82 ++-- java/org/apache/catalina/util/FastRateLimiter.java | 88 ++ java/org/apache/catalina/util/RateLimiter.java | 67 .../catalina/filters/TestRateLimitFilter.java | 7 +- webapps/docs/config/filter.xml | 4 + 5 files changed, 206 insertions(+), 42 deletions(-) diff --git a/java/org/apache/catalina/filters/RateLimitFilter.java b/java/org/apache/catalina/filters/RateLimitFilter.java index fe4674ccb7..a6cccbea30 100644 --- a/java/org/apache/catalina/filters/RateLimitFilter.java +++ b/java/org/apache/catalina/filters/RateLimitFilter.java @@ -18,7 +18,7 @@ package org.apache.catalina.filters; import java.io.IOException; -import java.util.concurrent.ScheduledExecutorService; +import java.lang.reflect.InvocationTargetException; import jakarta.servlet.FilterChain; import jakarta.servlet.FilterConfig; @@ -28,11 +28,10 @@ import jakarta.servlet.ServletRequest; import jakarta.servlet.ServletResponse; import jakarta.servlet.http.HttpServletResponse; -import org.apache.catalina.util.TimeBucketCounter; +import org.apache.catalina.util.RateLimiter; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; import org.apache.tomcat.util.res.StringManager; -import org.apache.tomcat.util.threads.ScheduledThreadPoolExecutor; /** * @@ -46,11 +45,13 @@ import org.apache.tomcat.util.threads.ScheduledThreadPoolExecutor; * the bucket time ends and a new bucket starts. * * - * The filter is optimized for efficiency and low overhead, so it converts some configured values to more efficient - * values. For example, a configuration of a 60 seconds time bucket is converted to 65.536 seconds. That allows for very - * fast bucket calculation using bit shift arithmetic. In order to remain true to the user intent, the configured number - * of requests is then multiplied by the same ratio, so a configuration of 100 Requests per 60 seconds, has the real - * values of 109 Requests per 65 seconds. + * The RateLimiter implementation can be set via the className init param. The default implementation, + * org.apache.catalina.util.FastRateLimiter, is optimized for efficiency and low overhead so it converts + * some configured values to more efficient values. For example, a configuration of a 60 seconds time bucket is + * converted to 65.536 seconds. That allows for very fast bucket calculation using bit shift arithmetic. In order to + * remain true to the user intent, the configured number of requests is then multiplied by the same ratio, so a + * configuration of 100 Requests per 60 seconds, has the real values of 109 Requests per 65 seconds. You can specify + * a different class as long as it implements the org.apache.catalina.util.RateLimiter interface. * * * It is common to set up different restrictions for different URIs. For example, a login page or authentication script @@ -125,14 +126,19 @@ public class RateLimitFilter extends GenericFilter { */ public static final String PARAM_STATUS_CODE = "statusCode"; +/** + * init-param to set a class name that implements RateLimiter + */ +public static final String PARAM_CLASS_NAME = "className"; + /** * init-param to set a custom status message if requests per duration exceeded */ public static final String PARAM_STATUS_MESSAGE = "statusMessage"; -transient TimeBucketCounter bucketCounter; +transient RateLimiter rateLimiter; -private int actualRequests; +private String rateLimitClassName = "org.apache.catalina.util.FastRateLimiter"; private int bucketRequests = DEFAULT_BUCKET_REQUESTS; @@ -148,20 +154,6 @@ public class RateLimitFilter extends GenericFilter { private static final StringManager sm = StringManager.getManager(RateLimitFilter.class); -/** - * @return the actual maximum allowed requests per time bucket - */ -public int getActualRequests() { -return actualRequests; -} - -/** - * @return the actual duration of a time bucket in milliseconds - */ -public int getActualDurationInSeconds() { -return bucketCounter.getActualDuration() / 1000; -} - @Override public void init() throws ServletException { @@ -193,18 +185,26 @@ public class RateLimitFilter extends GenericFilter { statusMessage = param; }
Re: [VOTE] Release Apache Tomcat 9.0.96
On Sat, Oct 5, 2024 at 7:51 PM Christopher Schultz wrote: > > Rémy, > > Thanks for RMing. > > On 10/3/24 16:32, Rémy Maucherat wrote: > > The proposed Apache Tomcat 9.0.96 release is now available for voting. > > > > The notable changes compared to 9.0.95 are: > > > > - Multiple fixes and improvements for WebDAV. > > > > - Improvements to the recently adding request/response recycling for > > HTTP/2. > > > > - Improve the stability of Tomcat Native during GC. > > > > For full details, see the changelog: > > https://nightlies.apache.org/tomcat/tomcat-9.0.x/docs/changelog.html > > > > It can be obtained from: > > https://dist.apache.org/repos/dist/dev/tomcat/tomcat-9/v9.0.96/ > > > > The Maven staging repo is: > > https://repository.apache.org/content/repositories/orgapachetomcat-1519 > > > > The tag is: > > https://github.com/apache/tomcat/tree/9.0.96 > > 7ecea31658766b7d0ce7fee5a34564b67c68e789 > > > > The proposed 9.0.96 release is: > > [ ] -1, Broken - do not release > > [ ] +1, Stable - go ahead and release as 9.0.96 > > +1 for stable release. > > Build is reproducible on MacOS x86-64 and the unit tests pass in that > environment except the FFM tests are skipped and I don't know why. (I DO > have set java-ffm.home to my Java 22 installation.) Ok, first thing to check is if the necessary extra classes have been compiled and are in the lib/tomcat-coyote-ffm.jar Assuming the classes are there, if I run ant test with Java 22 (with test.entry=org.apache.tomcat.util.net.TestSsl for example since this is the basics), the FFM tests will not be skipped. If there's a problem loading OpenSSL or something, it will skip and of course with MacOS it is a bit different. Rémy > Works with a vanilla servlet-based application in a development environment. > > Details: > * Environment > * Java (build):openjdk version "17.0.12" 2024-07-16 OpenJDK Runtime > Environment Temurin-17.0.12+7 (build 17.0.12+7) OpenJDK 64-Bit Server VM > Temurin-17.0.12+7 (build 17.0.12+7, mixed mode) > * Java (test): openjdk version "22.0.2" 2024-07-16 OpenJDK Runtime > Environment Temurin-22.0.2+9 (build 22.0.2+9) OpenJDK 64-Bit Server VM > Temurin-22.0.2+9 (build 22.0.2+9, mixed mode) > * Ant: Apache Ant(TM) version 1.10.15 compiled on August 25 > 2024 > * OS: Darwin 23.6.0 x86_64 > * cc: Apple clang version 12.0.5 (clang-1205.0.22.9) > * make:GNU Make 3.81 > * OpenSSL: OpenSSL 3.3.2 3 Sep 2024 (Library: OpenSSL 3.3.2 3 > Sep 2024) > * APR: 1.7.5 > * > * Valid SHA-512 signature for apache-tomcat-9.0.96.zip > * Valid GPG signature for apache-tomcat-9.0.96.zip > * Valid SHA-512 signature for apache-tomcat-9.0.96.tar.gz > * Valid GPG signature for apache-tomcat-9.0.96.tar.gz > * Valid SHA-512 signature for apache-tomcat-9.0.96.exe > * Valid GPG signature for apache-tomcat-9.0.96.exe > * Valid Windows Digital Signature for apache-tomcat-9.0.96.exe > * Valid SHA512 signature for apache-tomcat-9.0.96-src.zip > * Valid GPG signature for apache-tomcat-9.0.96-src.zip > * Valid SHA512 signature for apache-tomcat-9.0.96-src.tar.gz > * Valid GPG signature for apache-tomcat-9.0.96-src.tar.gz > * > * Binary Zip and tarball: Same > * Source Zip and tarball: Same > * > * Building dependencies returned: 0 > * tcnative builds cleanly > * Tomcat builds cleanly > * Junit Tests: PASSED > > > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Buildbot failure in on tomcat-9.0.x
Build status: BUILD FAILED: failed compile (failure) Worker used: bb_worker2_ubuntu URL: https://ci2.apache.org/#builders/37/builds/1113 Blamelist: Michael Osipov Build Text: failed compile (failure) Status Detected: new failure Build Source Stamp: [branch 9.0.x] 0746ea9be8dea5d43b82c5c0168b6525da22068f Steps: worker_preparation: 0 git: 0 shell: 0 shell_1: 0 shell_2: 0 shell_3: 0 shell_4: 0 shell_5: 0 compile: 1 shell_6: 0 shell_7: 0 shell_8: 0 shell_9: 0 Rsync docs to nightlies.apache.org: 0 shell_10: 0 Rsync RAT to nightlies.apache.org: 0 compile_1: 2 shell_11: 0 Rsync Logs to nightlies.apache.org: 0 -- ASF Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 11.0.x updated: Improve HTML output of DefaultServlet
This is an automated email from the ASF dual-hosted git repository. michaelo pushed a commit to branch 11.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/11.0.x by this push: new 4108bf15b5 Improve HTML output of DefaultServlet 4108bf15b5 is described below commit 4108bf15b54cc82b56736edf07cff4561e8d457c Author: Michael Osipov AuthorDate: Sat Oct 5 19:18:17 2024 +0200 Improve HTML output of DefaultServlet --- java/org/apache/catalina/servlets/DefaultServlet.java | 17 + webapps/docs/changelog.xml| 3 +++ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/java/org/apache/catalina/servlets/DefaultServlet.java b/java/org/apache/catalina/servlets/DefaultServlet.java index abbef0dc09..1dce680db8 100644 --- a/java/org/apache/catalina/servlets/DefaultServlet.java +++ b/java/org/apache/catalina/servlets/DefaultServlet.java @@ -1658,7 +1658,8 @@ public class DefaultServlet extends HttpServlet { String rewrittenContextPath = rewriteUrl(contextPath); // Render the page header -sb.append("\r\n"); +sb.append("\r\n"); +sb.append("\r\n"); /* * TODO Activate this as soon as we use smClient with the request locales * sb.append("\r\n"); @@ -1669,9 +1670,9 @@ public class DefaultServlet extends HttpServlet { sb.append("\r\n"); sb.append(""); sb.append(org.apache.catalina.util.TomcatCSS.TOMCAT_CSS); -sb.append(" "); +sb.append("\r\n"); sb.append("\r\n"); -sb.append(""); +sb.append("\r\n"); sb.append(""); sb.append(sm.getString("directory.title", directoryWebappPath)); @@ -1699,8 +1700,8 @@ public class DefaultServlet extends HttpServlet { sb.append(""); } -sb.append(""); -sb.append(""); +sb.append("\r\n"); +sb.append("\r\n"); sb.append("\r\n"); @@ -1805,16 +1806,16 @@ public class DefaultServlet extends HttpServlet { // Render the page footer sb.append("\r\n"); -sb.append(""); +sb.append("\r\n"); String readme = getReadme(resource, encoding); if (readme != null) { sb.append(readme); -sb.append(""); +sb.append("\r\n"); } if (showServerInfo) { - sb.append("").append(ServerInfo.getServerInfo()).append(""); + sb.append("").append(ServerInfo.getServerInfo()).append("\r\n"); } sb.append("\r\n"); sb.append("\r\n"); diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index d2d8a98ada..f70a705d19 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -115,6 +115,9 @@ 69373: Make DefaultServlet's HTML listing file last modified rendering better (flexible). (michaelo) + +Improve HTML output of DefaultServlet. (michaelo) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch main updated (7a00ebdf59 -> b1fd1c457a)
This is an automated email from the ASF dual-hosted git repository. michaelo pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git from 7a00ebdf59 BZ 69373: Make DefaultServlet's HTML listing file last modified rendering better (flexible) add b1fd1c457a Improve HTML output of DefaultServlet No new revisions were added by this update. Summary of changes: java/org/apache/catalina/servlets/DefaultServlet.java | 17 + webapps/docs/changelog.xml| 3 +++ 2 files changed, 12 insertions(+), 8 deletions(-) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 10.1.x updated: Improve HTML output of DefaultServlet
This is an automated email from the ASF dual-hosted git repository. michaelo pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/10.1.x by this push: new 4c5a2697fa Improve HTML output of DefaultServlet 4c5a2697fa is described below commit 4c5a2697facb00b3f9606f827d7daf443da8e2a6 Author: Michael Osipov AuthorDate: Sat Oct 5 19:18:17 2024 +0200 Improve HTML output of DefaultServlet --- java/org/apache/catalina/servlets/DefaultServlet.java | 17 + webapps/docs/changelog.xml| 3 +++ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/java/org/apache/catalina/servlets/DefaultServlet.java b/java/org/apache/catalina/servlets/DefaultServlet.java index 862c4c5fa0..385ba14af9 100644 --- a/java/org/apache/catalina/servlets/DefaultServlet.java +++ b/java/org/apache/catalina/servlets/DefaultServlet.java @@ -1684,7 +1684,8 @@ public class DefaultServlet extends HttpServlet { String rewrittenContextPath = rewriteUrl(contextPath); // Render the page header -sb.append("\r\n"); +sb.append("\r\n"); +sb.append("\r\n"); /* * TODO Activate this as soon as we use smClient with the request locales * sb.append("\r\n"); @@ -1695,9 +1696,9 @@ public class DefaultServlet extends HttpServlet { sb.append("\r\n"); sb.append(""); sb.append(org.apache.catalina.util.TomcatCSS.TOMCAT_CSS); -sb.append(" "); +sb.append("\r\n"); sb.append("\r\n"); -sb.append(""); +sb.append("\r\n"); sb.append(""); sb.append(sm.getString("directory.title", directoryWebappPath)); @@ -1725,8 +1726,8 @@ public class DefaultServlet extends HttpServlet { sb.append(""); } -sb.append(""); -sb.append(""); +sb.append("\r\n"); +sb.append("\r\n"); sb.append("\r\n"); @@ -1831,16 +1832,16 @@ public class DefaultServlet extends HttpServlet { // Render the page footer sb.append("\r\n"); -sb.append(""); +sb.append("\r\n"); String readme = getReadme(resource, encoding); if (readme != null) { sb.append(readme); -sb.append(""); +sb.append("\r\n"); } if (showServerInfo) { - sb.append("").append(ServerInfo.getServerInfo()).append(""); + sb.append("").append(ServerInfo.getServerInfo()).append("\r\n"); } sb.append("\r\n"); sb.append("\r\n"); diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index c9a27fbdeb..d46dfce754 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -115,6 +115,9 @@ 69373: Make DefaultServlet's HTML listing file last modified rendering better (flexible). (michaelo) + +Improve HTML output of DefaultServlet. (michaelo) + - 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: Improve HTML output of DefaultServlet
This is an automated email from the ASF dual-hosted git repository. michaelo 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 0746ea9be8 Improve HTML output of DefaultServlet 0746ea9be8 is described below commit 0746ea9be8dea5d43b82c5c0168b6525da22068f Author: Michael Osipov AuthorDate: Sat Oct 5 19:18:17 2024 +0200 Improve HTML output of DefaultServlet --- java/org/apache/catalina/servlets/DefaultServlet.java | 17 + webapps/docs/changelog.xml| 3 +++ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/java/org/apache/catalina/servlets/DefaultServlet.java b/java/org/apache/catalina/servlets/DefaultServlet.java index 4ec1a3bdd0..3b33c0fc29 100644 --- a/java/org/apache/catalina/servlets/DefaultServlet.java +++ b/java/org/apache/catalina/servlets/DefaultServlet.java @@ -1744,7 +1744,8 @@ public class DefaultServlet extends HttpServlet { String rewrittenContextPath = rewriteUrl(contextPath); // Render the page header -sb.append("\r\n"); +sb.append("\r\n"); +sb.append("\r\n"); /* * TODO Activate this as soon as we use smClient with the request locales * sb.append("\r\n"); @@ -1755,9 +1756,9 @@ public class DefaultServlet extends HttpServlet { sb.append("\r\n"); sb.append(""); sb.append(org.apache.catalina.util.TomcatCSS.TOMCAT_CSS); -sb.append(" "); +sb.append("\r\n"); sb.append("\r\n"); -sb.append(""); +sb.append("\r\n"); sb.append(""); sb.append(sm.getString("directory.title", directoryWebappPath)); @@ -1785,8 +1786,8 @@ public class DefaultServlet extends HttpServlet { sb.append(""); } -sb.append(""); -sb.append(""); +sb.append("\r\n"); +sb.append("\r\n"); sb.append("\r\n"); @@ -1891,16 +1892,16 @@ public class DefaultServlet extends HttpServlet { // Render the page footer sb.append("\r\n"); -sb.append(""); +sb.append("\r\n"); String readme = getReadme(resource, encoding); if (readme != null) { sb.append(readme); -sb.append(""); +sb.append("\r\n"); } if (showServerInfo) { - sb.append("").append(ServerInfo.getServerInfo()).append(""); + sb.append("").append(ServerInfo.getServerInfo()).append("\r\n"); } sb.append("\r\n"); sb.append("\r\n"); diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 54f8f7b756..98424af9e3 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -115,6 +115,9 @@ 69373: Make DefaultServlet's HTML listing file last modified rendering better (flexible). (michaelo) + +Improve HTML output of DefaultServlet. (michaelo) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 69370] DefaultServlet's HTML listing uses incorrect labels
https://bz.apache.org/bugzilla/show_bug.cgi?id=69370 Michael Osipov changed: What|Removed |Added Summary|DefaultServlet's listing|DefaultServlet's HTML |uses incorrect labels |listing uses incorrect ||labels -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [VOTE] Release Apache Tomcat 9.0.96
Rémy, Thanks for RMing. On 10/3/24 16:32, Rémy Maucherat wrote: The proposed Apache Tomcat 9.0.96 release is now available for voting. The notable changes compared to 9.0.95 are: - Multiple fixes and improvements for WebDAV. - Improvements to the recently adding request/response recycling for HTTP/2. - Improve the stability of Tomcat Native during GC. For full details, see the changelog: https://nightlies.apache.org/tomcat/tomcat-9.0.x/docs/changelog.html It can be obtained from: https://dist.apache.org/repos/dist/dev/tomcat/tomcat-9/v9.0.96/ The Maven staging repo is: https://repository.apache.org/content/repositories/orgapachetomcat-1519 The tag is: https://github.com/apache/tomcat/tree/9.0.96 7ecea31658766b7d0ce7fee5a34564b67c68e789 The proposed 9.0.96 release is: [ ] -1, Broken - do not release [ ] +1, Stable - go ahead and release as 9.0.96 +1 for stable release. Build is reproducible on MacOS x86-64 and the unit tests pass in that environment except the FFM tests are skipped and I don't know why. (I DO have set java-ffm.home to my Java 22 installation.) Works with a vanilla servlet-based application in a development environment. Details: * Environment * Java (build):openjdk version "17.0.12" 2024-07-16 OpenJDK Runtime Environment Temurin-17.0.12+7 (build 17.0.12+7) OpenJDK 64-Bit Server VM Temurin-17.0.12+7 (build 17.0.12+7, mixed mode) * Java (test): openjdk version "22.0.2" 2024-07-16 OpenJDK Runtime Environment Temurin-22.0.2+9 (build 22.0.2+9) OpenJDK 64-Bit Server VM Temurin-22.0.2+9 (build 22.0.2+9, mixed mode) * Ant: Apache Ant(TM) version 1.10.15 compiled on August 25 2024 * OS: Darwin 23.6.0 x86_64 * cc: Apple clang version 12.0.5 (clang-1205.0.22.9) * make:GNU Make 3.81 * OpenSSL: OpenSSL 3.3.2 3 Sep 2024 (Library: OpenSSL 3.3.2 3 Sep 2024) * APR: 1.7.5 * * Valid SHA-512 signature for apache-tomcat-9.0.96.zip * Valid GPG signature for apache-tomcat-9.0.96.zip * Valid SHA-512 signature for apache-tomcat-9.0.96.tar.gz * Valid GPG signature for apache-tomcat-9.0.96.tar.gz * Valid SHA-512 signature for apache-tomcat-9.0.96.exe * Valid GPG signature for apache-tomcat-9.0.96.exe * Valid Windows Digital Signature for apache-tomcat-9.0.96.exe * Valid SHA512 signature for apache-tomcat-9.0.96-src.zip * Valid GPG signature for apache-tomcat-9.0.96-src.zip * Valid SHA512 signature for apache-tomcat-9.0.96-src.tar.gz * Valid GPG signature for apache-tomcat-9.0.96-src.tar.gz * * Binary Zip and tarball: Same * Source Zip and tarball: Same * * Building dependencies returned: 0 * tcnative builds cleanly * Tomcat builds cleanly * Junit Tests: PASSED - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org