This is an automated email from the ASF dual-hosted git repository.

markt 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 bc73fcec39 Deprecate useAcceptRanges
bc73fcec39 is described below

commit bc73fcec3938ed7ed7dbfbb2a3dd7c65be7eb4fd
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 a788672a42..10399fce99 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 201883945b..2accac435e 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 53f0f97853..f6c16129ea 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -217,6 +217,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

Reply via email to