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 f88283b4dd Deprecate useAcceptRanges f88283b4dd is described below commit f88283b4dd6c70165287ba278c1336a4e416e128 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 b4fc5b61da..3d38f81640 100644 --- a/conf/web.xml +++ b/conf/web.xml @@ -79,6 +79,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 d7363491f6..fc5d0c1fcd 100644 --- a/java/org/apache/catalina/servlets/DefaultServlet.java +++ b/java/org/apache/catalina/servlets/DefaultServlet.java @@ -262,7 +262,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 185e0982bb..57d12809b3 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -213,6 +213,11 @@ only be processed for <code>GET</code> requests. Based on pull request <pr>790</pr> provided by Chenjp. (markt) </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 33ce47e434..38a6068c2b 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