Hi all,

If you are wondering about my recent interest in HttpServlet, a discussion in the Jakarta Servlet project [1] got me looking more closely at our own doHead() implementation.

Given the common ancestry, it won't be surprising that we have some of the same issues. So far, I have:

- don't handle reset() or resetBuffer()
- use int rather than long for content-length
- flush after bufferSize bytes rather than bufferSize + 1 bytes

This last one looks to be Tomcat specific. The current code works and I am extremely wary of introducing an off-by-one error into the HTTP output buffer therefore I'm almost certainly going to wait until after the current release round to fix that issue.

I have a parameterised unit test that creates a few thousand individual tests that has a fair number of failures right now. If I get that test passing in time, and the fixes are limited to the doHead() method, then I may commit those fixes in time for the next set of releases.

Mark

[1] https://github.com/eclipse-ee4j/servlet-api/pull/356

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

Reply via email to