[Git][java-team/tomcat10][upstream] New upstream version 10.1.15
Markus Koschany (@apo)
gitlab at salsa.debian.org
Fri Oct 27 21:46:07 BST 2023
Markus Koschany pushed to branch upstream at Debian Java Maintainers / tomcat10
Commits:
4c73f8af by Markus Koschany at 2023-10-27T22:39:18+02:00
New upstream version 10.1.15
- - - - -
11 changed files:
- build.properties.default
- build.properties.release
- java/org/apache/catalina/security/TLSCertificateReloadListener.java
- java/org/apache/coyote/http11/Http11Processor.java
- modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
- res/install-win/Uninstall.exe.sig
- res/install-win/tomcat-installer.exe.sig
- res/maven/mvn.properties.default
- res/maven/mvn.properties.release
- test/org/apache/catalina/servlets/TestDefaultServlet.java
- webapps/docs/changelog.xml
Changes:
=====================================
build.properties.default
=====================================
@@ -31,7 +31,7 @@
# ----- Version Control Flags -----
version.major=10
version.minor=1
-version.build=14
+version.build=15
version.patch=0
version.suffix=
version.dev=-dev
=====================================
build.properties.release
=====================================
@@ -24,7 +24,7 @@
version.dev=
# Ensure consistent timestamps for reproducible builds.
-ant.tstamp.now.iso=2023-10-09T21:01:11Z
+ant.tstamp.now.iso=2023-10-11T23:38:40Z
# Enable insertion of detached signatures into the Windows installer.
do.codesigning=true
=====================================
java/org/apache/catalina/security/TLSCertificateReloadListener.java
=====================================
@@ -40,7 +40,6 @@ import org.apache.tomcat.util.res.StringManager;
* <p>
* This listener does <b>NOT</b> re-read the Tomcat configuration from server.xml. If you make changes to server.xml you
* must restart the Tomcat process to pick up those changes.
- * <p>
*/
public class TLSCertificateReloadListener implements LifecycleListener {
=====================================
java/org/apache/coyote/http11/Http11Processor.java
=====================================
@@ -915,6 +915,12 @@ public class Http11Processor extends AbstractProcessor {
prepareSendfile(outputFilters);
}
+ // Check for compression
+ boolean useCompression = false;
+ if (entityBody && sendfileData == null) {
+ useCompression = protocol.useCompression(request, response);
+ }
+
MimeHeaders headers = response.getMimeHeaders();
// A SC_NO_CONTENT response may include entity headers
if (entityBody || statusCode == HttpServletResponse.SC_NO_CONTENT) {
@@ -951,11 +957,8 @@ public class Http11Processor extends AbstractProcessor {
}
}
- // Check for compression
- if (entityBody && sendfileData == null) {
- if (protocol.useCompression(request, response)) {
- outputBuffer.addActiveFilter(outputFilters[Constants.GZIP_FILTER]);
- }
+ if (useCompression) {
+ outputBuffer.addActiveFilter(outputFilters[Constants.GZIP_FILTER]);
}
// Add date header unless application has already set one (e.g. in a
=====================================
modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
=====================================
@@ -373,8 +373,10 @@ public class ConnectionPool {
//cache the constructor
if (proxyClassConstructor == null ) {
Class<?> proxyClass = xa ?
- Proxy.getProxyClass(ConnectionPool.class.getClassLoader(), new Class[] {Connection.class, PooledConnection.class, XAConnection.class}) :
- Proxy.getProxyClass(ConnectionPool.class.getClassLoader(), new Class[] {Connection.class, PooledConnection.class});
+ Proxy.getProxyClass(ConnectionPool.class.getClassLoader(),
+ new Class[] {Connection.class, javax.sql.PooledConnection.class, XAConnection.class}) :
+ Proxy.getProxyClass(ConnectionPool.class.getClassLoader(),
+ new Class[] {Connection.class, javax.sql.PooledConnection.class});
proxyClassConstructor = proxyClass.getConstructor(new Class[] { InvocationHandler.class });
}
return proxyClassConstructor;
=====================================
res/install-win/Uninstall.exe.sig
=====================================
Binary files a/res/install-win/Uninstall.exe.sig and b/res/install-win/Uninstall.exe.sig differ
=====================================
res/install-win/tomcat-installer.exe.sig
=====================================
Binary files a/res/install-win/tomcat-installer.exe.sig and b/res/install-win/tomcat-installer.exe.sig differ
=====================================
res/maven/mvn.properties.default
=====================================
@@ -39,7 +39,7 @@ maven.asf.release.repo.url=https://repository.apache.org/service/local/staging/d
maven.asf.release.repo.repositoryId=apache.releases.https
# Release version info
-maven.asf.release.deploy.version=10.1.14
+maven.asf.release.deploy.version=10.1.15
#Where do we load the libraries from
tomcat.lib.path=../../output/build/lib
=====================================
res/maven/mvn.properties.release
=====================================
@@ -18,7 +18,7 @@
# This file was auto-generated by the pre-release Ant target.
# Remove "-dev" from the version since this is not a development release.
-maven.asf.release.deploy.version=10.1.14
+maven.asf.release.deploy.version=10.1.15
# Re-use the same GPG executable.
gpg.exec=C:/Program Files (x86)/gnupg/bin/gpg.exe
=====================================
test/org/apache/catalina/servlets/TestDefaultServlet.java
=====================================
@@ -40,6 +40,7 @@ import org.apache.catalina.Wrapper;
import org.apache.catalina.startup.SimpleHttpClient;
import org.apache.catalina.startup.Tomcat;
import org.apache.catalina.startup.TomcatBaseTest;
+import org.apache.coyote.http11.AbstractHttp11Protocol;
import org.apache.tomcat.util.buf.ByteChunk;
import org.apache.tomcat.util.descriptor.web.ErrorPage;
import org.apache.tomcat.websocket.server.WsContextListener;
@@ -86,6 +87,43 @@ public class TestDefaultServlet extends TomcatBaseTest {
}
+ @Test
+ public void testDefaultCompression() throws Exception {
+
+ Tomcat tomcat = getTomcatInstance();
+ ((AbstractHttp11Protocol<?>) tomcat.getConnector().getProtocolHandler()).setCompression("force");
+
+ File appDir = new File("test/webapp");
+
+ // app dir is relative to server home
+ Context ctxt = tomcat.addContext("", appDir.getAbsolutePath());
+ Wrapper defaultServlet = Tomcat.addServlet(ctxt, "default",
+ "org.apache.catalina.servlets.DefaultServlet");
+ defaultServlet.addInitParameter("fileEncoding", "ISO-8859-1");
+ ctxt.addServletMappingDecoded("/", "default");
+
+ ctxt.addMimeMapping("html", "text/html");
+
+ tomcat.start();
+
+ TestCompressedClient gzipClient = new TestCompressedClient(getPort());
+
+ gzipClient.reset();
+ gzipClient.setRequest(new String[] {
+ "GET /index.html HTTP/1.1" + CRLF +
+ "Host: localhost" + CRLF +
+ "Connection: Close" + CRLF +
+ "Accept-Encoding: gzip" + CRLF + CRLF });
+ gzipClient.connect();
+ gzipClient.processRequest();
+ Assert.assertTrue(gzipClient.isResponse200());
+ List<String> responseHeaders = gzipClient.getResponseHeaders();
+ Assert.assertTrue(responseHeaders.contains("Content-Encoding: gzip"));
+ for (String header : responseHeaders) {
+ Assert.assertFalse(header.startsWith("Content-Length: "));
+ }
+ }
+
/*
* Verify serving of gzipped resources from context root.
*/
=====================================
webapps/docs/changelog.xml
=====================================
@@ -104,7 +104,26 @@
They eventually become mixed with the numbered issues (i.e., numbered
issues do not "pop up" wrt. others).
-->
-<section name="Tomcat 10.1.14 (schultz)" rtext="">
+<section name="Tomcat 10.1.15 (schultz)" rtext="">
+ <subsection name="Coyote">
+ <changelog>
+ <fix>
+ <bug>67670</bug>: Fix regression with HTTP compression after code
+ refactoring. (remm)
+ </fix>
+ </changelog>
+ </subsection>
+ <subsection name="jdbc-pool">
+ <changelog>
+ <fix>
+ <bug>67664</bug>: Correct a regression in the clean-up of unnecessary
+ use of fully qualified class names in 10.1.14 that broke the jdbc-pool.
+ (markt)
+ </fix>
+ </changelog>
+ </subsection>
+</section>
+<section name="Tomcat 10.1.14 (schultz)" rtext="2023-10-10">
<subsection name="Catalina">
<changelog>
<add>
View it on GitLab: https://salsa.debian.org/java-team/tomcat10/-/commit/4c73f8afe078175e67513f95c2148898c24e149c
--
View it on GitLab: https://salsa.debian.org/java-team/tomcat10/-/commit/4c73f8afe078175e67513f95c2148898c24e149c
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20231027/7d27b611/attachment.htm>
More information about the pkg-java-commits
mailing list