(tomcat) branch main updated: Revert
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/main by this push: new 8002d036db Revert 8002d036db is described below commit 8002d036dbfef236a043a32847ccd516dc813e3f Author: remm AuthorDate: Thu Jul 11 21:44:27 2024 +0200 Revert --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2d03d98e76..918dbe96ee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,8 +21,6 @@ on: pull_request: branches: - main - - 10.1.x - - 9.0.x env: LC_ALL: en_US.UTF-8 - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch main updated: Revert following failed testing
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/main by this push: new f57681c6ef Revert following failed testing f57681c6ef is described below commit f57681c6ef0f0ebfc1f1c179732448f31433a6c8 Author: remm AuthorDate: Thu Jun 27 23:03:32 2024 +0200 Revert following failed testing --- .github/workflows/ci.yml | 4 +--- java/org/apache/tomcat/util/openssl/openssl_h.java | 14 +++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 89a3f1eb4c..5ee36e337c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,14 +33,12 @@ jobs: isMain: - ${{ contains(github.ref, 'main') }} java: [ 17, 21, 22 ] -os: [ ubuntu-latest, windows-latest, macos-latest ] +os: [ ubuntu-latest, windows-latest ] exclude: - isMain: true java: 17 - os: windows-latest java: 21 - - os: macos-latest -java: 21 name: JDK${{ matrix.java }} ${{ matrix.os }} runs-on: ${{ matrix.os }} steps: diff --git a/java/org/apache/tomcat/util/openssl/openssl_h.java b/java/org/apache/tomcat/util/openssl/openssl_h.java index a8f5777bdb..3c0dcd2046 100644 --- a/java/org/apache/tomcat/util/openssl/openssl_h.java +++ b/java/org/apache/tomcat/util/openssl/openssl_h.java @@ -22,6 +22,7 @@ package org.apache.tomcat.util.openssl; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; import java.util.Arrays; +import java.util.Locale; import java.util.stream.Collectors; import java.lang.foreign.*; import static java.lang.foreign.ValueLayout.*; @@ -49,9 +50,16 @@ public class openssl_h { static final boolean TRACE_DOWNCALLS = Boolean.getBoolean("jextract.trace.downcalls"); static final SymbolLookup SYMBOL_LOOKUP; static { -SYMBOL_LOOKUP = SymbolLookup.libraryLookup(System.mapLibraryName("ssl"), LIBRARY_ARENA) -.or(SymbolLookup.loaderLookup()) -.or(Linker.nativeLinker().defaultLookup()); +String os = System.getProperty("os.name").toLowerCase(Locale.ENGLISH); +// Note: Library loading is not portable for MacOS https://github.com/sergot/openssl/issues/81 +if (os.indexOf("mac") >= 0) { +System.loadLibrary("ssl"); +SYMBOL_LOOKUP = SymbolLookup.loaderLookup().or(Linker.nativeLinker().defaultLookup()); +} else { +SYMBOL_LOOKUP = SymbolLookup.libraryLookup(System.mapLibraryName("ssl"), LIBRARY_ARENA) +.or(SymbolLookup.loaderLookup()) +.or(Linker.nativeLinker().defaultLookup()); +} } static void traceDowncall(String name, Object... args) { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch main updated: Revert
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/main by this push: new 26d30fc0b7 Revert 26d30fc0b7 is described below commit 26d30fc0b7b769fe11385d019aa521dd705ff7b5 Author: remm AuthorDate: Thu Jun 27 22:21:34 2024 +0200 Revert As Mark pointed out, continue-on-error false prevents the individual test logs from being available. However, the run's failure (if any) is not really visible in that case. --- .github/workflows/ci.yml | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e907d5ff77..5ee36e337c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,14 +33,12 @@ jobs: isMain: - ${{ contains(github.ref, 'main') }} java: [ 17, 21, 22 ] -os: [ ubuntu-latest, windows-latest, macos-latest ] +os: [ ubuntu-latest, windows-latest ] exclude: - isMain: true java: 17 - os: windows-latest java: 21 - - os: macos-latest -java: 21 name: JDK${{ matrix.java }} ${{ matrix.os }} runs-on: ${{ matrix.os }} steps: @@ -56,6 +54,9 @@ jobs: ant -noinput echoproperties deploy embed test-nio test-status env: ANT_OPTS: -Dtest.openssl.exists=false -Dtest.excludePerformance=true -Dtest.exclude=jakarta/servlet/http/TestHttpServletDoHeadValidWrite0.java,jakarta/servlet/http/TestHttpServletDoHeadValidWrite1023.java,jakarta/servlet/http/TestHttpServletDoHeadValidWrite1024.java,jakarta/servlet/http/TestHttpServletDoHeadValidWrite1025.java,jakarta/servlet/http/TestHttpServletDoHeadValidWrite1.java,jakarta/servlet/http/TestHttpServletDoHeadValidWrite511.java,jakarta/servlet/http/TestHttpServle [...] + + continue-on-error: +true - name: Upload logs uses: actions/upload-artifact@v4 with: - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch main updated: Revert Derby to 10.16.1.1
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 The following commit(s) were added to refs/heads/main by this push: new 147b9390a4 Revert Derby to 10.16.1.1 147b9390a4 is described below commit 147b9390a40d5068b073ac2b46e7aebb5b6585fb Author: Mark Thomas AuthorDate: Thu May 16 11:28:23 2024 +0100 Revert Derby to 10.16.1.1 --- build.properties.default | 9 + webapps/docs/changelog.xml | 8 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/build.properties.default b/build.properties.default index cafef9bff9..45a0e6d5d4 100644 --- a/build.properties.default +++ b/build.properties.default @@ -311,16 +311,17 @@ jsign.jar=${jsign.home}/jsign-${jsign.version}.jar jsign.loc=${base-maven.loc}/net/jsign/jsign/${jsign.version}/jsign-${jsign.version}.jar # - Derby, used by unit tests - -derby.version=10.17.1.0 +# 10.16.1.1 is the latest version that runs on Java 17 +derby.version=10.16.1.1 derby.checksum.enabled=true derby.checksum.algorithm=MD5|SHA-1 -derby.checksum.value=0665c8f3365fca01eb639e41f7685991|e90e61e8ee731614a9bafd3d81155e09fff5e80c +derby.checksum.value=d9c38ece80f4ec0756f54b06716a3dd6|f9ca2054b3e33ec3f3f19df4a7490352d82de54a derby-shared.checksum.enabled=true derby-shared.checksum.algorithm=MD5|SHA-1 -derby-shared.checksum.value=ce2d7164d5cda8ac3a1ede81023814d4|e6eac60d1b80b3781dff97ccef88fa131043f2a5 +derby-shared.checksum.value=e423cba3150f195debaf7ff0d307ecf6|77a3ec6b9791c7c29c76148c5d56fc1f3f12d638 derby-tools.checksum.enabled=true derby-tools.checksum.algorithm=MD5|SHA-1 -derby-tools.checksum.value=ea7b7cba09a4056219e888bcdc1a3bb7|6d1a4e5e0f5c26516abbba85ece081506b9ad2e1 +derby-tools.checksum.value=25b138905deb681ff167a5a04d29c3c6|32a5335f9087022cd8ca5c85f35f8c844b1360a9 derby.home=${base.path}/derby-${derby.version} derby.jar=${derby.home}/derby-${derby.version}.jar diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 88926a59c7..277c6b0c4e 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -113,6 +113,14 @@ + + + +Revert Derby to 10.16.1.1 as that is the latest version of Derby that +runs on Java 17. (markt) + + + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch main updated: Revert "Further locking harmonizations for main components"
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/main by this push: new cf05b38e5e Revert "Further locking harmonizations for main components" cf05b38e5e is described below commit cf05b38e5ede77bc46ca02128b8a1fe0d0168494 Author: remm AuthorDate: Thu Apr 4 16:02:45 2024 +0200 Revert "Further locking harmonizations for main components" This reverts commit fba89a6f05223768e7d7026cd886d7f8356d. --- java/org/apache/catalina/core/ContainerBase.java | 86 +- java/org/apache/catalina/core/StandardService.java | 22 +++--- webapps/docs/changelog.xml | 5 +- 3 files changed, 47 insertions(+), 66 deletions(-) diff --git a/java/org/apache/catalina/core/ContainerBase.java b/java/org/apache/catalina/core/ContainerBase.java index 846f4e27d8..4edd4edf9d 100644 --- a/java/org/apache/catalina/core/ContainerBase.java +++ b/java/org/apache/catalina/core/ContainerBase.java @@ -129,7 +129,6 @@ public abstract class ContainerBase extends LifecycleMBeanBase implements Contai * The child Containers belonging to this Container, keyed by name. */ protected final HashMap children = new HashMap<>(); -private final ReadWriteLock childrenLock = new ReentrantReadWriteLock(); /** @@ -633,30 +632,26 @@ public abstract class ContainerBase extends LifecycleMBeanBase implements Contai log.debug(sm.getString("containerBase.child.add", child, this)); } -childrenLock.writeLock().lock(); -try { +synchronized (children) { if (children.get(child.getName()) != null) { throw new IllegalArgumentException(sm.getString("containerBase.child.notUnique", child.getName())); } child.setParent(this); // May throw IAE children.put(child.getName(), child); +} -fireContainerEvent(ADD_CHILD_EVENT, child); +fireContainerEvent(ADD_CHILD_EVENT, child); -// Start child -// Don't do this inside sync block - start can be a slow process and -// locking the children object can cause problems elsewhere -try { -if ((getState().isAvailable() || LifecycleState.STARTING_PREP.equals(getState())) && startChildren) { -child.start(); -} -} catch (LifecycleException e) { -throw new IllegalStateException(sm.getString("containerBase.child.start"), e); +// Start child +// Don't do this inside sync block - start can be a slow process and +// locking the children object can cause problems elsewhere +try { +if ((getState().isAvailable() || LifecycleState.STARTING_PREP.equals(getState())) && startChildren) { +child.start(); } -} finally { -childrenLock.writeLock().unlock(); +} catch (LifecycleException e) { +throw new IllegalStateException(sm.getString("containerBase.child.start"), e); } - } @@ -693,11 +688,8 @@ public abstract class ContainerBase extends LifecycleMBeanBase implements Contai if (name == null) { return null; } -childrenLock.readLock().lock(); -try { +synchronized (children) { return children.get(name); -} finally { -childrenLock.readLock().unlock(); } } @@ -708,11 +700,8 @@ public abstract class ContainerBase extends LifecycleMBeanBase implements Contai */ @Override public Container[] findChildren() { -childrenLock.readLock().lock(); -try { +synchronized (children) { return children.values().toArray(new Container[0]); -} finally { -childrenLock.readLock().unlock(); } } @@ -739,40 +728,36 @@ public abstract class ContainerBase extends LifecycleMBeanBase implements Contai return; } -childrenLock.writeLock().lock(); try { -try { -if (child.getState().isAvailable()) { -child.stop(); -} -} catch (LifecycleException e) { -log.error(sm.getString("containerBase.child.stop"), e); +if (child.getState().isAvailable()) { +child.stop(); } +} catch (LifecycleException e) { +log.error(sm.getString("containerBase.child.stop"), e); +} -boolean destroy = false; -try { -// child.destroy() may have already been called which would have -// triggered this call. If that is the case, no need to destroy the -// child again. -if
(tomcat) branch main updated: Revert most of the changes for Native library stability
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 The following commit(s) were added to refs/heads/main by this push: new 587389580e Revert most of the changes for Native library stability 587389580e is described below commit 587389580eefeefe4c1a0f1aa676fcd051d27e8c Author: Mark Thomas AuthorDate: Fri Feb 9 14:06:57 2024 + Revert most of the changes for Native library stability Further investigation indicates these changes were not necessary --- .../apache/catalina/core/AprLifecycleListener.java | 3 +-- java/org/apache/tomcat/jni/Library.java| 23 +- .../tomcat/util/net/openssl/OpenSSLContext.java| 19 -- test/org/apache/tomcat/util/net/TesterSupport.java | 1 - webapps/docs/changelog.xml | 4 5 files changed, 10 insertions(+), 40 deletions(-) diff --git a/java/org/apache/catalina/core/AprLifecycleListener.java b/java/org/apache/catalina/core/AprLifecycleListener.java index 8fea80148e..f1621ff7e7 100644 --- a/java/org/apache/catalina/core/AprLifecycleListener.java +++ b/java/org/apache/catalina/core/AprLifecycleListener.java @@ -169,11 +169,10 @@ public class AprLifecycleListener implements LifecycleListener { } private static void terminateAPR() { -Library.terminatePrepare(); AprStatus.setAprInitialized(false); AprStatus.setAprAvailable(false); fipsModeActive = false; -sslInitialized = false; // Well we cleaned the pool in terminate. +sslInitialized = false; // terminate() will clean the pool Library.terminate(); } diff --git a/java/org/apache/tomcat/jni/Library.java b/java/org/apache/tomcat/jni/Library.java index 908a9a8b56..a7686c0935 100644 --- a/java/org/apache/tomcat/jni/Library.java +++ b/java/org/apache/tomcat/jni/Library.java @@ -29,8 +29,6 @@ public final class Library { */ private static Library _instance = null; -private static volatile boolean initialized = false; - private Library() throws Exception { boolean loaded = false; StringBuilder err = new StringBuilder(); @@ -103,22 +101,9 @@ public final class Library { * Create Tomcat Native's global APR pool. This has to be the first call to TCN library. */ private static native boolean initialize(); -/** - * Signal that Tomcat Native is about to be shutdown. - * - * The main purpose of this flag is to allow instances that manage their own APR root pools to determine if those - * pools need to be explicitly cleaned up or if they will be / have been cleaned up by the call to - * {@link #terminate()}. The code needs to avoid multiple attempts to clean up these pools else the Native code may - * crash. - */ -public static void terminatePrepare() { -initialized = false; -} /** * Destroys Tomcat Native's global APR pool. This has to be the last call to TCN library. This will destroy any APR * root pools that have not been explicitly destroyed. - * - * Callers of this method should call {@link #terminatePrepare()} before calling this method. */ public static native void terminate(); /* Internal function for loading APR Features */ @@ -177,12 +162,6 @@ public final class Library { aprVersionString() + ")"); } } -initialized = initialize(); -return initialized; -} - - -public static boolean isInitialized() { -return initialized; +return initialize(); } } diff --git a/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java b/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java index 12dc41455b..f1d7b092ec 100644 --- a/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java +++ b/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java @@ -46,7 +46,6 @@ import javax.net.ssl.X509TrustManager; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; import org.apache.tomcat.jni.CertificateVerifier; -import org.apache.tomcat.jni.Library; import org.apache.tomcat.jni.Pool; import org.apache.tomcat.jni.SSL; import org.apache.tomcat.jni.SSLConf; @@ -649,16 +648,14 @@ public class OpenSSLContext implements org.apache.tomcat.util.net.SSLContext { @Override public void run() { -if (Library.isInitialized()) { -if (ctx != 0) { -SSLContext.free(ctx); -} -if (cctx != 0) { -SSLConf.free(cctx); -} -if (aprPool != 0) { -Pool.destroy(aprPool); -} +if (ctx != 0) { +SSLContext.free(ctx); +} +if (cctx != 0) { +
(tomcat) branch main updated: Revert "Refactor long running tests to improve parallelism"
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 The following commit(s) were added to refs/heads/main by this push: new e0665644f5 Revert "Refactor long running tests to improve parallelism" e0665644f5 is described below commit e0665644f519ca7a30993d1e5c8da3719d8ae207 Author: Mark Thomas AuthorDate: Mon Dec 4 20:37:52 2023 + Revert "Refactor long running tests to improve parallelism" This reverts commit c766eefed99cb7004f29468d1e5546eef2a5eae8. --- ...aseTest.java => TestDefaultServletOptions.java} | 17 +++--- .../servlets/TestDefaultServletOptionsDELETE.java | 34 --- .../servlets/TestDefaultServletOptionsGET.java | 34 --- .../servlets/TestDefaultServletOptionsHEAD.java| 34 --- .../servlets/TestDefaultServletOptionsPOST.java| 34 --- .../servlets/TestDefaultServletOptionsPUT.java | 34 --- .../servlets/TestDefaultServletOptionsTRACE.java | 34 --- ...java => TestWebdavServletOptionCollection.java} | 19 --- .../TestWebdavServletOptionCollectionCOPY.java | 38 -- .../TestWebdavServletOptionCollectionDELETE.java | 38 -- .../TestWebdavServletOptionCollectionGET.java | 38 -- .../TestWebdavServletOptionCollectionHEAD.java | 38 -- .../TestWebdavServletOptionCollectionLOCK.java | 38 -- .../TestWebdavServletOptionCollectionMKCOL.java| 38 -- .../TestWebdavServletOptionCollectionMOVE.java | 38 -- .../TestWebdavServletOptionCollectionPOST.java | 38 -- .../TestWebdavServletOptionCollectionPROPFIND.java | 38 -- ...TestWebdavServletOptionCollectionPROPPATCH.java | 38 -- .../TestWebdavServletOptionCollectionPUT.java | 38 -- .../TestWebdavServletOptionCollectionTRACE.java| 38 -- .../TestWebdavServletOptionCollectionUNLOCK.java | 38 -- ...tion.java => TestWebdavServletOptionsFile.java} | 19 --- .../servlets/TestWebdavServletOptionsFileCOPY.java | 38 -- .../TestWebdavServletOptionsFileDELETE.java| 38 -- .../servlets/TestWebdavServletOptionsFileGET.java | 38 -- .../servlets/TestWebdavServletOptionsFileHEAD.java | 38 -- .../servlets/TestWebdavServletOptionsFileLOCK.java | 38 -- .../TestWebdavServletOptionsFileMKCOL.java | 38 -- .../servlets/TestWebdavServletOptionsFileMOVE.java | 38 -- .../servlets/TestWebdavServletOptionsFilePOST.java | 38 -- .../TestWebdavServletOptionsFilePROPFIND.java | 38 -- .../TestWebdavServletOptionsFilePROPPATCH.java | 38 -- .../servlets/TestWebdavServletOptionsFilePUT.java | 38 -- .../TestWebdavServletOptionsFileTRACE.java | 38 -- .../TestWebdavServletOptionsFileUNLOCK.java| 38 -- ...e.java => TestWebdavServletOptionsUnknown.java} | 19 --- .../TestWebdavServletOptionsUnknownCOPY.java | 38 -- .../TestWebdavServletOptionsUnknownDELETE.java | 38 -- .../TestWebdavServletOptionsUnknownGET.java| 38 -- .../TestWebdavServletOptionsUnknownHEAD.java | 38 -- .../TestWebdavServletOptionsUnknownLOCK.java | 38 -- .../TestWebdavServletOptionsUnknownMKCOL.java | 38 -- .../TestWebdavServletOptionsUnknownMOVE.java | 38 -- .../TestWebdavServletOptionsUnknownPOST.java | 38 -- .../TestWebdavServletOptionsUnknownPROPFIND.java | 38 -- .../TestWebdavServletOptionsUnknownPROPPATCH.java | 38 -- .../TestWebdavServletOptionsUnknownPUT.java| 38 -- .../TestWebdavServletOptionsUnknownTRACE.java | 38 -- .../TestWebdavServletOptionsUnknownUNLOCK.java | 38 -- 49 files changed, 54 insertions(+), 1706 deletions(-) diff --git a/test/org/apache/catalina/servlets/DefaultServletOptionsBaseTest.java b/test/org/apache/catalina/servlets/TestDefaultServletOptions.java similarity index 70% rename from test/org/apache/catalina/servlets/DefaultServletOptionsBaseTest.java rename to test/org/apache/catalina/servlets/TestDefaultServletOptions.java index e5a92d97dc..b5fe61aaa9 100644 --- a/test/org/apache/catalina/servlets/DefaultServletOptionsBaseTest.java +++
(tomcat) branch main updated: Revert "Remove deprecation to align with latest JSP 4.0 API"
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 The following commit(s) were added to refs/heads/main by this push: new f9909ab312 Revert "Remove deprecation to align with latest JSP 4.0 API" f9909ab312 is described below commit f9909ab3124dcaf43e12a51eb59150390737d53c Author: Mark Thomas AuthorDate: Thu Nov 9 13:39:25 2023 + Revert "Remove deprecation to align with latest JSP 4.0 API" This reverts commit a171d4529f848797cf33d8b2ba5ea9ba440b1502. After further reflection, the JSP team opted to retain this deprecation --- java/jakarta/servlet/jsp/ErrorData.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/java/jakarta/servlet/jsp/ErrorData.java b/java/jakarta/servlet/jsp/ErrorData.java index 5424f65d6d..a1d445b059 100644 --- a/java/jakarta/servlet/jsp/ErrorData.java +++ b/java/jakarta/servlet/jsp/ErrorData.java @@ -40,7 +40,10 @@ public final class ErrorData { * @param statusCode The status code of the error * @param uri The request URI * @param servletName The name of the servlet invoked + * + * @deprecated Use {#link {@link ErrorData#ErrorData(Throwable, int, String, String, String)} */ +@Deprecated(since = "4.0", forRemoval = true) public ErrorData(Throwable throwable, int statusCode, String uri, String servletName) { this(throwable, statusCode, uri, servletName, null); } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch main updated: Revert compression refactoring
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/main by this push: new 4bdc07a31a Revert compression refactoring 4bdc07a31a is described below commit 4bdc07a31ac5e1a23a32ccb72999d762a0f079c0 Author: remm AuthorDate: Wed Oct 11 09:41:14 2023 +0200 Revert compression refactoring BZ 67670 Add test case to verify content-length is not present when using the connector compression (also that checks DefaultServlet is working with it). --- java/org/apache/coyote/http11/Http11Processor.java | 13 +--- .../catalina/servlets/TestDefaultServlet.java | 38 ++ webapps/docs/changelog.xml | 8 + 3 files changed, 54 insertions(+), 5 deletions(-) diff --git a/java/org/apache/coyote/http11/Http11Processor.java b/java/org/apache/coyote/http11/Http11Processor.java index 5e908b2a1c..0a4a9e796a 100644 --- a/java/org/apache/coyote/http11/Http11Processor.java +++ b/java/org/apache/coyote/http11/Http11Processor.java @@ -904,6 +904,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) { @@ -940,11 +946,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 diff --git a/test/org/apache/catalina/servlets/TestDefaultServlet.java b/test/org/apache/catalina/servlets/TestDefaultServlet.java index 0a1ef20702..9842509782 100644 --- a/test/org/apache/catalina/servlets/TestDefaultServlet.java +++ b/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 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. */ diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 557f385fa0..edc21c7821 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -105,6 +105,14 @@ issues do not "pop up" wrt. others). --> + + + +67670: Fix regression with HTTP compression after code +
[tomcat] branch main updated: Revert "Bump OpenSSL version number."
This is an automated email from the ASF dual-hosted git repository. schultz pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/main by this push: new a25cb7910d Revert "Bump OpenSSL version number." a25cb7910d is described below commit a25cb7910d6622e7b4e1507cfbf2600dacf350d3 Author: Christopher Schultz AuthorDate: Tue May 30 13:16:28 2023 -0400 Revert "Bump OpenSSL version number." This reverts commit f6fe0ddf0bfa2dce1171035b32cc62af82dab5b1. --- build.properties.default | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.properties.default b/build.properties.default index 09621a5b0b..8a11739e02 100644 --- a/build.properties.default +++ b/build.properties.default @@ -140,7 +140,7 @@ jdt.loc.2=http://download.eclipse.org/eclipse/downloads/drops4/${jdt.release}/ec # - Tomcat native library - tomcat-native.version=2.0.3 -tomcat-native-openssl.version=3.0.9 +tomcat-native-openssl.version=3.0.8 tomcat-native.src.checksum.enabled=true tomcat-native.src.checksum.algorithm=SHA-512 tomcat-native.src.checksum.value=d80e6b76295bb253eaf6eab4d722f3ba2f683f33a96310838b4c44b99f0b47a49ed9c09bb53ed23698db057ce765e3fcbfcd4ac4b75d2bdbe691f916be3be339 - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch main updated: Revert "Clear SocketWrapper reference to help GC"
This is an automated email from the ASF dual-hosted git repository. lihan pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/main by this push: new 2de4a3c337 Revert "Clear SocketWrapper reference to help GC" 2de4a3c337 is described below commit 2de4a3c337b47bb2654d70a76a7e031ce970f679 Author: lihan AuthorDate: Sun May 21 09:27:51 2023 +0800 Revert "Clear SocketWrapper reference to help GC" This reverts commit 10492dd22bd64ff63cf77786fa67d45cdc2a54b3. --- java/org/apache/coyote/AbstractProcessor.java | 3 --- java/org/apache/coyote/http11/Http11Processor.java | 1 + java/org/apache/coyote/http2/StreamProcessor.java | 6 +- java/org/apache/tomcat/util/net/Nio2Channel.java | 1 - java/org/apache/tomcat/util/net/NioChannel.java| 1 - 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/java/org/apache/coyote/AbstractProcessor.java b/java/org/apache/coyote/AbstractProcessor.java index 8965dab62b..3ee6898fbd 100644 --- a/java/org/apache/coyote/AbstractProcessor.java +++ b/java/org/apache/coyote/AbstractProcessor.java @@ -721,9 +721,6 @@ public abstract class AbstractProcessor extends AbstractProcessorLight implement public void recycle() { errorState = ErrorState.NONE; asyncStateMachine.recycle(); -// Clear fields that can be cleared to aid GC and trigger NPEs if this -// is reused -socketWrapper = null; } diff --git a/java/org/apache/coyote/http11/Http11Processor.java b/java/org/apache/coyote/http11/Http11Processor.java index 85dfd34f3c..9e2e74914c 100644 --- a/java/org/apache/coyote/http11/Http11Processor.java +++ b/java/org/apache/coyote/http11/Http11Processor.java @@ -1418,6 +1418,7 @@ public class Http11Processor extends AbstractProcessor { inputBuffer.recycle(); outputBuffer.recycle(); upgradeToken = null; +socketWrapper = null; sendfileData = null; sslSupport = null; } diff --git a/java/org/apache/coyote/http2/StreamProcessor.java b/java/org/apache/coyote/http2/StreamProcessor.java index 3b1c03ac38..78cb770649 100644 --- a/java/org/apache/coyote/http2/StreamProcessor.java +++ b/java/org/apache/coyote/http2/StreamProcessor.java @@ -392,8 +392,8 @@ class StreamProcessor extends AbstractProcessor { @Override public final void recycle() { -super.recycle(); // StreamProcessor instances are not re-used. + // Calling removeRequestProcessor even though the RequestProcesser was // never added will add the values from the RequestProcessor to the // running total for the GlobalRequestProcessor @@ -401,6 +401,10 @@ class StreamProcessor extends AbstractProcessor { if (global != null) { global.removeRequestProcessor(request.getRequestProcessor()); } + +// Clear fields that can be cleared to aid GC and trigger NPEs if this +// is reused +setSocketWrapper(null); } diff --git a/java/org/apache/tomcat/util/net/Nio2Channel.java b/java/org/apache/tomcat/util/net/Nio2Channel.java index 9d65266374..603c43f416 100644 --- a/java/org/apache/tomcat/util/net/Nio2Channel.java +++ b/java/org/apache/tomcat/util/net/Nio2Channel.java @@ -79,7 +79,6 @@ public class Nio2Channel implements AsynchronousByteChannel { @Override public void close() throws IOException { sc.close(); -reset(this.sc, null); } diff --git a/java/org/apache/tomcat/util/net/NioChannel.java b/java/org/apache/tomcat/util/net/NioChannel.java index eae3f51171..d263ce9ae6 100644 --- a/java/org/apache/tomcat/util/net/NioChannel.java +++ b/java/org/apache/tomcat/util/net/NioChannel.java @@ -81,7 +81,6 @@ public class NioChannel implements ByteChannel, ScatteringByteChannel, Gathering @Override public void close() throws IOException { sc.close(); -reset(this.sc,null); } /** - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch main updated: Revert for now (wrong location)
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/main by this push: new c765654025 Revert for now (wrong location) c765654025 is described below commit c76565402509566ddb3d4405bd5328396100241b Author: remm AuthorDate: Thu Apr 6 15:31:54 2023 +0200 Revert for now (wrong location) --- java/org/apache/catalina/core/StandardServer.java | 5 - webapps/docs/changelog.xml| 5 - 2 files changed, 10 deletions(-) diff --git a/java/org/apache/catalina/core/StandardServer.java b/java/org/apache/catalina/core/StandardServer.java index 720c639380..eb5e91e932 100644 --- a/java/org/apache/catalina/core/StandardServer.java +++ b/java/org/apache/catalina/core/StandardServer.java @@ -980,11 +980,6 @@ public final class StandardServer extends LifecycleMBeanBase implements Server { reconfigureUtilityExecutor(getUtilityThreadsInternal(utilityThreads)); register(utilityExecutor, "type=UtilityExecutor"); -// Initialize random generation of the JVM, as some platforms use -// a thread which could end up being associated with a webapp rather -// than the container. -(new Random()).nextInt(); - // Register global String cache // Note although the cache is global, if there are multiple Servers // present in the JVM (may happen when embedding) then the same cache diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 111b9c4427..3094946c56 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -184,11 +184,6 @@ 66543: Give StandardContext#fireRequestDestroyEvent its own log message. (fschumacher) - -66554: Initialize Random during server initialization to -avoid possible JVM thread creation in the webapp context on some -platforms. (remm) - - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [tomcat] branch main updated: Revert "Refactor AmbiguousBean test after seeing failures in CI"
Mark, On 3/30/23 19:10, ma...@apache.org wrote: +public static class AmbiguousBean { +public void setValue(@SuppressWarnings("unused") TypeA value) { +} + +public void setValue(@SuppressWarnings("unused") String value) { +} +} Best. Class. Name. Ever. ;) -chris - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch main updated: Revert "Refactor AmbiguousBean test after seeing failures in CI"
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 The following commit(s) were added to refs/heads/main by this push: new 2cd3c6b620 Revert "Refactor AmbiguousBean test after seeing failures in CI" 2cd3c6b620 is described below commit 2cd3c6b620e9485694ed42e66896fa7f07885602 Author: Mark Thomas AuthorDate: Fri Mar 31 00:09:16 2023 +0100 Revert "Refactor AmbiguousBean test after seeing failures in CI" This reverts commit ffb5ef2de0f161b2d4c1ca92452e478ef4fcc13b. JavaBeans has a fixed algorithm when mehtods appear to be ambiguous. This needs to be replicated in the standalone support --- test/jakarta/el/TestBeanSupport.java | 18 +++ test/jakarta/el/TestBeanSupportAmbiguous.java | 77 --- 2 files changed, 18 insertions(+), 77 deletions(-) diff --git a/test/jakarta/el/TestBeanSupport.java b/test/jakarta/el/TestBeanSupport.java index 1f87d37bec..0807a90dce 100644 --- a/test/jakarta/el/TestBeanSupport.java +++ b/test/jakarta/el/TestBeanSupport.java @@ -74,6 +74,15 @@ public class TestBeanSupport extends ELBaseTest { doTest(MismatchBean.class, "value", TypeA.class, TypeA.class, null); } +/* + * The first setter found "wins". + */ +@Test +public void testAmbiguousBean() { +doTest(AmbiguousBean.class, "value", TypeA.class, null, TypeA.class); +} + + private void doTest(Class clazz, String propertyName, Class type, Class typeGet, Class typeSet) { BeanProperties beanProperties = BeanSupport.getInstance().getBeanProperties(clazz); BeanProperty beanProperty = beanProperties.properties.get(propertyName); @@ -213,6 +222,15 @@ public class TestBeanSupport extends ELBaseTest { } +public static class AmbiguousBean { +public void setValue(@SuppressWarnings("unused") TypeA value) { +} + +public void setValue(@SuppressWarnings("unused") String value) { +} +} + + public static class TypeA { } diff --git a/test/jakarta/el/TestBeanSupportAmbiguous.java b/test/jakarta/el/TestBeanSupportAmbiguous.java deleted file mode 100644 index 2f19020063..00 --- a/test/jakarta/el/TestBeanSupportAmbiguous.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package jakarta.el; - -import jakarta.el.BeanELResolver.BeanProperties; -import jakarta.el.BeanELResolver.BeanProperty; -import jakarta.el.TestBeanSupport.TypeA; - -import org.junit.Assert; -import org.junit.Test; - -public class TestBeanSupportAmbiguous { - -/* - * Different JREs appear to call different methods on AmbiguousBean. This test ensures that the behaviour is - * consistent across BeanSupport implementations within any single JRE, - */ -@Test -public void testAmbiguousBean() { -// Disable caching so we can switch implementations within a JVM instance. -System.setProperty("jakarta.el.BeanSupport.doNotCacheInstance", "true"); - -// First test the stand-alone type -System.setProperty("jakarta.el.BeanSupport.useStandalone", Boolean.TRUE.toString()); -Class standaloneType = doTest(); - -// Then test the full JavaBeans implementation -System.setProperty("jakarta.el.BeanSupport.useStandalone", Boolean.FALSE.toString()); -Class javaBeansType = doTest(); - -Assert.assertEquals(standaloneType, javaBeansType); -} - - -private Class doTest() { -BeanProperties beanProperties = BeanSupport.getInstance().getBeanProperties(AmbiguousBean.class); -BeanProperty beanProperty = beanProperties.properties.get("value"); - -// Property type -Assert.assertNotNull(beanProperty); -Class propertyType = beanProperty.getPropertyType(); -Assert.assertNotNull(propertyType); - -// There is no getter -Assert.assertNull(beanProperty.getReadMethod()); - -// Check setter -Assert.assertEquals(void.class, beanProperty.getWriteMethod().getReturnType()); -Assert.assertEquals(1,
[tomcat] branch main updated: Revert "Align with spec"
This is an automated email from the ASF dual-hosted git repository. lihan pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/main by this push: new e020b669a5 Revert "Align with spec" e020b669a5 is described below commit e020b669a5792a64c79eedb75751907aee2aa4d3 Author: lihan AuthorDate: Tue Mar 7 15:18:10 2023 +0800 Revert "Align with spec" This reverts commit 1fc4b7c95dce1db3d86db9393c78023b93725f63. --- java/jakarta/servlet/http/HttpFilter.java | 130 ++ 1 file changed, 44 insertions(+), 86 deletions(-) diff --git a/java/jakarta/servlet/http/HttpFilter.java b/java/jakarta/servlet/http/HttpFilter.java index 14d14b35b0..4c7154bea6 100644 --- a/java/jakarta/servlet/http/HttpFilter.java +++ b/java/jakarta/servlet/http/HttpFilter.java @@ -25,105 +25,63 @@ import jakarta.servlet.ServletRequest; import jakarta.servlet.ServletResponse; /** - * - * - * Provides an abstract class to be subclassed to create an HTTP filter suitable for a Web site. A subclass of - * HttpFilter should override - * {@link #doFilter(jakarta.servlet.http.HttpServletRequest, jakarta.servlet.http.HttpServletResponse, jakarta.servlet.FilterChain) }. - * - * - * - * Filters typically run on multithreaded servers, so be aware that a filter must handle concurrent requests and be - * careful to synchronize access to shared resources. Shared resources include in-memory data such as instance or class - * variables and external objects such as files, database connections, and network connections. See the - * https://docs.oracle.com/javase/tutorial/essential/concurrency/;> Java Tutorial on Multithreaded - * Programming for more information on handling multiple threads in a Java program. - * - * @author Various - * - * @since Servlet 4.0 + * Provides a base class that implements the Filter interface and ensures that the Request and Response are of type + * HttpServletRequest and HttpServletResponse respectively. */ public abstract class HttpFilter extends GenericFilter { -private static final long serialVersionUID = 7478463438252262094L; - -/** - * - * Does nothing, because this is an abstract class. - * - * - * @since Servlet 4.0 - */ -public HttpFilter() { -} +private static final long serialVersionUID = 1L; /** + * {@inheritDoc} This implementation tests the request and response to see if they are instances of + * {@link HttpServletRequest} and {@link HttpServletResponse} respectively. If they are then they are passed to + * {@link #doFilter(HttpServletRequest, HttpServletResponse, FilterChain)}. If not, a {@link ServletException} is + * thrown. * - * - * The doFilter method of the Filter is called by the container each time a request/response pair is passed - * through the chain due to a client request for a resource at the end of the chain. The FilterChain passed in to this - * method allows the Filter to pass on the request and response to the next entity in the chain. There's no need to - * override this method. - * - * - * - * The default implementation inspects the incoming {@code req} and {@code res} objects to determine if they are - * instances of {@link HttpServletRequest} and {@link HttpServletResponse}, respectively. If not, a - * {@link ServletException} is thrown. Otherwise, the protected - * {@link #doFilter(jakarta.servlet.http.HttpServletRequest, jakarta.servlet.http.HttpServletResponse, jakarta.servlet.FilterChain)} - * method is called. - * - * - * @param req a {@link ServletRequest} object that contains the request the client has made of the filter - * - * @param res a {@link ServletResponse} object that contains the response the filter sends to the client - * - * @param chain the FilterChain for invoking the next filter or the resource - * - * @throws IOException if an input or output error is detected when the filter handles the request - * - * @throws ServletException if the request for the could not be handled or either parameter is not an instance of the - * respective {@link HttpServletRequest} or {@link HttpServletResponse}. - * - * @since Servlet 4.0 + * @throws ServletException If either the request or response are not of the expected types or any other error + * occurs */ @Override -public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) -throws IOException, ServletException { -if (!(req instanceof HttpServletRequest && res instanceof HttpServletResponse)) { -throw new ServletException("non-HTTP request or response"); +public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) +throws IOException,
[tomcat] branch main updated: Revert "Have 'pre-release' indicate the the release is in progress."
This is an automated email from the ASF dual-hosted git repository. schultz pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/main by this push: new 18706c3684 Revert "Have 'pre-release' indicate the the release is in progress." 18706c3684 is described below commit 18706c36845eadd8e0f344c3e45248ab9ab4a527 Author: Christopher Schultz AuthorDate: Wed Mar 1 09:11:09 2023 -0500 Revert "Have 'pre-release' indicate the the release is in progress." This reverts commit 96be7da23139ea52feb1e6f9fb3b6c45c354b7cf. --- build.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.xml b/build.xml index 31daa9189c..123b6002ce 100644 --- a/build.xml +++ b/build.xml @@ -2741,7 +2741,7 @@ asf.ldap.username=${release.asfusername} +value="rtext=" />
[tomcat] branch main updated: Revert TestAsyncContextImpl.
This is an automated email from the ASF dual-hosted git repository. lihan pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/main by this push: new 1b90313d4c Revert TestAsyncContextImpl. 1b90313d4c is described below commit 1b90313d4ced5fca1c16aff5ba8271f916cacee5 Author: lihan AuthorDate: Fri Feb 10 17:24:03 2023 +0800 Revert TestAsyncContextImpl. --- test/org/apache/catalina/core/TestAsyncContextImpl.java | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/test/org/apache/catalina/core/TestAsyncContextImpl.java b/test/org/apache/catalina/core/TestAsyncContextImpl.java index fc755166b2..14621803ed 100644 --- a/test/org/apache/catalina/core/TestAsyncContextImpl.java +++ b/test/org/apache/catalina/core/TestAsyncContextImpl.java @@ -1521,10 +1521,15 @@ public class TestAsyncContextImpl extends TomcatBaseTest { // Just for debugging async.setTimeout(10); -try (ExecutorService executor = Executors.newSingleThreadExecutor()) { -executor.submit(() -> async.dispatch("/ServletC")); -executor.shutdown(); -} +ExecutorService executor = Executors.newSingleThreadExecutor(); +executor.submit(new Runnable() { + +@Override +public void run() { +async.dispatch("/ServletC"); +} +}); +executor.shutdown(); } } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch main updated: Revert accidental commit
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 The following commit(s) were added to refs/heads/main by this push: new f8bf4920ba Revert accidental commit f8bf4920ba is described below commit f8bf4920ba05f867f5cb2e7eade4a4e8a790f0c7 Author: Mark Thomas AuthorDate: Fri Nov 18 15:51:43 2022 + Revert accidental commit --- java/org/apache/coyote/http11/Http11Processor.java | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/java/org/apache/coyote/http11/Http11Processor.java b/java/org/apache/coyote/http11/Http11Processor.java index b5f1153520..c27ff911f4 100644 --- a/java/org/apache/coyote/http11/Http11Processor.java +++ b/java/org/apache/coyote/http11/Http11Processor.java @@ -283,11 +283,11 @@ public class Http11Processor extends AbstractProcessor { // parse headers. prepareRequestProtocol(); -//if (protocol.isPaused()) { -//// 503 - Service unavailable -//response.setStatus(503); -//setErrorState(ErrorState.CLOSE_CLEAN, null); -//} else { +if (protocol.isPaused()) { +// 503 - Service unavailable +response.setStatus(503); +setErrorState(ErrorState.CLOSE_CLEAN, null); +} else { keptAlive = true; // Set this every time in case limit has been changed via JMX request.getMimeHeaders().setLimit(protocol.getMaxHeaderCount()); @@ -302,7 +302,7 @@ public class Http11Processor extends AbstractProcessor { if (!protocol.getDisableUploadTimeout()) { socketWrapper.setReadTimeout(protocol.getConnectionUploadTimeout()); } -//} +} } catch (IOException e) { if (log.isDebugEnabled()) { log.debug(sm.getString("http11processor.header.parse"), e); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [tomcat] branch main updated: Revert "Fix the typos in the XML schemas" due to license concerns
On 28/09/2022 15:12, ebo...@apache.org wrote: This is an automated email from the ASF dual-hosted git repository. ebourg pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/main by this push: new 23cb7814b1 Revert "Fix the typos in the XML schemas" due to license concerns 23cb7814b1 is described below commit 23cb7814b1f692c25fd07cc3ae46dc5982edd162 Author: Emmanuel Bourg AuthorDate: Wed Sep 28 16:08:37 2022 +0200 Revert "Fix the typos in the XML schemas" due to license concerns Thanks. Some of these typos have been annoying me for years. I guess we could try and see if the Jakarta schemas project will accept corrections for these. Mark This reverts commit 2609b760e969cdbd096816fac65dd4a97cdc585c. --- java/jakarta/servlet/jsp/resources/jspxml.xsd| 2 +- java/jakarta/servlet/resources/jakartaee_web_services_2_0.xsd| 4 ++-- java/jakarta/servlet/resources/jakartaee_web_services_client_2_0.xsd | 4 ++-- java/jakarta/servlet/resources/javaee_web_services_1_2.xsd | 2 +- java/jakarta/servlet/resources/javaee_web_services_1_3.xsd | 2 +- java/jakarta/servlet/resources/javaee_web_services_1_4.xsd | 2 +- java/jakarta/servlet/resources/javaee_web_services_client_1_2.xsd| 2 +- java/jakarta/servlet/resources/javaee_web_services_client_1_3.xsd| 2 +- java/jakarta/servlet/resources/javaee_web_services_client_1_4.xsd| 2 +- java/jakarta/servlet/resources/jsp_3_0.xsd | 2 +- java/jakarta/servlet/resources/jsp_3_1.xsd | 2 +- java/jakarta/servlet/resources/web-app_3_0.xsd | 2 +- java/jakarta/servlet/resources/web-app_3_1.xsd | 2 +- java/jakarta/servlet/resources/web-app_4_0.xsd | 2 +- java/jakarta/servlet/resources/web-app_5_0.xsd | 2 +- java/jakarta/servlet/resources/web-app_6_0.xsd | 2 +- java/jakarta/servlet/resources/web-fragment_3_0.xsd | 2 +- java/jakarta/servlet/resources/web-fragment_3_1.xsd | 2 +- java/jakarta/servlet/resources/web-fragment_4_0.xsd | 2 +- java/jakarta/servlet/resources/web-fragment_5_0.xsd | 2 +- java/jakarta/servlet/resources/web-fragment_6_0.xsd | 2 +- java/jakarta/servlet/resources/web-jsptaglibrary_3_0.xsd | 4 ++-- java/jakarta/servlet/resources/web-jsptaglibrary_3_1.xsd | 4 ++-- 23 files changed, 27 insertions(+), 27 deletions(-) diff --git a/java/jakarta/servlet/jsp/resources/jspxml.xsd b/java/jakarta/servlet/jsp/resources/jspxml.xsd index d93c6156e6..4cad6bb2bc 100644 --- a/java/jakarta/servlet/jsp/resources/jspxml.xsd +++ b/java/jakarta/servlet/jsp/resources/jspxml.xsd @@ -415,7 +415,7 @@ jsp:useBean action or a custom action with an associated VariableInfo entry for this name. -Exact valid combinations are not expressible in XML Schema. +Exact valid combinations are not expressable in XML Schema. They are: name="Identifier" property="*" diff --git a/java/jakarta/servlet/resources/jakartaee_web_services_2_0.xsd b/java/jakarta/servlet/resources/jakartaee_web_services_2_0.xsd index c9963a7540..9f5716b32f 100644 --- a/java/jakarta/servlet/resources/jakartaee_web_services_2_0.xsd +++ b/java/jakarta/servlet/resources/jakartaee_web_services_2_0.xsd @@ -303,7 +303,7 @@ com.wombat.empl.EmployeeService This may not be specified in case there is no Service -Endpoint Interface as is the case with directly using an +Enpoint Interface as is the case with directly using an implementation class with the @WebService annotation. When the port component is a Provider implementation @@ -464,7 +464,7 @@ The jaxrpc-mapping-file element contains the name of a file that -describes the Jakarta XML RPC mapping between the Java interfaces used by +describes the Jakarta XML RPC mapping between the Java interaces used by the application and the WSDL description in the wsdl-file. The file name is a relative path within the module. diff --git a/java/jakarta/servlet/resources/jakartaee_web_services_client_2_0.xsd b/java/jakarta/servlet/resources/jakartaee_web_services_client_2_0.xsd index 5547d5e50a..dd01c6f5a3 100644 --- a/java/jakarta/servlet/resources/jakartaee_web_services_client_2_0.xsd +++ b/java/jakarta/servlet/resources/jakartaee_web_services_client_2_0.xsd @@ -122,7 +122,7 @@ The jaxrpc-mapping-file element contains the name of a file that -describes the Jakarta XML RPC mapping between the Java interfaces used by
[tomcat] branch main updated: Revert "Fix the typos in the XML schemas" due to license concerns
This is an automated email from the ASF dual-hosted git repository. ebourg pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/main by this push: new 23cb7814b1 Revert "Fix the typos in the XML schemas" due to license concerns 23cb7814b1 is described below commit 23cb7814b1f692c25fd07cc3ae46dc5982edd162 Author: Emmanuel Bourg AuthorDate: Wed Sep 28 16:08:37 2022 +0200 Revert "Fix the typos in the XML schemas" due to license concerns This reverts commit 2609b760e969cdbd096816fac65dd4a97cdc585c. --- java/jakarta/servlet/jsp/resources/jspxml.xsd| 2 +- java/jakarta/servlet/resources/jakartaee_web_services_2_0.xsd| 4 ++-- java/jakarta/servlet/resources/jakartaee_web_services_client_2_0.xsd | 4 ++-- java/jakarta/servlet/resources/javaee_web_services_1_2.xsd | 2 +- java/jakarta/servlet/resources/javaee_web_services_1_3.xsd | 2 +- java/jakarta/servlet/resources/javaee_web_services_1_4.xsd | 2 +- java/jakarta/servlet/resources/javaee_web_services_client_1_2.xsd| 2 +- java/jakarta/servlet/resources/javaee_web_services_client_1_3.xsd| 2 +- java/jakarta/servlet/resources/javaee_web_services_client_1_4.xsd| 2 +- java/jakarta/servlet/resources/jsp_3_0.xsd | 2 +- java/jakarta/servlet/resources/jsp_3_1.xsd | 2 +- java/jakarta/servlet/resources/web-app_3_0.xsd | 2 +- java/jakarta/servlet/resources/web-app_3_1.xsd | 2 +- java/jakarta/servlet/resources/web-app_4_0.xsd | 2 +- java/jakarta/servlet/resources/web-app_5_0.xsd | 2 +- java/jakarta/servlet/resources/web-app_6_0.xsd | 2 +- java/jakarta/servlet/resources/web-fragment_3_0.xsd | 2 +- java/jakarta/servlet/resources/web-fragment_3_1.xsd | 2 +- java/jakarta/servlet/resources/web-fragment_4_0.xsd | 2 +- java/jakarta/servlet/resources/web-fragment_5_0.xsd | 2 +- java/jakarta/servlet/resources/web-fragment_6_0.xsd | 2 +- java/jakarta/servlet/resources/web-jsptaglibrary_3_0.xsd | 4 ++-- java/jakarta/servlet/resources/web-jsptaglibrary_3_1.xsd | 4 ++-- 23 files changed, 27 insertions(+), 27 deletions(-) diff --git a/java/jakarta/servlet/jsp/resources/jspxml.xsd b/java/jakarta/servlet/jsp/resources/jspxml.xsd index d93c6156e6..4cad6bb2bc 100644 --- a/java/jakarta/servlet/jsp/resources/jspxml.xsd +++ b/java/jakarta/servlet/jsp/resources/jspxml.xsd @@ -415,7 +415,7 @@ jsp:useBean action or a custom action with an associated VariableInfo entry for this name. -Exact valid combinations are not expressible in XML Schema. +Exact valid combinations are not expressable in XML Schema. They are: name="Identifier" property="*" diff --git a/java/jakarta/servlet/resources/jakartaee_web_services_2_0.xsd b/java/jakarta/servlet/resources/jakartaee_web_services_2_0.xsd index c9963a7540..9f5716b32f 100644 --- a/java/jakarta/servlet/resources/jakartaee_web_services_2_0.xsd +++ b/java/jakarta/servlet/resources/jakartaee_web_services_2_0.xsd @@ -303,7 +303,7 @@ com.wombat.empl.EmployeeService This may not be specified in case there is no Service -Endpoint Interface as is the case with directly using an +Enpoint Interface as is the case with directly using an implementation class with the @WebService annotation. When the port component is a Provider implementation @@ -464,7 +464,7 @@ The jaxrpc-mapping-file element contains the name of a file that -describes the Jakarta XML RPC mapping between the Java interfaces used by +describes the Jakarta XML RPC mapping between the Java interaces used by the application and the WSDL description in the wsdl-file. The file name is a relative path within the module. diff --git a/java/jakarta/servlet/resources/jakartaee_web_services_client_2_0.xsd b/java/jakarta/servlet/resources/jakartaee_web_services_client_2_0.xsd index 5547d5e50a..dd01c6f5a3 100644 --- a/java/jakarta/servlet/resources/jakartaee_web_services_client_2_0.xsd +++ b/java/jakarta/servlet/resources/jakartaee_web_services_client_2_0.xsd @@ -122,7 +122,7 @@ The jaxrpc-mapping-file element contains the name of a file that -describes the Jakarta XML RPC mapping between the Java interfaces used by +describes the Jakarta XML RPC mapping between the Java interaces used by the application and the WSDL description in the wsdl-file. The file name is a relative path within the module file. @@ -140,7 +140,7 @@
[tomcat] branch main updated: Revert the ja <-> Shift_JIS mapping
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 The following commit(s) were added to refs/heads/main by this push: new 471c84b896 Revert the ja <-> Shift_JIS mapping 471c84b896 is described below commit 471c84b89630664e16d80c5557c681b658acabc4 Author: Mark Thomas AuthorDate: Thu Apr 28 19:26:24 2022 +0100 Revert the ja <-> Shift_JIS mapping --- java/org/apache/catalina/util/CharsetMapperDefault.properties | 1 - webapps/docs/changelog.xml| 6 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/java/org/apache/catalina/util/CharsetMapperDefault.properties b/java/org/apache/catalina/util/CharsetMapperDefault.properties index d438bcf71e..6f8bf49493 100644 --- a/java/org/apache/catalina/util/CharsetMapperDefault.properties +++ b/java/org/apache/catalina/util/CharsetMapperDefault.properties @@ -15,4 +15,3 @@ en=ISO-8859-1 fr=ISO-8859-1 -ja=Shift_JIS diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 702914aadd..4768a39924 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -118,6 +118,12 @@ retrieve a certificate DN, to match the output of the deprecated getSubjectDN().getName() that was used previously. (remm) + +Revert the change in 10.1.0-M11 that added a mapping of +Shift_JIS for the ja locale to the default +mappings used by ServletResponse.setLocale() as it +caused regressions for applications using UTF-8. (markt) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch main updated: Revert "Temporary workaround for broken DigiCert ONE REST API"
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 The following commit(s) were added to refs/heads/main by this push: new f50f3e3 Revert "Temporary workaround for broken DigiCert ONE REST API" f50f3e3 is described below commit f50f3e306fe649b6afa6b270dea518a9b1a3d239 Author: Mark Thomas AuthorDate: Tue Mar 8 16:42:46 2022 + Revert "Temporary workaround for broken DigiCert ONE REST API" This reverts commit 7c54e369e87f1eedd50e42f895c2b0cd058e30b8. --- build.properties.default | 12 ++-- build.xml| 2 -- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/build.properties.default b/build.properties.default index d5bdf0e..0d7e958 100644 --- a/build.properties.default +++ b/build.properties.default @@ -79,19 +79,11 @@ gpg.exec=/path/to/gpg # Code signing of Windows installer # See https://infra.apache.org/digicert-use.html for setup instructions do.codesigning=false -#codesigning.alias=Tomcat-PMC-cert-2021-11 +codesigning.alias=Tomcat-PMC-cert-2021-11 codesigning.digest=SHA-512 -#codesigning.storetype=DIGICERTONE +codesigning.storetype=DIGICERTONE # Set codesigning.storepass in build.properties with the following syntax #codesigning.storepass=|/path/to/Certificate_pkcs12.p12| -# Once DigiCert fix the broken REST API -# - Uncomment alias & storetype above -# - Remove the four lines below -# - Remove the keystore field from build.xml -codesigning.keystore=${user.home}/.digicertone/pkcs11properties.cfg -codesigning.storepass=NONE -codesigning.storetype=PKCS11 -codesigning.alias=Tomcat-PMC-key-2021-11 # - Settings to use when downloading files - trydownload.httpusecaches=true diff --git a/build.xml b/build.xml index fb5c56a..54cd5fd 100644 --- a/build.xml +++ b/build.xml @@ -2562,7 +2562,6 @@ skip.installer property in build.properties" /> unless="skip.installer" depends="-installer-create-uninstaller,setup-jsign" if="${do.codesigning}"> description="Builds and optionally signs the Windows installer" depends="-installer,setup-jsign" if="${do.codesigning}" >
[tomcat] branch main updated: Revert "Fix BZ 65714 - previous fix was incomplete."
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 The following commit(s) were added to refs/heads/main by this push: new 9014d75 Revert "Fix BZ 65714 - previous fix was incomplete." 9014d75 is described below commit 9014d75c9d1265ece592f53d4cb18a7634c6f405 Author: Mark Thomas AuthorDate: Thu Dec 9 13:55:54 2021 + Revert "Fix BZ 65714 - previous fix was incomplete." This reverts commit bb432a0fea83f424b013267ba7675c5d636a465a. --- java/org/apache/catalina/security/SecurityClassLoad.java | 3 --- webapps/docs/changelog.xml | 4 2 files changed, 7 deletions(-) diff --git a/java/org/apache/catalina/security/SecurityClassLoad.java b/java/org/apache/catalina/security/SecurityClassLoad.java index fdb915c..62951ec 100644 --- a/java/org/apache/catalina/security/SecurityClassLoad.java +++ b/java/org/apache/catalina/security/SecurityClassLoad.java @@ -189,9 +189,6 @@ public final class SecurityClassLoad { loader.loadClass(basePackage + "util.net.DispatchType"); loader.loadClass(basePackage + "util.net.NioEndpoint$NioSocketWrapper$NioOperationState"); loader.loadClass(basePackage + "util.net.Nio2Endpoint$Nio2SocketWrapper$Nio2OperationState"); -loader.loadClass(basePackage + "util.net.SecureNio2Channel"); -loader.loadClass(basePackage + "util.net.SocketBufferHandler"); -loader.loadClass(basePackage + "util.net.SocketBufferHandler$1"); loader.loadClass(basePackage + "util.net.SocketWrapperBase$BlockingMode"); loader.loadClass(basePackage + "util.net.SocketWrapperBase$CompletionCheck"); loader.loadClass(basePackage + "util.net.SocketWrapperBase$CompletionHandlerCall"); diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 061588c..e7ab2d7 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -121,10 +121,6 @@ request includes a body. The maximum permitted size of the body is controlled by maxSavePostSize. (markt) - -65714: The previous fix was incomplete. Fix additional issues -when first using an NIO2 TLS enabled connector. (markt) - - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch main updated: Revert long hack
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/main by this push: new 9cb0ce1 Revert long hack 9cb0ce1 is described below commit 9cb0ce1f88f35a0b9219c479881fbd74c559dfe9 Author: remm AuthorDate: Mon Nov 8 11:49:02 2021 +0100 Revert long hack This branch actually supports MemoryAddress as the return type that matches a pointer. --- .../apache/tomcat/util/net/openssl/panama/OpenSSLContext.java | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/openssl-java17/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLContext.java b/modules/openssl-java17/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLContext.java index e590a1a..7a4dd35 100644 --- a/modules/openssl-java17/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLContext.java +++ b/modules/openssl-java17/src/main/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLContext.java @@ -126,7 +126,7 @@ public class OpenSSLContext implements org.apache.tomcat.util.net.SSLContext { CLinker.C_POINTER, CLinker.C_POINTER, CLinker.C_POINTER, CLinker.C_INT, CLinker.C_POINTER); private static final FunctionDescriptor openSSLCallbackTmpDHFunctionDescriptor = -FunctionDescriptor.of(CLinker.C_LONG, CLinker.C_POINTER, +FunctionDescriptor.of(CLinker.C_POINTER, CLinker.C_POINTER, CLinker.C_INT, CLinker.C_INT); static { @@ -142,7 +142,7 @@ public class OpenSSLContext implements org.apache.tomcat.util.net.SSLContext { MethodType.methodType(int.class, MemoryAddress.class, MemoryAddress.class, MemoryAddress.class, MemoryAddress.class, int.class, MemoryAddress.class)); openSSLCallbackTmpDHHandle = lookup.findVirtual(OpenSSLContext.class, "openSSLCallbackTmpDH", -MethodType.methodType(long.class, MemoryAddress.class, int.class, int.class)); +MethodType.methodType(MemoryAddress.class, MemoryAddress.class, int.class, int.class)); } catch (Exception e) { throw new IllegalStateException(e); } @@ -795,7 +795,7 @@ public class OpenSSLContext implements org.apache.tomcat.util.net.SSLContext { } // DH *(*tmp_dh_callback)(SSL *ssl, int is_export, int keylength) -public long openSSLCallbackTmpDH(MemoryAddress ssl, int isExport, int keylength) { +public MemoryAddress openSSLCallbackTmpDH(MemoryAddress ssl, int isExport, int keylength) { var pkey = SSL_get_privatekey(ssl); int type = (MemoryAddress.NULL.equals(pkey)) ? EVP_PKEY_NONE() : EVP_PKEY_base_id(pkey); /* @@ -816,10 +816,10 @@ public class OpenSSLContext implements org.apache.tomcat.util.net.SSLContext { } for (int i = 0; i < dhParameters.length; i++) { if (keylen >= dhParameters[i].min) { -return dhParameters[i].dh.toRawLongValue(); +return dhParameters[i].dh; } } -return MemoryAddress.NULL.toRawLongValue(); +return MemoryAddress.NULL; } // int SSL_callback_alpn_select_proto(SSL* ssl, const unsigned char **out, unsigned char *outlen, - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch main updated: Revert clean-up. definePackage always needs to be called.
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 The following commit(s) were added to refs/heads/main by this push: new 4a1165a Revert clean-up. definePackage always needs to be called. 4a1165a is described below commit 4a1165a72b9715fbdd35edc97d6dc319e7a6236c Author: Mark Thomas AuthorDate: Fri Jul 30 08:20:28 2021 +0100 Revert clean-up. definePackage always needs to be called. --- .../catalina/loader/WebappClassLoaderBase.java | 69 -- 1 file changed, 37 insertions(+), 32 deletions(-) diff --git a/java/org/apache/catalina/loader/WebappClassLoaderBase.java b/java/org/apache/catalina/loader/WebappClassLoaderBase.java index 0cdef0a..bb5ae0b 100644 --- a/java/org/apache/catalina/loader/WebappClassLoaderBase.java +++ b/java/org/apache/catalina/loader/WebappClassLoaderBase.java @@ -2451,41 +2451,46 @@ public abstract class WebappClassLoaderBase extends URLClassLoader } } -if (securityManager != null) { -// Looking up the package -int pos = name.lastIndexOf('.'); -if (pos != -1) { -String packageName = name.substring(0, pos); - -Package pkg = getPackage(packageName); - -// Define the package (if null) -if (pkg == null) { -try { -if (manifest == null) { -definePackage(packageName, null, null, null, null, null, null, null); -} else { -definePackage(packageName, manifest, codeBase); -} -} catch (IllegalArgumentException e) { -// Ignore: normal error due to dual definition of package -} -pkg = getPackage(packageName); -} +// Looking up the package +String packageName = null; +int pos = name.lastIndexOf('.'); +if (pos != -1) { +packageName = name.substring(0, pos); +} + +Package pkg = null; -// Checking sealing -if (pkg != null) { -boolean sealCheck = true; -if (pkg.isSealed()) { -sealCheck = pkg.isSealed(codeBase); +if (packageName != null) { +pkg = getPackage(packageName); + +// Define the package (if null) +if (pkg == null) { +try { +if (manifest == null) { +definePackage(packageName, null, null, null, null, null, null, null); } else { -sealCheck = (manifest == null) || !isPackageSealed(packageName, manifest); -} -if (!sealCheck) { -throw new SecurityException -("Sealing violation loading " + name + " : Package " - + packageName + " is sealed."); +definePackage(packageName, manifest, codeBase); } +} catch (IllegalArgumentException e) { +// Ignore: normal error due to dual definition of package +} +pkg = getPackage(packageName); +} +} + +if (securityManager != null) { +// Checking sealing +if (pkg != null) { +boolean sealCheck = true; +if (pkg.isSealed()) { +sealCheck = pkg.isSealed(codeBase); +} else { +sealCheck = (manifest == null) || !isPackageSealed(packageName, manifest); +} +if (!sealCheck) { +throw new SecurityException +("Sealing violation loading " + name + " : Package " + + packageName + " is sealed."); } } } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch main updated: Revert "Remove unused file"
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 The following commit(s) were added to refs/heads/main by this push: new 03e237b Revert "Remove unused file" 03e237b is described below commit 03e237b1a7ce58d547b36a0f09b61a826d46c9c8 Author: Mark Thomas AuthorDate: Fri Jun 25 08:10:13 2021 +0100 Revert "Remove unused file" This reverts commit 0dee371b82bf2ed18a7316430db8c25bdb3644e3. --- test/webapp/bug6/bug64872b-timeunit.jsp | 29 + 1 file changed, 29 insertions(+) diff --git a/test/webapp/bug6/bug64872b-timeunit.jsp b/test/webapp/bug6/bug64872b-timeunit.jsp new file mode 100644 index 000..679925f --- /dev/null +++ b/test/webapp/bug6/bug64872b-timeunit.jsp @@ -0,0 +1,29 @@ +<%-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--%> +<%@ taglib uri="http://tomcat.apache.org/tag-setters; prefix="ts" %> + + Bug 64872b TimeUnit test case + + <% + for (int i=0; i < 10; i++) { + %> +01 The value of foo is [] + <% + } + %> + + \ No newline at end of file - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org