Mark,

On 10/11/21 10:04, ma...@apache.org wrote:
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

commit 8b5d5ee1fe8c47e3b80b591fedaddc81e5c51a24
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon Oct 11 14:39:44 2021 +0100

     Implement new approahc to doHead(). Expand testing to cover HTTP/2.
---
  java/jakarta/servlet/http/HttpServlet.java         |  19 +++-
  .../apache/catalina/connector/OutputBuffer.java    |   8 +-
  java/org/apache/coyote/http2/Stream.java           |   5 +
  .../servlet/http/TestHttpServletDoHead.java        | 113 ++++++++++++++++-----
  .../apache/coyote/http11/TestHttp11Processor.java  |  27 +++--
  test/org/apache/coyote/http2/Http2TestBase.java    |  36 ++++++-
  .../org/apache/coyote/http2/TesterHttp2Parser.java |  34 +++++++
  webapps/docs/changelog.xml                         |  14 +++
  8 files changed, 214 insertions(+), 42 deletions(-)

diff --git a/java/jakarta/servlet/http/HttpServlet.java 
b/java/jakarta/servlet/http/HttpServlet.java
index ea9976c..f537321 100644
--- a/java/jakarta/servlet/http/HttpServlet.java
+++ b/java/jakarta/servlet/http/HttpServlet.java
@@ -31,6 +31,7 @@ import jakarta.servlet.AsyncEvent;
  import jakarta.servlet.AsyncListener;
  import jakarta.servlet.DispatcherType;
  import jakarta.servlet.GenericServlet;
+import jakarta.servlet.ServletConfig;
  import jakarta.servlet.ServletException;
  import jakarta.servlet.ServletOutputStream;
  import jakarta.servlet.ServletRequest;
@@ -94,12 +95,21 @@ public abstract class HttpServlet extends GenericServlet {
      private static final String LSTRING_FILE = 
"jakarta.servlet.http.LocalStrings";
      private static final ResourceBundle lStrings = 
ResourceBundle.getBundle(LSTRING_FILE);
+ /**
+     * @deprecated May be removed in a future release
+     *
+     * @since 6.0
+     */
+    @Deprecated
+    public static final String LEGACY_DO_HEAD = 
"jakarta.servlet.http.legacyDoHead";

Since 6.0? Looks like you are adding it to 10.x.

Also, is it appropriate to use the "jakarta.*" namespace, here?

+      <scode>
+        Refactor <code>HttpServlet</code> so the default <code>doHead()</code>
+        implementation now calls <code>doGet()</code> and relies on the
+        container to ensure that the response body is not sent. The previous
+        behaviour (wrapping the response) may be enabled per Servlet by setting
+        the <code>jakarta.servlet.http.legacyDoHead</code> Servlet
+        initialisation parameter to <code>true</code>. This aligns Tomcat with
+        recent changes updates for Servlet 6.0 in the Jakarta Servlet
+        specification project. (markt)
+      </scode>

Hmm, okay. Should we say "@since Servlet 6.0" since it's not clear what the version means? Or, because it's in HttpServlet (which is defined by servlet.spec), is it implied that all versions will mean "(of the servlet spec)"?

-chris

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

Reply via email to