This is an automated email from the ASF dual-hosted git repository. markt 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 7512883ea8 Deprecate useAcceptRanges 7512883ea8 is described below commit 7512883ea8c21a5800265513ca4aea02ed30117d Author: Mark Thomas <ma...@apache.org> AuthorDate: Wed Dec 4 10:02:52 2024 +0000 Deprecate useAcceptRanges --- conf/web.xml | 3 +++ java/org/apache/catalina/servlets/DefaultServlet.java | 4 ++++ webapps/docs/changelog.xml | 5 +++++ webapps/docs/default-servlet.xml | 3 +++ 4 files changed, 15 insertions(+) diff --git a/conf/web.xml b/conf/web.xml index 7d4637ac26..05ad4e64b2 100644 --- a/conf/web.xml +++ b/conf/web.xml @@ -84,6 +84,9 @@ <!-- --> <!-- useAcceptRanges Should the Accept-Ranges header be included --> <!-- in responses where appropriate? [true] --> + <!-- Deprecated. This option will be removed --> + <!-- without replacement in Tomcat 12 onwards where --> + <!-- it will effectively be hard coded to true. --> <!-- --> <!-- For directory listing customization. Checks localXsltFile, then --> <!-- globalXsltFile, then defaults to original behavior. --> diff --git a/java/org/apache/catalina/servlets/DefaultServlet.java b/java/org/apache/catalina/servlets/DefaultServlet.java index 19e8d2e445..5eaa7297dd 100644 --- a/java/org/apache/catalina/servlets/DefaultServlet.java +++ b/java/org/apache/catalina/servlets/DefaultServlet.java @@ -237,7 +237,11 @@ public class DefaultServlet extends HttpServlet { /** * Should the Accept-Ranges: bytes header be send with static resources? + * + * @deprecated This option will be removed without replacement in Tomcat 12 onwards where it will effectively be + * hard coded to {@code true}. */ + @Deprecated protected boolean useAcceptRanges = true; /** diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index f7b29ed211..2813a7a04a 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -232,6 +232,11 @@ to optionally avoid the <code>comp/env</code> prefix which is usually not used there. (remm) </fix> + <fix> + Deprecate the <code>useAcceptRanges</code> initialisation parameter for + the default servlet. It will be removed in Tomcat 12 onwards where it + will effectively be hard coded to <code>true</code>. (markt) + </fix> </changelog> </subsection> <subsection name="Coyote"> diff --git a/webapps/docs/default-servlet.xml b/webapps/docs/default-servlet.xml index 07a6b9a7bc..8b906081c9 100644 --- a/webapps/docs/default-servlet.xml +++ b/webapps/docs/default-servlet.xml @@ -194,6 +194,9 @@ Tomcat.</p> <property name="useAcceptRanges"> If true, the Accept-Ranges header will be set when appropriate for the response. [true] + <br/> + Deprecated. This option will be removed without replacement in Tomcat + 12 onwards where it will effectively be hard coded to <code>true</code>. </property> <property name="showServerInfo"> Should server information be presented in the response sent to clients --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org