Refactor the RemoteIpValve to use the common utility method
for list to comma separated string conversion. (markt)
Refactor JNDIRealm$JNDIConnection so its fields are
accessible to sub-classes of JNDIRealm. (markt)
Fix serialization warnings in UserDatabasePrincipal
reported by SpotBugs. (markt)
65397: Calls to
ServletContext.getResourcePaths() no longer include
symbolic links in the results unless allowLinking has been
set to true. If a resource is skipped because of this
change, a warning will be logged as this typically indicates a
configuration issue. (markt)
Coyote
65368: Improve handling of clean closes of inbound TLS
connections. Treat them the same way as clean closes of non-TLS
connections rather than as unknown errors. (markt)
Modify the HTTP/2 connector not to sent small updates for stream flow
control windows to the user agent as, depending on how the user agent is
written, this may trigger small writes from the user agent that in turn
trigger the overhead protection. Small updates for stream flow control
windows are now combined with subsequent flow control window updates for
that stream to ensure that all stream flow control window updates sent
from Tomcat are larger than overheadWindowUpdateThreshold.
(markt)
Add additional debug logging to track the current state of the HTTP/2
overhead count that Tomcat uses to detect and close potentially
malicious connections. (markt)
Many HTTP/2 requests from browsers will trigger one overhead frame and
one non-overhead frame. Change the overhead calculation so that a
non-overhead frame reduces the current overhead count by 2 rather than
1. This means that, over time, the overhead count for a well-behaved
connection will trend downwards. (markt)
Change the initial HTTP/2 overhead count from -10 to
-10 * overheadCountFactor. This means that, regardless of
the value chosen for overheadCountFactor, when a connection
opens 10 overhead frames in a row will be required to trigger the
overhead protection. (markt)
Increase the default overheadCountFactor from
1 to 10 and change the reduction in overhead
count for a non-overhead frame from -2 to -20.
This allows for a larger range (0-20) to be used for
overheadCountFactor providing for finer-grained control.
(markt)
Modify the parsing of HTTP header values that use the
1#token to ignore empty elements as per RFC 7230 section 7
instead of treating the presence of empty elements as an error. (markt)
Expand the unit tests for HttpServlet.doHead() and correct
the flushing of the response buffer. The buffer used to behave as if it
was one byte smaller than the configured size. The buffer was flushed
(and the response committed if required) when the buffer was full. The
buffer is now flushed (and the response committed if required) if the
buffer is full and there is more data to write. (markt)
Fix an issue where concurrent HTTP/2 writes (or concurrent reads) to the
same connection could hang and eventually timeout when async IO was
enabled (it is enabled by default). (markt)
Jasper
65387: Correct a regression in the fix for 65124
and restore the local definition of out for tags that
implement TryCatchFinally. (markt)
65390: Correct a regression in the fix for 65124
and restore code that was removed in error leading to JSP compilation
failures in some circumstances. (markt)
Update to the Eclipse JDT compiler 4.20. (markt)
Add support for specifying Java 17 (with the value 17) as
the compiler source and/or compiler target for JSP compilation. If used
with an Eclipse JDT compiler version that does not support these values,
a warning will be logged and the latest supported version will used.
(markt)
65377: Update the Java code generation for JSPs not to use
the boxed primitive constructors as they have been deprecated in Java 9
and marked for future removal in Java 16. valueOf() is now
used instead. (markt)
WebSocket
Refactor the DigestAuthenticator to reuse a shared
SecureRandom instance rather than create a new one to
generate the cnonce if required. (markt)
Web applications
65385: Correct the link in the documentation web application
the Maven Central repository. (markt)
Other
Use JSign to integrate the build script with the code signing service to
enable release builds to be created on Linux as well as Windows. (markt)
Update the OWB module to Apache OpenWebBeans 2.0.23. (remm)
Update the CXF module to Apache CXF 3.4.4. (remm)
65369 / #422: Add the additional
--add-opens=... options required for running Tomcat on Java
16 onwards to the service.bat script to align it with the
other start-up scripts. PR provided by MCMicS. (markt)
Improvements to French translations. (remm)
Improvements to Korean translations. (woonsan)
Update JUnit to version 4.13.2. (markt)
Update EasyMock to 4.3. (markt)
Update Objenesis to 3.2. (markt)
Update UnboundID to 6.0.0. (markt)
Update CheckStyle to 8.43. (markt)
Update SpotBugs to 4.2.3. (markt)
Update OSGi annotations to 1.1.0. (markt)
2021-06-15 Tomcat 10.1.0-M1 (markt)
General
This release contains all of the changes up to and including those in
Apache Tomcat 10.0.6 plus the additional changes listed below. (markt)
Remove code previously marked for removal in Tomcat 10.1.x. (markt)
Catalina
Incremented the supported Jakarta Servlet version to 5.1 to align with
the current development branch of the Jakarta Servlet specification.
(markt)
65301: RemoteIpValve will now avoid getting
the local host name when it is not needed. (remm)
65308: NPE in JNDIRealm when no userRoleAttribute
is given. (fschumacher)
#412: Add commented out, sample users for the Tomcat Manager app
to the default tomcat-users.xml file. Based on a PR by
Arnaud Dagnelies. (markt)
#418: Add a new option, pass-through, to the
default servlet's useBomIfPresent initialization parameter
that causes the default servlet to leave any BOM in place when
processing a static file and not to use the BOM to determine the
encoding of the file. Based on a pull request by Jean-Louis Monteiro.
(markt)
#419: When processing POST requests of type
multipart/form-data for parts without a filename that are
added to the parameter map in String form, check the size of the part
before attempting conversion to String. Pull request provided by
tianshuang. (markt)
Implement the new Cookie methods
setAttribute(), getAttribute() and
getAttributes() introduced in Servlet 5.1. (markt)
AprLifecycleListener does not show dev version suffix for libtcnative
and libapr. (michaelo)
Refactor principal handling in UserDatabaseRealm using
an inner class that extends GenericPrincipal. (remm)
Enable the default doHead() implementation in
HttpServlet to correctly handle responses where the content
length needs to be represented as a long since it is larger than the
maximum value that can be represented by an int. (markt)
Avoid synchronization on roles verification for the memory
UserDatabase. (remm)
Fix the default doHead() implementation in
HttpServlet to correctly handle responses where the Servlet
calls ServletResponse.reset() and/or
ServletResponse.resetBuffer(). (markt)
Fix the default doHead() implementation in
HttpServlet to correctly handle responses generated using
the Servlet non-blocking API. (markt)
Coyote
65303: Fix a possible NullPointerException if
an error occurs on an HTTP/1.1 connection being upgraded to HTTP/2 or on
a pushed HTTP/2 stream. (markt)
Simplify AprEndpoint socket bind for all platforms. (michaelo)
65340: Add missing check for a negative return value for
Hpack.decodeInteger in the HpackDecoder,
which could cause a NegativeArraySizeException exception.
Submitted by Thomas, and verified the fix is present in the donated
hpack code in a further update. (remm)
Add debug logging for HTTP/2 HPACK header decoding. (markt)
Correct parsing of HTTP headers consisting of a list of tokens so that a
header with an empty token is treated consistently regardless of whether
the empty token is at the start, middle or end of the list of tokens.
(markt)
Remove support for the identity transfer encoding. The
inclusion of this encoding in RFC 2616 was an error that was corrected
in 2001. Requests using this transfer encoding will now receive a 501
response. (markt)
Process transfer encoding headers from both HTTP 1.0 and HTTP 1.1
clients. (markt)
Ensure that if the transfer encoding header contains the
chunked, that the chunked encoding is the
final encoding listed. (markt)
Jasper
Incremented the supported Jakarta Expression Language version to 5.0 to
align with the current development branch of the Jakarta Expression
Language specification. (markt)
Review code used to generate Java source from JSPs and tags and remove
code found to be unnecessary. (markt)
Refactor use of internal ChildInfo class to use compile
time type checking rather than run time type checking. (markt)
65124: Partial fix. When generating Java source code to call
a tag handler, only define the local variable JspWriter out
when it is going to be used. (markt)
Add generics to the EL 5.0 API to align with the current EL 5.0
development branch. (markt)
Update the web-fragment.xml included in
jasper.jar and jasper-el.jar to use the
Servlet 5.0 schema. (markt)
Update JspC to generate web.xml and
web-fragment.xml files using Servlet 5.0 schemas. (markt)
Remove the deprecated method
MethodExpression.getParmetersProvided() from the EL API to
align with the current EL 5.0 development branch. (markt)
65358: Improve expression language method matching for
methods with varargs. Where multiple methods may match the provided
parameters, the method that requires the fewest varargs is preferred.
(markt)
65332: Add a commented out section in
catalina.policy that provides the necessary permissions to
compile JSPs with javac when running on Java 9 onwards with a security
manager. It is commented out as it will cause errors if used with
earlier Java versions. (markt)
WebSocket
65317: When using permessage-deflate, the
WebSocket connection was incorrectly closed if the uncompressed payload
size was an exact multiple of 8192. Based on a patch provided by Saksham
Verma. (markt)
Update the web-fragment.xml included in
tomcat-websocket.jar to use the Servlet 5.0 schema. (markt)
65342: Correct a regression introduced with the fix for
65262 that meant Tomcat's WebSocket implementation would only
work with Tomcat's implementation of the Jakarta WebSocket API. (markt)
Web applications
Improve the description of the maxConnections and
acceptCount attributes in the Connector section of the
documentation web application. (markt)
Other
Improvements to French translations. (remm)
Improvements to Korean translations. (woonsan)
65362: Correct a regression in the previous release. The
change to create OSGi Require-Capability sections in
manifests for Jakarta API JARs manually rather than with bnd annotations
did not add the necessary manual entries to the embedded JARs. (markt)
Update the packaged version of the Tomcat Native Library to 1.2.30. Also
update the minimum recommended version to 1.2.30. (markt)