(tomcat) branch main updated: Fix WebDAV bugs
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 3091999213 Fix WebDAV bugs 3091999213 is described below commit 30919992133deef9b596062f7c57357edee2f42c Author: remm AuthorDate: Mon Oct 14 13:03:41 2024 +0200 Fix WebDAV bugs Verify that destination is not locked for a WebDAV copy operation. Missing Lock-Token header in the response when locking a folder (the token was only in the body). Invalid lock requests should be rejected with 400. Fix regression in WebDAV when attempting to unlock a collection (the COW iterator does not support remove; instead remove on the collection itself and stop iterating). --- java/org/apache/catalina/servlets/WebdavServlet.java | 16 +--- webapps/docs/changelog.xml | 14 ++ 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java b/java/org/apache/catalina/servlets/WebdavServlet.java index 510e76d2ce..fe7546ba4f 100644 --- a/java/org/apache/catalina/servlets/WebdavServlet.java +++ b/java/org/apache/catalina/servlets/WebdavServlet.java @@ -1146,6 +1146,9 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen if (addLock) { lock.tokens.add(lockToken); collectionLocks.add(lock); +// Add the Lock-Token header as by RFC 2518 8.10.1 +// - only do this for newly created locks +resp.addHeader("Lock-Token", ""); } } else { @@ -1192,7 +1195,8 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen String ifHeader = req.getHeader("If"); if (ifHeader == null) { -ifHeader = ""; +// Bad request +resp.setStatus(WebdavStatus.SC_BAD_REQUEST); } // Checking resource locks @@ -1236,7 +1240,6 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen generatedXML.writeElement("D", "prop", XMLWriter.CLOSING); -resp.setStatus(WebdavStatus.SC_OK); resp.setContentType("text/xml; charset=UTF-8"); Writer writer = resp.getWriter(); writer.write(generatedXML.toString()); @@ -1307,9 +1310,10 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen } } if (lock.tokens.isEmpty()) { -collectionLocksList.remove(); +collectionLocks.remove(lock); // Removing any lock-null resource which would be present removeLockNull(path); +break; } } } @@ -1503,6 +1507,12 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen return false; } +// Check if destination is locked +if (isLocked(destinationPath, req)) { +resp.sendError(WebdavStatus.SC_LOCKED); +return false; +} + boolean overwrite = true; String overwriteHeader = req.getHeader("Overwrite"); if (overwriteHeader != null) { diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 9d141f1883..41f100d5f2 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -146,6 +146,20 @@ Avoid NPE in CrawlerSessionManagerValve for partially mapped requests. (remm) + +Add missing WebDAV Lock-Token header in the response when +locking a folder. (remm) + + +Invalid WebDAV lock requests should be rejected with 400. (remm) + + +Fix regression in WebDAV when attempting to unlock a collection. (remm) + + +Verify that destination is not locked for a WebDAV copy operation. +(remm) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 10.1.x updated: Fix WebDAV bugs
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/10.1.x by this push: new f404416446 Fix WebDAV bugs f404416446 is described below commit f4044164465b29f506152621efb9dbd699ca5410 Author: remm AuthorDate: Mon Oct 14 13:03:41 2024 +0200 Fix WebDAV bugs Verify that destination is not locked for a WebDAV copy operation. Missing Lock-Token header in the response when locking a folder (the token was only in the body). Invalid lock requests should be rejected with 400. Fix regression in WebDAV when attempting to unlock a collection (the COW iterator does not support remove; instead remove on the collection itself and stop iterating). --- java/org/apache/catalina/servlets/WebdavServlet.java | 16 +--- webapps/docs/changelog.xml | 14 ++ 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java b/java/org/apache/catalina/servlets/WebdavServlet.java index bead3cdc38..3b172beea7 100644 --- a/java/org/apache/catalina/servlets/WebdavServlet.java +++ b/java/org/apache/catalina/servlets/WebdavServlet.java @@ -1144,6 +1144,9 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen if (addLock) { lock.tokens.add(lockToken); collectionLocks.add(lock); +// Add the Lock-Token header as by RFC 2518 8.10.1 +// - only do this for newly created locks +resp.addHeader("Lock-Token", ""); } } else { @@ -1190,7 +1193,8 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen String ifHeader = req.getHeader("If"); if (ifHeader == null) { -ifHeader = ""; +// Bad request +resp.setStatus(WebdavStatus.SC_BAD_REQUEST); } // Checking resource locks @@ -1234,7 +1238,6 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen generatedXML.writeElement("D", "prop", XMLWriter.CLOSING); -resp.setStatus(WebdavStatus.SC_OK); resp.setContentType("text/xml; charset=UTF-8"); Writer writer = resp.getWriter(); writer.write(generatedXML.toString()); @@ -1305,9 +1308,10 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen } } if (lock.tokens.isEmpty()) { -collectionLocksList.remove(); +collectionLocks.remove(lock); // Removing any lock-null resource which would be present removeLockNull(path); +break; } } } @@ -1501,6 +1505,12 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen return false; } +// Check if destination is locked +if (isLocked(destinationPath, req)) { +resp.sendError(WebdavStatus.SC_LOCKED); +return false; +} + boolean overwrite = true; String overwriteHeader = req.getHeader("Overwrite"); if (overwriteHeader != null) { diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 1809e3445b..c29f997648 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -131,6 +131,20 @@ Avoid NPE in CrawlerSessionManagerValve for partially mapped requests. (remm) + +Add missing WebDAV Lock-Token header in the response when +locking a folder. (remm) + + +Invalid WebDAV lock requests should be rejected with 400. (remm) + + +Fix regression in WebDAV when attempting to unlock a collection. (remm) + + +Verify that destination is not locked for a WebDAV copy operation. +(remm) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 11.0.x updated: Fix WebDAV bugs
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 11.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/11.0.x by this push: new 9201a0f4d8 Fix WebDAV bugs 9201a0f4d8 is described below commit 9201a0f4d8c685e21ee998f005d305382fa267b0 Author: remm AuthorDate: Mon Oct 14 13:03:41 2024 +0200 Fix WebDAV bugs Verify that destination is not locked for a WebDAV copy operation. Missing Lock-Token header in the response when locking a folder (the token was only in the body). Invalid lock requests should be rejected with 400. Fix regression in WebDAV when attempting to unlock a collection (the COW iterator does not support remove; instead remove on the collection itself and stop iterating). --- java/org/apache/catalina/servlets/WebdavServlet.java | 16 +--- webapps/docs/changelog.xml | 14 ++ 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java b/java/org/apache/catalina/servlets/WebdavServlet.java index bead3cdc38..3b172beea7 100644 --- a/java/org/apache/catalina/servlets/WebdavServlet.java +++ b/java/org/apache/catalina/servlets/WebdavServlet.java @@ -1144,6 +1144,9 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen if (addLock) { lock.tokens.add(lockToken); collectionLocks.add(lock); +// Add the Lock-Token header as by RFC 2518 8.10.1 +// - only do this for newly created locks +resp.addHeader("Lock-Token", ""); } } else { @@ -1190,7 +1193,8 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen String ifHeader = req.getHeader("If"); if (ifHeader == null) { -ifHeader = ""; +// Bad request +resp.setStatus(WebdavStatus.SC_BAD_REQUEST); } // Checking resource locks @@ -1234,7 +1238,6 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen generatedXML.writeElement("D", "prop", XMLWriter.CLOSING); -resp.setStatus(WebdavStatus.SC_OK); resp.setContentType("text/xml; charset=UTF-8"); Writer writer = resp.getWriter(); writer.write(generatedXML.toString()); @@ -1305,9 +1308,10 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen } } if (lock.tokens.isEmpty()) { -collectionLocksList.remove(); +collectionLocks.remove(lock); // Removing any lock-null resource which would be present removeLockNull(path); +break; } } } @@ -1501,6 +1505,12 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen return false; } +// Check if destination is locked +if (isLocked(destinationPath, req)) { +resp.sendError(WebdavStatus.SC_LOCKED); +return false; +} + boolean overwrite = true; String overwriteHeader = req.getHeader("Overwrite"); if (overwriteHeader != null) { diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 001d5df5cf..6775c825a7 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -131,6 +131,20 @@ Avoid NPE in CrawlerSessionManagerValve for partially mapped requests. (remm) + +Add missing WebDAV Lock-Token header in the response when +locking a folder. (remm) + + +Invalid WebDAV lock requests should be rejected with 400. (remm) + + +Fix regression in WebDAV when attempting to unlock a collection. (remm) + + +Verify that destination is not locked for a WebDAV copy operation. +(remm) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 9.0.x updated: Fix WebDAV bugs
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/9.0.x by this push: new a5c851a228 Fix WebDAV bugs a5c851a228 is described below commit a5c851a22888f540b393e45bce7ee305986872b8 Author: remm AuthorDate: Mon Oct 14 13:03:41 2024 +0200 Fix WebDAV bugs Verify that destination is not locked for a WebDAV copy operation. Missing Lock-Token header in the response when locking a folder (the token was only in the body). Invalid lock requests should be rejected with 400. Fix regression in WebDAV when attempting to unlock a collection (the COW iterator does not support remove; instead remove on the collection itself and stop iterating). --- java/org/apache/catalina/servlets/WebdavServlet.java | 16 +--- webapps/docs/changelog.xml | 14 ++ 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java b/java/org/apache/catalina/servlets/WebdavServlet.java index 3dee2ef4c3..71d89e5acc 100644 --- a/java/org/apache/catalina/servlets/WebdavServlet.java +++ b/java/org/apache/catalina/servlets/WebdavServlet.java @@ -1143,6 +1143,9 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen if (addLock) { lock.tokens.add(lockToken); collectionLocks.add(lock); +// Add the Lock-Token header as by RFC 2518 8.10.1 +// - only do this for newly created locks +resp.addHeader("Lock-Token", ""); } } else { @@ -1189,7 +1192,8 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen String ifHeader = req.getHeader("If"); if (ifHeader == null) { -ifHeader = ""; +// Bad request +resp.setStatus(WebdavStatus.SC_BAD_REQUEST); } // Checking resource locks @@ -1233,7 +1237,6 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen generatedXML.writeElement("D", "prop", XMLWriter.CLOSING); -resp.setStatus(WebdavStatus.SC_OK); resp.setContentType("text/xml; charset=UTF-8"); Writer writer = resp.getWriter(); writer.write(generatedXML.toString()); @@ -1304,9 +1307,10 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen } } if (lock.tokens.isEmpty()) { -collectionLocksList.remove(); +collectionLocks.remove(lock); // Removing any lock-null resource which would be present removeLockNull(path); +break; } } } @@ -1500,6 +1504,12 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen return false; } +// Check if destination is locked +if (isLocked(destinationPath, req)) { +resp.sendError(WebdavStatus.SC_LOCKED); +return false; +} + boolean overwrite = true; String overwriteHeader = req.getHeader("Overwrite"); if (overwriteHeader != null) { diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 4c44c177a4..a8046a668e 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -131,6 +131,20 @@ Avoid NPE in CrawlerSessionManagerValve for partially mapped requests. (remm) + +Add missing WebDAV Lock-Token header in the response when +locking a folder. (remm) + + +Invalid WebDAV lock requests should be rejected with 400. (remm) + + +Fix regression in WebDAV when attempting to unlock a collection. (remm) + + +Verify that destination is not locked for a WebDAV copy operation. +(remm) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 69394] Breaking-change in jasper releaseTag method
https://bz.apache.org/bugzilla/show_bug.cgi?id=69394 Remy Maucherat changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #1 from Remy Maucherat --- Generated code is (obviously, when you think about it) tied to a specific version of Jasper. So it is a very good idea to drop generated code in the work dir (or precompile again) when you upgrade. However, the method has been added back as deprecated since it was quite easy to do: https://github.com/apache/tomcat/commit/ecd4aa1af00ca055df9f709cd3c88d315b71b0fa -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 69355] an enhanced exact rate limit control mechanism
https://bz.apache.org/bugzilla/show_bug.cgi?id=69355 --- Comment #5 from Remy Maucherat --- (In reply to Chen Jp from comment #4) > (In reply to Remy Maucherat from comment #3) > > I see a trend in the PRs that you are submitting. Trying to be as precise as > > possible is a commendable goal, but the problem is that this exactitude does > > not make much sense in the context of Tomcat since the randomness of network > > transport is always present. As a result, it can be better to be as > > efficient as possible and accept deviating a few % off target. > > > > Q: Are you using a tool to identify these issues ? Finding them by yourself > > on your own would be very impressive. > > If extra accuracy doesn't cost much, why not? It's useful for debugging > purpose. > > A new spec draft is published recently, on Oct 7. Please see > https://datatracker.ietf.org/doc/draft-ietf-httpapi-ratelimit-headers/ > > A: As a senior Javaer but not so familiar with tomcat source code(especially > on tomcat-http11/http2-communication part), hope to contribute. First of > all, I do think that using of code quality tool (+ AI.) is a basic skill for > us. There is no reason not to fix the issues/bugs, no matter how they are > identified (100% manually or 95% artificially). Secondary, if you have > similar tool which can identify this BZ rate-limit-enhancement feather > request, I'm very interesting in it, please share it with me. > > per comment, replacement PR present. > (https://github.com/apache/tomcat/pull/760) Sure ok, 100% precision is better, so I am not against fixing it if there's no downside. However, there's a lot of analysis needed to find this one, and the benefit for the fix is minimal to non existent. So overall I am surprised you did not find any other higher impact issue. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch main updated: Add WebDAV test scenario
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 1cce07e62b Add WebDAV test scenario 1cce07e62b is described below commit 1cce07e62b3f2afc6e6190f4cb92a283daba6b1d Author: remm AuthorDate: Mon Oct 14 13:31:18 2024 +0200 Add WebDAV test scenario --- .../catalina/servlets/TestWebdavServlet.java | 243 + 1 file changed, 243 insertions(+) diff --git a/test/org/apache/catalina/servlets/TestWebdavServlet.java b/test/org/apache/catalina/servlets/TestWebdavServlet.java index 9e2eb1fecb..85389378e7 100644 --- a/test/org/apache/catalina/servlets/TestWebdavServlet.java +++ b/test/org/apache/catalina/servlets/TestWebdavServlet.java @@ -187,6 +187,249 @@ public class TestWebdavServlet extends TomcatBaseTest { SAXParserFactory.newInstance().newSAXParser().getXMLReader().parse(new InputSource(new StringReader(client.getResponseBody(; } +private static final String CONTENT = "FOOBAR"; + +private static final String LOCK_BODY = +"\n" + +"\n" + +" \n" + +" \n" + +" someone\n" + +""; + +@Test +public void testBasicOperations() throws Exception { +Tomcat tomcat = getTomcatInstance(); + +// Create a temp webapp that can be safely written to +File tempWebapp = new File(getTemporaryDirectory(), "webdav-webapp"); +Assert.assertTrue(tempWebapp.mkdirs()); +Context ctxt = tomcat.addContext("", tempWebapp.getAbsolutePath()); +Wrapper webdavServlet = Tomcat.addServlet(ctxt, "webdav", new WebdavServlet()); +webdavServlet.addInitParameter("listings", "true"); +webdavServlet.addInitParameter("secret", "foo"); +webdavServlet.addInitParameter("readonly", "false"); +ctxt.addServletMappingDecoded("/*", "webdav"); +tomcat.start(); + +Client client = new Client(); +client.setPort(getPort()); + +// Create a few files +client.setRequest(new String[] { "PUT /file1.txt HTTP/1.1" + SimpleHttpClient.CRLF + +"Host: localhost:" + getPort() + SimpleHttpClient.CRLF + +"Content-Length: 6" + SimpleHttpClient.CRLF + +"Connection: Close" + SimpleHttpClient.CRLF + +SimpleHttpClient.CRLF + CONTENT }); +client.connect(); +client.processRequest(true); +Assert.assertEquals(HttpServletResponse.SC_CREATED, client.getStatusCode()); + +client.setRequest(new String[] { "PUT /file2.txt HTTP/1.1" + SimpleHttpClient.CRLF + +"Host: localhost:" + getPort() + SimpleHttpClient.CRLF + +"Content-Length: 12" + SimpleHttpClient.CRLF + +"Connection: Close" + SimpleHttpClient.CRLF + +SimpleHttpClient.CRLF + CONTENT + CONTENT }); +client.connect(); +client.processRequest(true); +Assert.assertEquals(HttpServletResponse.SC_CREATED, client.getStatusCode()); + +client.setRequest(new String[] { "MKCOL /myfolder HTTP/1.1" + SimpleHttpClient.CRLF + +"Host: localhost:" + getPort() + SimpleHttpClient.CRLF + +"Connection: Close" + SimpleHttpClient.CRLF + +SimpleHttpClient.CRLF }); +client.connect(); +client.processRequest(true); +Assert.assertEquals(HttpServletResponse.SC_CREATED, client.getStatusCode()); + +client.setRequest(new String[] { "PUT /myfolder/file3.txt HTTP/1.1" + SimpleHttpClient.CRLF + +"Host: localhost:" + getPort() + SimpleHttpClient.CRLF + +"Content-Length: 6" + SimpleHttpClient.CRLF + +"Connection: Close" + SimpleHttpClient.CRLF + +SimpleHttpClient.CRLF + CONTENT }); +client.connect(); +client.processRequest(true); +Assert.assertEquals(HttpServletResponse.SC_CREATED, client.getStatusCode()); + +// Verify that listing the file works +client.setRequest(new String[] { "PROPFIND / HTTP/1.1" + SimpleHttpClient.CRLF + +"Host: localhost:" + getPort() + SimpleHttpClient.CRLF + +"Connection: Close" + SimpleHttpClient.CRLF + +SimpleHttpClient.CRLF }); +client.connect(); +client.processRequest(true); + Assert.assertTrue(client.getResponseBody().contains("12<")); + +// Lock /myfolder +client.setRequest(new String[] { "LOCK /myfolder HTTP/1.1" + SimpleHttpClient.CRLF + +"Host: localhost:" + getPort() + SimpleHttpClient.CRLF + +"Content-Length: " + LOCK_BODY.length() + SimpleHttpClient.CRLF + +"Connection: Close" + SimpleHttpClient.CRLF + +SimpleHttpClient.CRLF + LOCK_BODY }); +client.connect()
(tomcat) branch main updated: Harmonize
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 5059ad01d9 Harmonize 5059ad01d9 is described below commit 5059ad01d9bdd051342a4a06b6db26071cc997ce Author: remm AuthorDate: Mon Oct 14 11:11:50 2024 +0200 Harmonize Avoid getting the relative path multiple times. Reuse the isLocked code more. Remove lock check from doDelete since deleteResource does it. --- .../apache/catalina/servlets/WebdavServlet.java| 71 ++ 1 file changed, 32 insertions(+), 39 deletions(-) diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java b/java/org/apache/catalina/servlets/WebdavServlet.java index 1b72342a47..510e76d2ce 100644 --- a/java/org/apache/catalina/servlets/WebdavServlet.java +++ b/java/org/apache/catalina/servlets/WebdavServlet.java @@ -686,7 +686,7 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen return; } -if (isLocked(req)) { +if (isLocked(null, req)) { resp.sendError(WebdavStatus.SC_LOCKED); return; } @@ -722,7 +722,7 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen return; } -if (isLocked(req)) { +if (isLocked(path, req)) { resp.sendError(WebdavStatus.SC_LOCKED); return; } @@ -761,24 +761,22 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen return; } -if (isLocked(req)) { -resp.sendError(WebdavStatus.SC_LOCKED); -return; -} +String path = getRelativePath(req); -deleteResource(req, resp); +deleteResource(path, req, resp); } @Override protected void doPut(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { -if (isLocked(req)) { +String path = getRelativePath(req); + +if (isLocked(path, req)) { resp.sendError(WebdavStatus.SC_LOCKED); return; } -String path = getRelativePath(req); WebResource resource = resources.getResource(path); if (resource.isDirectory()) { sendNotAllowed(req, resp); @@ -807,7 +805,9 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen return; } -copyResource(req, resp); +String path = getRelativePath(req); + +copyResource(path, req, resp); } @@ -826,14 +826,14 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen return; } -if (isLocked(req)) { +String path = getRelativePath(req); + +if (isLocked(path, req)) { resp.sendError(WebdavStatus.SC_LOCKED); return; } -String path = getRelativePath(req); - -if (copyResource(req, resp)) { +if (copyResource(path, req, resp)) { deleteResource(path, req, resp, false); } } @@ -855,7 +855,9 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen return; } -if (isLocked(req)) { +String path = getRelativePath(req); + +if (isLocked(path, req)) { resp.sendError(WebdavStatus.SC_LOCKED); return; } @@ -1044,8 +1046,6 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen } } -String path = getRelativePath(req); - lock.path = path; WebResource resource = resources.getResource(path); @@ -1259,13 +1259,13 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen return; } -if (isLocked(req)) { +String path = getRelativePath(req); + +if (isLocked(path, req)) { resp.sendError(WebdavStatus.SC_LOCKED); return; } -String path = getRelativePath(req); - String lockTokenHeader = req.getHeader("Lock-Token"); if (lockTokenHeader == null) { lockTokenHeader = ""; @@ -1324,14 +1324,17 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen * Check to see if a resource is currently write locked. The method will look at the "If" header to make sure the * client has give the appropriate lock tokens. * + * @param path The relative path * @param req Servlet request * * @return true if the resource is locked (and no appropriate lock token has been found for at least * one of the non-shared locks which are present on the resource). */ -private boolean isLo
(tomcat) branch 11.0.x updated: Harmonize
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 11.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/11.0.x by this push: new 2590251386 Harmonize 2590251386 is described below commit 2590251386f5afd2c1540c0cf3f2d363e1b57048 Author: remm AuthorDate: Mon Oct 14 11:11:50 2024 +0200 Harmonize Avoid getting the relative path multiple times. Reuse the isLocked code more. Remove lock check from doDelete since deleteResource does it. --- .../apache/catalina/servlets/WebdavServlet.java| 71 ++ 1 file changed, 32 insertions(+), 39 deletions(-) diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java b/java/org/apache/catalina/servlets/WebdavServlet.java index dcf7aee188..bead3cdc38 100644 --- a/java/org/apache/catalina/servlets/WebdavServlet.java +++ b/java/org/apache/catalina/servlets/WebdavServlet.java @@ -684,7 +684,7 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen return; } -if (isLocked(req)) { +if (isLocked(null, req)) { resp.sendError(WebdavStatus.SC_LOCKED); return; } @@ -720,7 +720,7 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen return; } -if (isLocked(req)) { +if (isLocked(path, req)) { resp.sendError(WebdavStatus.SC_LOCKED); return; } @@ -759,24 +759,22 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen return; } -if (isLocked(req)) { -resp.sendError(WebdavStatus.SC_LOCKED); -return; -} +String path = getRelativePath(req); -deleteResource(req, resp); +deleteResource(path, req, resp); } @Override protected void doPut(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { -if (isLocked(req)) { +String path = getRelativePath(req); + +if (isLocked(path, req)) { resp.sendError(WebdavStatus.SC_LOCKED); return; } -String path = getRelativePath(req); WebResource resource = resources.getResource(path); if (resource.isDirectory()) { sendNotAllowed(req, resp); @@ -805,7 +803,9 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen return; } -copyResource(req, resp); +String path = getRelativePath(req); + +copyResource(path, req, resp); } @@ -824,14 +824,14 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen return; } -if (isLocked(req)) { +String path = getRelativePath(req); + +if (isLocked(path, req)) { resp.sendError(WebdavStatus.SC_LOCKED); return; } -String path = getRelativePath(req); - -if (copyResource(req, resp)) { +if (copyResource(path, req, resp)) { deleteResource(path, req, resp, false); } } @@ -853,7 +853,9 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen return; } -if (isLocked(req)) { +String path = getRelativePath(req); + +if (isLocked(path, req)) { resp.sendError(WebdavStatus.SC_LOCKED); return; } @@ -1042,8 +1044,6 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen } } -String path = getRelativePath(req); - lock.path = path; WebResource resource = resources.getResource(path); @@ -1257,13 +1257,13 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen return; } -if (isLocked(req)) { +String path = getRelativePath(req); + +if (isLocked(path, req)) { resp.sendError(WebdavStatus.SC_LOCKED); return; } -String path = getRelativePath(req); - String lockTokenHeader = req.getHeader("Lock-Token"); if (lockTokenHeader == null) { lockTokenHeader = ""; @@ -1322,14 +1322,17 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen * Check to see if a resource is currently write locked. The method will look at the "If" header to make sure the * client has give the appropriate lock tokens. * + * @param path The relative path * @param req Servlet request * * @return true if the resource is locked (and no appropriate lock token has been found for at least * one of the non-shared locks which are present on the resource). */ -private boolean
(tomcat) branch 9.0.x updated: Harmonize
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/9.0.x by this push: new d647caa6d8 Harmonize d647caa6d8 is described below commit d647caa6d8759bc4125fede02e55049a1685fd2b Author: remm AuthorDate: Mon Oct 14 11:11:50 2024 +0200 Harmonize Avoid getting the relative path multiple times. Reuse the isLocked code more. Remove lock check from doDelete since deleteResource does it. --- .../apache/catalina/servlets/WebdavServlet.java| 71 ++ 1 file changed, 32 insertions(+), 39 deletions(-) diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java b/java/org/apache/catalina/servlets/WebdavServlet.java index 2ddbd66ed8..3dee2ef4c3 100644 --- a/java/org/apache/catalina/servlets/WebdavServlet.java +++ b/java/org/apache/catalina/servlets/WebdavServlet.java @@ -683,7 +683,7 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen return; } -if (isLocked(req)) { +if (isLocked(null, req)) { resp.sendError(WebdavStatus.SC_LOCKED); return; } @@ -719,7 +719,7 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen return; } -if (isLocked(req)) { +if (isLocked(path, req)) { resp.sendError(WebdavStatus.SC_LOCKED); return; } @@ -758,24 +758,22 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen return; } -if (isLocked(req)) { -resp.sendError(WebdavStatus.SC_LOCKED); -return; -} +String path = getRelativePath(req); -deleteResource(req, resp); +deleteResource(path, req, resp); } @Override protected void doPut(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { -if (isLocked(req)) { +String path = getRelativePath(req); + +if (isLocked(path, req)) { resp.sendError(WebdavStatus.SC_LOCKED); return; } -String path = getRelativePath(req); WebResource resource = resources.getResource(path); if (resource.isDirectory()) { sendNotAllowed(req, resp); @@ -804,7 +802,9 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen return; } -copyResource(req, resp); +String path = getRelativePath(req); + +copyResource(path, req, resp); } @@ -823,14 +823,14 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen return; } -if (isLocked(req)) { +String path = getRelativePath(req); + +if (isLocked(path, req)) { resp.sendError(WebdavStatus.SC_LOCKED); return; } -String path = getRelativePath(req); - -if (copyResource(req, resp)) { +if (copyResource(path, req, resp)) { deleteResource(path, req, resp, false); } } @@ -852,7 +852,9 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen return; } -if (isLocked(req)) { +String path = getRelativePath(req); + +if (isLocked(path, req)) { resp.sendError(WebdavStatus.SC_LOCKED); return; } @@ -1041,8 +1043,6 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen } } -String path = getRelativePath(req); - lock.path = path; WebResource resource = resources.getResource(path); @@ -1256,13 +1256,13 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen return; } -if (isLocked(req)) { +String path = getRelativePath(req); + +if (isLocked(path, req)) { resp.sendError(WebdavStatus.SC_LOCKED); return; } -String path = getRelativePath(req); - String lockTokenHeader = req.getHeader("Lock-Token"); if (lockTokenHeader == null) { lockTokenHeader = ""; @@ -1321,14 +1321,17 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen * Check to see if a resource is currently write locked. The method will look at the "If" header to make sure the * client has give the appropriate lock tokens. * + * @param path The relative path * @param req Servlet request * * @return true if the resource is locked (and no appropriate lock token has been found for at least * one of the non-shared locks which are present on the resource). */ -private boolean is
(tomcat) branch 10.1.x updated: Harmonize
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/10.1.x by this push: new 2363c3fa64 Harmonize 2363c3fa64 is described below commit 2363c3fa649d9b6e569946679d575184d3b07b30 Author: remm AuthorDate: Mon Oct 14 11:11:50 2024 +0200 Harmonize Avoid getting the relative path multiple times. Reuse the isLocked code more. Remove lock check from doDelete since deleteResource does it. --- .../apache/catalina/servlets/WebdavServlet.java| 71 ++ 1 file changed, 32 insertions(+), 39 deletions(-) diff --git a/java/org/apache/catalina/servlets/WebdavServlet.java b/java/org/apache/catalina/servlets/WebdavServlet.java index dcf7aee188..bead3cdc38 100644 --- a/java/org/apache/catalina/servlets/WebdavServlet.java +++ b/java/org/apache/catalina/servlets/WebdavServlet.java @@ -684,7 +684,7 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen return; } -if (isLocked(req)) { +if (isLocked(null, req)) { resp.sendError(WebdavStatus.SC_LOCKED); return; } @@ -720,7 +720,7 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen return; } -if (isLocked(req)) { +if (isLocked(path, req)) { resp.sendError(WebdavStatus.SC_LOCKED); return; } @@ -759,24 +759,22 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen return; } -if (isLocked(req)) { -resp.sendError(WebdavStatus.SC_LOCKED); -return; -} +String path = getRelativePath(req); -deleteResource(req, resp); +deleteResource(path, req, resp); } @Override protected void doPut(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { -if (isLocked(req)) { +String path = getRelativePath(req); + +if (isLocked(path, req)) { resp.sendError(WebdavStatus.SC_LOCKED); return; } -String path = getRelativePath(req); WebResource resource = resources.getResource(path); if (resource.isDirectory()) { sendNotAllowed(req, resp); @@ -805,7 +803,9 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen return; } -copyResource(req, resp); +String path = getRelativePath(req); + +copyResource(path, req, resp); } @@ -824,14 +824,14 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen return; } -if (isLocked(req)) { +String path = getRelativePath(req); + +if (isLocked(path, req)) { resp.sendError(WebdavStatus.SC_LOCKED); return; } -String path = getRelativePath(req); - -if (copyResource(req, resp)) { +if (copyResource(path, req, resp)) { deleteResource(path, req, resp, false); } } @@ -853,7 +853,9 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen return; } -if (isLocked(req)) { +String path = getRelativePath(req); + +if (isLocked(path, req)) { resp.sendError(WebdavStatus.SC_LOCKED); return; } @@ -1042,8 +1044,6 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen } } -String path = getRelativePath(req); - lock.path = path; WebResource resource = resources.getResource(path); @@ -1257,13 +1257,13 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen return; } -if (isLocked(req)) { +String path = getRelativePath(req); + +if (isLocked(path, req)) { resp.sendError(WebdavStatus.SC_LOCKED); return; } -String path = getRelativePath(req); - String lockTokenHeader = req.getHeader("Lock-Token"); if (lockTokenHeader == null) { lockTokenHeader = ""; @@ -1322,14 +1322,17 @@ public class WebdavServlet extends DefaultServlet implements PeriodicEventListen * Check to see if a resource is currently write locked. The method will look at the "If" header to make sure the * client has give the appropriate lock tokens. * + * @param path The relative path * @param req Servlet request * * @return true if the resource is locked (and no appropriate lock token has been found for at least * one of the non-shared locks which are present on the resource). */ -private boolean
[Bug 69394] New: Breaking-change in jasper releaseTag method
https://bz.apache.org/bugzilla/show_bug.cgi?id=69394 Bug ID: 69394 Summary: Breaking-change in jasper releaseTag method Product: Tomcat 9 Version: 9.0.96 Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P2 Component: Jasper Assignee: dev@tomcat.apache.org Reporter: guillaume.houd...@kurmi-software.com Target Milestone: - The changes made for BUG 69333 introduce a breaking-change in jasper that prevent the use of wars with pre-compiled JSPs compatible with all versions of Tomcat 9.0.x. The 3rd argument of the releaseTag method has been removed. This causes an exception with JSPs pre-compiled in previous versions of Jasper: --- org.apache.catalina.core.ApplicationDispatcher.invoke Servlet.service() for servlet [org.apache.jsp.world_jsp] threw exception java.lang.NoSuchMethodError: org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(Ljavax/servlet/jsp/tagext/Tag;Lorg/apache/tomcat/InstanceManager;Z)V --- I think that this 3rd argument should be reintroduced with a deprecation notice and removed in the next major version of Tomcat. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 10.1.x updated: Add WebDAV test scenario
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/10.1.x by this push: new 3cd46c41fc Add WebDAV test scenario 3cd46c41fc is described below commit 3cd46c41fc5c86f4afff990ca48f41292c123fc4 Author: remm AuthorDate: Mon Oct 14 13:31:18 2024 +0200 Add WebDAV test scenario --- .../catalina/servlets/TestWebdavServlet.java | 243 + 1 file changed, 243 insertions(+) diff --git a/test/org/apache/catalina/servlets/TestWebdavServlet.java b/test/org/apache/catalina/servlets/TestWebdavServlet.java index 9e2eb1fecb..85389378e7 100644 --- a/test/org/apache/catalina/servlets/TestWebdavServlet.java +++ b/test/org/apache/catalina/servlets/TestWebdavServlet.java @@ -187,6 +187,249 @@ public class TestWebdavServlet extends TomcatBaseTest { SAXParserFactory.newInstance().newSAXParser().getXMLReader().parse(new InputSource(new StringReader(client.getResponseBody(; } +private static final String CONTENT = "FOOBAR"; + +private static final String LOCK_BODY = +"\n" + +"\n" + +" \n" + +" \n" + +" someone\n" + +""; + +@Test +public void testBasicOperations() throws Exception { +Tomcat tomcat = getTomcatInstance(); + +// Create a temp webapp that can be safely written to +File tempWebapp = new File(getTemporaryDirectory(), "webdav-webapp"); +Assert.assertTrue(tempWebapp.mkdirs()); +Context ctxt = tomcat.addContext("", tempWebapp.getAbsolutePath()); +Wrapper webdavServlet = Tomcat.addServlet(ctxt, "webdav", new WebdavServlet()); +webdavServlet.addInitParameter("listings", "true"); +webdavServlet.addInitParameter("secret", "foo"); +webdavServlet.addInitParameter("readonly", "false"); +ctxt.addServletMappingDecoded("/*", "webdav"); +tomcat.start(); + +Client client = new Client(); +client.setPort(getPort()); + +// Create a few files +client.setRequest(new String[] { "PUT /file1.txt HTTP/1.1" + SimpleHttpClient.CRLF + +"Host: localhost:" + getPort() + SimpleHttpClient.CRLF + +"Content-Length: 6" + SimpleHttpClient.CRLF + +"Connection: Close" + SimpleHttpClient.CRLF + +SimpleHttpClient.CRLF + CONTENT }); +client.connect(); +client.processRequest(true); +Assert.assertEquals(HttpServletResponse.SC_CREATED, client.getStatusCode()); + +client.setRequest(new String[] { "PUT /file2.txt HTTP/1.1" + SimpleHttpClient.CRLF + +"Host: localhost:" + getPort() + SimpleHttpClient.CRLF + +"Content-Length: 12" + SimpleHttpClient.CRLF + +"Connection: Close" + SimpleHttpClient.CRLF + +SimpleHttpClient.CRLF + CONTENT + CONTENT }); +client.connect(); +client.processRequest(true); +Assert.assertEquals(HttpServletResponse.SC_CREATED, client.getStatusCode()); + +client.setRequest(new String[] { "MKCOL /myfolder HTTP/1.1" + SimpleHttpClient.CRLF + +"Host: localhost:" + getPort() + SimpleHttpClient.CRLF + +"Connection: Close" + SimpleHttpClient.CRLF + +SimpleHttpClient.CRLF }); +client.connect(); +client.processRequest(true); +Assert.assertEquals(HttpServletResponse.SC_CREATED, client.getStatusCode()); + +client.setRequest(new String[] { "PUT /myfolder/file3.txt HTTP/1.1" + SimpleHttpClient.CRLF + +"Host: localhost:" + getPort() + SimpleHttpClient.CRLF + +"Content-Length: 6" + SimpleHttpClient.CRLF + +"Connection: Close" + SimpleHttpClient.CRLF + +SimpleHttpClient.CRLF + CONTENT }); +client.connect(); +client.processRequest(true); +Assert.assertEquals(HttpServletResponse.SC_CREATED, client.getStatusCode()); + +// Verify that listing the file works +client.setRequest(new String[] { "PROPFIND / HTTP/1.1" + SimpleHttpClient.CRLF + +"Host: localhost:" + getPort() + SimpleHttpClient.CRLF + +"Connection: Close" + SimpleHttpClient.CRLF + +SimpleHttpClient.CRLF }); +client.connect(); +client.processRequest(true); + Assert.assertTrue(client.getResponseBody().contains("12<")); + +// Lock /myfolder +client.setRequest(new String[] { "LOCK /myfolder HTTP/1.1" + SimpleHttpClient.CRLF + +"Host: localhost:" + getPort() + SimpleHttpClient.CRLF + +"Content-Length: " + LOCK_BODY.length() + SimpleHttpClient.CRLF + +"Connection: Close" + SimpleHttpClient.CRLF + +SimpleHttpClient.CRLF + LOCK_BODY }); +client.conne
(tomcat) branch 11.0.x updated: Add WebDAV test scenario
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 11.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/11.0.x by this push: new cb07887727 Add WebDAV test scenario cb07887727 is described below commit cb078877279ec077cccb381e3dc2dfb19c8a453a Author: remm AuthorDate: Mon Oct 14 13:31:18 2024 +0200 Add WebDAV test scenario --- .../catalina/servlets/TestWebdavServlet.java | 243 + 1 file changed, 243 insertions(+) diff --git a/test/org/apache/catalina/servlets/TestWebdavServlet.java b/test/org/apache/catalina/servlets/TestWebdavServlet.java index 9e2eb1fecb..85389378e7 100644 --- a/test/org/apache/catalina/servlets/TestWebdavServlet.java +++ b/test/org/apache/catalina/servlets/TestWebdavServlet.java @@ -187,6 +187,249 @@ public class TestWebdavServlet extends TomcatBaseTest { SAXParserFactory.newInstance().newSAXParser().getXMLReader().parse(new InputSource(new StringReader(client.getResponseBody(; } +private static final String CONTENT = "FOOBAR"; + +private static final String LOCK_BODY = +"\n" + +"\n" + +" \n" + +" \n" + +" someone\n" + +""; + +@Test +public void testBasicOperations() throws Exception { +Tomcat tomcat = getTomcatInstance(); + +// Create a temp webapp that can be safely written to +File tempWebapp = new File(getTemporaryDirectory(), "webdav-webapp"); +Assert.assertTrue(tempWebapp.mkdirs()); +Context ctxt = tomcat.addContext("", tempWebapp.getAbsolutePath()); +Wrapper webdavServlet = Tomcat.addServlet(ctxt, "webdav", new WebdavServlet()); +webdavServlet.addInitParameter("listings", "true"); +webdavServlet.addInitParameter("secret", "foo"); +webdavServlet.addInitParameter("readonly", "false"); +ctxt.addServletMappingDecoded("/*", "webdav"); +tomcat.start(); + +Client client = new Client(); +client.setPort(getPort()); + +// Create a few files +client.setRequest(new String[] { "PUT /file1.txt HTTP/1.1" + SimpleHttpClient.CRLF + +"Host: localhost:" + getPort() + SimpleHttpClient.CRLF + +"Content-Length: 6" + SimpleHttpClient.CRLF + +"Connection: Close" + SimpleHttpClient.CRLF + +SimpleHttpClient.CRLF + CONTENT }); +client.connect(); +client.processRequest(true); +Assert.assertEquals(HttpServletResponse.SC_CREATED, client.getStatusCode()); + +client.setRequest(new String[] { "PUT /file2.txt HTTP/1.1" + SimpleHttpClient.CRLF + +"Host: localhost:" + getPort() + SimpleHttpClient.CRLF + +"Content-Length: 12" + SimpleHttpClient.CRLF + +"Connection: Close" + SimpleHttpClient.CRLF + +SimpleHttpClient.CRLF + CONTENT + CONTENT }); +client.connect(); +client.processRequest(true); +Assert.assertEquals(HttpServletResponse.SC_CREATED, client.getStatusCode()); + +client.setRequest(new String[] { "MKCOL /myfolder HTTP/1.1" + SimpleHttpClient.CRLF + +"Host: localhost:" + getPort() + SimpleHttpClient.CRLF + +"Connection: Close" + SimpleHttpClient.CRLF + +SimpleHttpClient.CRLF }); +client.connect(); +client.processRequest(true); +Assert.assertEquals(HttpServletResponse.SC_CREATED, client.getStatusCode()); + +client.setRequest(new String[] { "PUT /myfolder/file3.txt HTTP/1.1" + SimpleHttpClient.CRLF + +"Host: localhost:" + getPort() + SimpleHttpClient.CRLF + +"Content-Length: 6" + SimpleHttpClient.CRLF + +"Connection: Close" + SimpleHttpClient.CRLF + +SimpleHttpClient.CRLF + CONTENT }); +client.connect(); +client.processRequest(true); +Assert.assertEquals(HttpServletResponse.SC_CREATED, client.getStatusCode()); + +// Verify that listing the file works +client.setRequest(new String[] { "PROPFIND / HTTP/1.1" + SimpleHttpClient.CRLF + +"Host: localhost:" + getPort() + SimpleHttpClient.CRLF + +"Connection: Close" + SimpleHttpClient.CRLF + +SimpleHttpClient.CRLF }); +client.connect(); +client.processRequest(true); + Assert.assertTrue(client.getResponseBody().contains("12<")); + +// Lock /myfolder +client.setRequest(new String[] { "LOCK /myfolder HTTP/1.1" + SimpleHttpClient.CRLF + +"Host: localhost:" + getPort() + SimpleHttpClient.CRLF + +"Content-Length: " + LOCK_BODY.length() + SimpleHttpClient.CRLF + +"Connection: Close" + SimpleHttpClient.CRLF + +SimpleHttpClient.CRLF + LOCK_BODY }); +client.conne
(tomcat) branch 9.0.x updated: Add WebDAV test scenario
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/9.0.x by this push: new c114e0d77a Add WebDAV test scenario c114e0d77a is described below commit c114e0d77a73fc8b7bed18d440e01d72efe57983 Author: remm AuthorDate: Mon Oct 14 13:31:18 2024 +0200 Add WebDAV test scenario --- .../catalina/servlets/TestWebdavServlet.java | 243 + 1 file changed, 243 insertions(+) diff --git a/test/org/apache/catalina/servlets/TestWebdavServlet.java b/test/org/apache/catalina/servlets/TestWebdavServlet.java index 85b0f0b591..5a7762f453 100644 --- a/test/org/apache/catalina/servlets/TestWebdavServlet.java +++ b/test/org/apache/catalina/servlets/TestWebdavServlet.java @@ -186,6 +186,249 @@ public class TestWebdavServlet extends TomcatBaseTest { SAXParserFactory.newInstance().newSAXParser().getXMLReader().parse(new InputSource(new StringReader(client.getResponseBody(; } +private static final String CONTENT = "FOOBAR"; + +private static final String LOCK_BODY = +"\n" + +"\n" + +" \n" + +" \n" + +" someone\n" + +""; + +@Test +public void testBasicOperations() throws Exception { +Tomcat tomcat = getTomcatInstance(); + +// Create a temp webapp that can be safely written to +File tempWebapp = new File(getTemporaryDirectory(), "webdav-webapp"); +Assert.assertTrue(tempWebapp.mkdirs()); +Context ctxt = tomcat.addContext("", tempWebapp.getAbsolutePath()); +Wrapper webdavServlet = Tomcat.addServlet(ctxt, "webdav", new WebdavServlet()); +webdavServlet.addInitParameter("listings", "true"); +webdavServlet.addInitParameter("secret", "foo"); +webdavServlet.addInitParameter("readonly", "false"); +ctxt.addServletMappingDecoded("/*", "webdav"); +tomcat.start(); + +Client client = new Client(); +client.setPort(getPort()); + +// Create a few files +client.setRequest(new String[] { "PUT /file1.txt HTTP/1.1" + SimpleHttpClient.CRLF + +"Host: localhost:" + getPort() + SimpleHttpClient.CRLF + +"Content-Length: 6" + SimpleHttpClient.CRLF + +"Connection: Close" + SimpleHttpClient.CRLF + +SimpleHttpClient.CRLF + CONTENT }); +client.connect(); +client.processRequest(true); +Assert.assertEquals(HttpServletResponse.SC_CREATED, client.getStatusCode()); + +client.setRequest(new String[] { "PUT /file2.txt HTTP/1.1" + SimpleHttpClient.CRLF + +"Host: localhost:" + getPort() + SimpleHttpClient.CRLF + +"Content-Length: 12" + SimpleHttpClient.CRLF + +"Connection: Close" + SimpleHttpClient.CRLF + +SimpleHttpClient.CRLF + CONTENT + CONTENT }); +client.connect(); +client.processRequest(true); +Assert.assertEquals(HttpServletResponse.SC_CREATED, client.getStatusCode()); + +client.setRequest(new String[] { "MKCOL /myfolder HTTP/1.1" + SimpleHttpClient.CRLF + +"Host: localhost:" + getPort() + SimpleHttpClient.CRLF + +"Connection: Close" + SimpleHttpClient.CRLF + +SimpleHttpClient.CRLF }); +client.connect(); +client.processRequest(true); +Assert.assertEquals(HttpServletResponse.SC_CREATED, client.getStatusCode()); + +client.setRequest(new String[] { "PUT /myfolder/file3.txt HTTP/1.1" + SimpleHttpClient.CRLF + +"Host: localhost:" + getPort() + SimpleHttpClient.CRLF + +"Content-Length: 6" + SimpleHttpClient.CRLF + +"Connection: Close" + SimpleHttpClient.CRLF + +SimpleHttpClient.CRLF + CONTENT }); +client.connect(); +client.processRequest(true); +Assert.assertEquals(HttpServletResponse.SC_CREATED, client.getStatusCode()); + +// Verify that listing the file works +client.setRequest(new String[] { "PROPFIND / HTTP/1.1" + SimpleHttpClient.CRLF + +"Host: localhost:" + getPort() + SimpleHttpClient.CRLF + +"Connection: Close" + SimpleHttpClient.CRLF + +SimpleHttpClient.CRLF }); +client.connect(); +client.processRequest(true); + Assert.assertTrue(client.getResponseBody().contains("12<")); + +// Lock /myfolder +client.setRequest(new String[] { "LOCK /myfolder HTTP/1.1" + SimpleHttpClient.CRLF + +"Host: localhost:" + getPort() + SimpleHttpClient.CRLF + +"Content-Length: " + LOCK_BODY.length() + SimpleHttpClient.CRLF + +"Connection: Close" + SimpleHttpClient.CRLF + +SimpleHttpClient.CRLF + LOCK_BODY }); +client.connect
(tomcat) branch 11.0.x updated: Update Byte Buddy to 1.15.4
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 11.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/11.0.x by this push: new 5b0fbfbe68 Update Byte Buddy to 1.15.4 5b0fbfbe68 is described below commit 5b0fbfbe6849dd9f43601adaf1f5433d24c933d6 Author: remm AuthorDate: Mon Oct 14 14:24:09 2024 +0200 Update Byte Buddy to 1.15.4 --- build.properties.default | 4 ++-- webapps/docs/changelog.xml | 7 +++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/build.properties.default b/build.properties.default index afb143607a..0aae5aba4a 100644 --- a/build.properties.default +++ b/build.properties.default @@ -242,10 +242,10 @@ objenesis.jar=${objenesis.home}/objenesis-${objenesis.version}.jar objenesis.loc=${base-maven.loc}/org/objenesis/objenesis/${objenesis.version}/objenesis-${objenesis.version}.jar # - byte-buddy, used by EasyMock, version 1.12.18 or later - -bytebuddy.version=1.15.3 +bytebuddy.version=1.15.4 bytebuddy.checksum.enabled=true bytebuddy.checksum.algorithm=MD5|SHA-1 -bytebuddy.checksum.value=3406712dd496bcda0136945c6e77711c|01b3069696cd9ed55d90b9114ffe3429035ff924 +bytebuddy.checksum.value=eee284717781f391c48e7c87644480a4|e8bd42992701720649765383ff570f415190b83f bytebuddy.home=${base.path}/byte-buddy-${bytebuddy.version} bytebuddy.jar=${bytebuddy.home}/byte-buddy-${bytebuddy.version}.jar bytebuddy.loc=${base-maven.loc}/net/bytebuddy/byte-buddy/${bytebuddy.version}/byte-buddy-${bytebuddy.version}.jar diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 6775c825a7..d607072c88 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -162,6 +162,13 @@ + + + +Update Byte Buddy to 1.15.4. (remm) + + + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 69381] Excess object copying while evaluating reflective method calls
https://bz.apache.org/bugzilla/show_bug.cgi?id=69381 John Engebretson changed: What|Removed |Added OS||All --- Comment #2 from John Engebretson --- Adding details and speed test: 1. The speed test is attached, based on TestELParserPerformance 2. The test is most consistent when run with "-Xmx3g -XX:+UseParallelGC". I'm finding this to be good when the test generates high object allocation. Typical result from current state: ${beanA.name} duration=[348ms] or 348 ns each ${beanA.getName()} duration=[1421ms] or 1421 ns each ${beanB.getName()} duration=[2023ms] or 2023 ns each Then change Util.findMethod() along these lines: private static final Map, Method[]> methodsByClass = new ConcurrentHashMap<>(); Method[] methods = methodsByClass.computeIfAbsent(clazz, (key) -> clazz.getMethods()); //Method[] methods = clazz.getMethods(); and we get: ${beanA.name} duration=[351ms] or 351 ns each ${beanA.getName()} duration=[809ms] or 809 ns each ${beanB.getName()} duration=[862ms] or 862 ns each What we see: 1. The non-reflective call is unaffected. Repeated runs show small variation up or down. 2. The reflective call with five properties (beanA) is 44% faster 3. The reflective call with ten properties (beanB) is 55% faster FWIW I found some complex generated beans involved with over 40 properties. Fortunately those are rare, but it illustrates that the higher method counts are a real problem. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 69381] Excess object copying while evaluating reflective method calls
https://bz.apache.org/bugzilla/show_bug.cgi?id=69381 --- Comment #1 from John Engebretson --- Created attachment 39906 --> https://bz.apache.org/bugzilla/attachment.cgi?id=39906&action=edit Speed test -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: (tomcat) branch main updated: Update Byte Buddy to 1.15.4
On Mon, Oct 14, 2024 at 2:24 PM wrote: > > 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 e1bde0ce28 Update Byte Buddy to 1.15.4 > e1bde0ce28 is described below > > commit e1bde0ce28b7501cf5ecdca7ddaf6b0dcc2e3a14 > Author: remm > AuthorDate: Mon Oct 14 14:24:09 2024 +0200 > > Update Byte Buddy to 1.15.4 Updated to see if this one fixed the Java 24 compat, and it looks like it does. Rémy > --- > build.properties.default | 4 ++-- > webapps/docs/changelog.xml | 3 +++ > 2 files changed, 5 insertions(+), 2 deletions(-) > > diff --git a/build.properties.default b/build.properties.default > index b3f2c7365a..89203c04b2 100644 > --- a/build.properties.default > +++ b/build.properties.default > @@ -242,10 +242,10 @@ > objenesis.jar=${objenesis.home}/objenesis-${objenesis.version}.jar > > objenesis.loc=${base-maven.loc}/org/objenesis/objenesis/${objenesis.version}/objenesis-${objenesis.version}.jar > > # - byte-buddy, used by EasyMock, version 1.12.18 or later - > -bytebuddy.version=1.15.3 > +bytebuddy.version=1.15.4 > bytebuddy.checksum.enabled=true > bytebuddy.checksum.algorithm=MD5|SHA-1 > -bytebuddy.checksum.value=3406712dd496bcda0136945c6e77711c|01b3069696cd9ed55d90b9114ffe3429035ff924 > +bytebuddy.checksum.value=eee284717781f391c48e7c87644480a4|e8bd42992701720649765383ff570f415190b83f > bytebuddy.home=${base.path}/byte-buddy-${bytebuddy.version} > bytebuddy.jar=${bytebuddy.home}/byte-buddy-${bytebuddy.version}.jar > > bytebuddy.loc=${base-maven.loc}/net/bytebuddy/byte-buddy/${bytebuddy.version}/byte-buddy-${bytebuddy.version}.jar > diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml > index 41f100d5f2..701e6ca8d3 100644 > --- a/webapps/docs/changelog.xml > +++ b/webapps/docs/changelog.xml > @@ -213,6 +213,9 @@ > Update Derby to 10.17.1.0. (markt) > > > + > +Update Byte Buddy to 1.15.4. (remm) > + > > > > > > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch main updated: Ignore Java 24 client IOE occurring on file delete with sendfile
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 a5968ddac9 Ignore Java 24 client IOE occurring on file delete with sendfile a5968ddac9 is described below commit a5968ddac9f51f2f0c233fa1c508930b404a68f7 Author: remm AuthorDate: Mon Oct 14 15:34:30 2024 +0200 Ignore Java 24 client IOE occurring on file delete with sendfile --- test/org/apache/catalina/connector/TestSendFile.java | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/test/org/apache/catalina/connector/TestSendFile.java b/test/org/apache/catalina/connector/TestSendFile.java index ead45b43da..098ff0aa53 100644 --- a/test/org/apache/catalina/connector/TestSendFile.java +++ b/test/org/apache/catalina/connector/TestSendFile.java @@ -163,8 +163,13 @@ public class TestSendFile extends TomcatBaseTest { tomcat.start(); ByteChunk bc = new ByteChunk(); -getUrl("http://localhost:"; + getPort() + "/test/?" + Globals.SENDFILE_SUPPORTED_ATTR -+ "=true", bc, null); +try { +getUrl("http://localhost:"; + getPort() + "/test/?" + Globals.SENDFILE_SUPPORTED_ATTR ++ "=true", bc, null); +} catch (IOException e) { +// Ignore possible IOE due to file delete on the server +System.out.println("Ignored: " + e.getMessage()); +} CountDownLatch latch = new CountDownLatch(2); List throwables = new CopyOnWriteArrayList<>(); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 11.0.x updated: Ignore Java 24 client IOE occurring on file delete with sendfile
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 11.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/11.0.x by this push: new 8c1fd79fe7 Ignore Java 24 client IOE occurring on file delete with sendfile 8c1fd79fe7 is described below commit 8c1fd79fe732983276f6121d5aca880f19581d12 Author: remm AuthorDate: Mon Oct 14 15:34:30 2024 +0200 Ignore Java 24 client IOE occurring on file delete with sendfile --- test/org/apache/catalina/connector/TestSendFile.java | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/test/org/apache/catalina/connector/TestSendFile.java b/test/org/apache/catalina/connector/TestSendFile.java index ead45b43da..098ff0aa53 100644 --- a/test/org/apache/catalina/connector/TestSendFile.java +++ b/test/org/apache/catalina/connector/TestSendFile.java @@ -163,8 +163,13 @@ public class TestSendFile extends TomcatBaseTest { tomcat.start(); ByteChunk bc = new ByteChunk(); -getUrl("http://localhost:"; + getPort() + "/test/?" + Globals.SENDFILE_SUPPORTED_ATTR -+ "=true", bc, null); +try { +getUrl("http://localhost:"; + getPort() + "/test/?" + Globals.SENDFILE_SUPPORTED_ATTR ++ "=true", bc, null); +} catch (IOException e) { +// Ignore possible IOE due to file delete on the server +System.out.println("Ignored: " + e.getMessage()); +} CountDownLatch latch = new CountDownLatch(2); List throwables = new CopyOnWriteArrayList<>(); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 10.1.x updated: Ignore Java 24 client IOE occurring on file delete with sendfile
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/10.1.x by this push: new 2c35215531 Ignore Java 24 client IOE occurring on file delete with sendfile 2c35215531 is described below commit 2c35215531746981b828236d12053246bcd7abb0 Author: remm AuthorDate: Mon Oct 14 15:34:30 2024 +0200 Ignore Java 24 client IOE occurring on file delete with sendfile --- test/org/apache/catalina/connector/TestSendFile.java | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/test/org/apache/catalina/connector/TestSendFile.java b/test/org/apache/catalina/connector/TestSendFile.java index ead45b43da..098ff0aa53 100644 --- a/test/org/apache/catalina/connector/TestSendFile.java +++ b/test/org/apache/catalina/connector/TestSendFile.java @@ -163,8 +163,13 @@ public class TestSendFile extends TomcatBaseTest { tomcat.start(); ByteChunk bc = new ByteChunk(); -getUrl("http://localhost:"; + getPort() + "/test/?" + Globals.SENDFILE_SUPPORTED_ATTR -+ "=true", bc, null); +try { +getUrl("http://localhost:"; + getPort() + "/test/?" + Globals.SENDFILE_SUPPORTED_ATTR ++ "=true", bc, null); +} catch (IOException e) { +// Ignore possible IOE due to file delete on the server +System.out.println("Ignored: " + e.getMessage()); +} CountDownLatch latch = new CountDownLatch(2); List throwables = new CopyOnWriteArrayList<>(); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 69381] Excess object copying while evaluating reflective method calls
https://bz.apache.org/bugzilla/show_bug.cgi?id=69381 --- Comment #3 from John Engebretson --- Created attachment 39907 --> https://bz.apache.org/bugzilla/attachment.cgi?id=39907&action=edit Speed test v2 Attaching latest version of speed test -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch main updated: Update Byte Buddy to 1.15.4
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 e1bde0ce28 Update Byte Buddy to 1.15.4 e1bde0ce28 is described below commit e1bde0ce28b7501cf5ecdca7ddaf6b0dcc2e3a14 Author: remm AuthorDate: Mon Oct 14 14:24:09 2024 +0200 Update Byte Buddy to 1.15.4 --- build.properties.default | 4 ++-- webapps/docs/changelog.xml | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/build.properties.default b/build.properties.default index b3f2c7365a..89203c04b2 100644 --- a/build.properties.default +++ b/build.properties.default @@ -242,10 +242,10 @@ objenesis.jar=${objenesis.home}/objenesis-${objenesis.version}.jar objenesis.loc=${base-maven.loc}/org/objenesis/objenesis/${objenesis.version}/objenesis-${objenesis.version}.jar # - byte-buddy, used by EasyMock, version 1.12.18 or later - -bytebuddy.version=1.15.3 +bytebuddy.version=1.15.4 bytebuddy.checksum.enabled=true bytebuddy.checksum.algorithm=MD5|SHA-1 -bytebuddy.checksum.value=3406712dd496bcda0136945c6e77711c|01b3069696cd9ed55d90b9114ffe3429035ff924 +bytebuddy.checksum.value=eee284717781f391c48e7c87644480a4|e8bd42992701720649765383ff570f415190b83f bytebuddy.home=${base.path}/byte-buddy-${bytebuddy.version} bytebuddy.jar=${bytebuddy.home}/byte-buddy-${bytebuddy.version}.jar bytebuddy.loc=${base-maven.loc}/net/bytebuddy/byte-buddy/${bytebuddy.version}/byte-buddy-${bytebuddy.version}.jar diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 41f100d5f2..701e6ca8d3 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -213,6 +213,9 @@ Update Derby to 10.17.1.0. (markt) + +Update Byte Buddy to 1.15.4. (remm) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 9.0.x updated: Update Byte Buddy to 1.15.4
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/9.0.x by this push: new 0edf59a99e Update Byte Buddy to 1.15.4 0edf59a99e is described below commit 0edf59a99ed616b6b42f5c3f2b1dacb97fd9f026 Author: remm AuthorDate: Mon Oct 14 14:24:09 2024 +0200 Update Byte Buddy to 1.15.4 --- build.properties.default | 4 ++-- webapps/docs/changelog.xml | 7 +++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/build.properties.default b/build.properties.default index df2e7e71dd..33ae8d3f11 100644 --- a/build.properties.default +++ b/build.properties.default @@ -265,10 +265,10 @@ objenesis.jar=${objenesis.home}/objenesis-${objenesis.version}.jar objenesis.loc=${base-maven.loc}/org/objenesis/objenesis/${objenesis.version}/objenesis-${objenesis.version}.jar # - byte-buddy, used by EasyMock, version 1.12.18 or later - -bytebuddy.version=1.15.3 +bytebuddy.version=1.15.4 bytebuddy.checksum.enabled=true bytebuddy.checksum.algorithm=MD5|SHA-1 -bytebuddy.checksum.value=3406712dd496bcda0136945c6e77711c|01b3069696cd9ed55d90b9114ffe3429035ff924 +bytebuddy.checksum.value=eee284717781f391c48e7c87644480a4|e8bd42992701720649765383ff570f415190b83f bytebuddy.home=${base.path}/byte-buddy-${bytebuddy.version} bytebuddy.jar=${bytebuddy.home}/byte-buddy-${bytebuddy.version}.jar bytebuddy.loc=${base-maven.loc}/net/bytebuddy/byte-buddy/${bytebuddy.version}/byte-buddy-${bytebuddy.version}.jar diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index a8046a668e..cd6493fcd1 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -166,6 +166,13 @@ + + + +Update Byte Buddy to 1.15.4. (remm) + + + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 10.1.x updated: Update Byte Buddy to 1.15.4
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/10.1.x by this push: new 1cb1a23184 Update Byte Buddy to 1.15.4 1cb1a23184 is described below commit 1cb1a231845f346083722b70a1afdbe6a4636758 Author: remm AuthorDate: Mon Oct 14 14:24:09 2024 +0200 Update Byte Buddy to 1.15.4 --- build.properties.default | 4 ++-- webapps/docs/changelog.xml | 7 +++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/build.properties.default b/build.properties.default index 5422c489e3..152118a787 100644 --- a/build.properties.default +++ b/build.properties.default @@ -263,10 +263,10 @@ objenesis.jar=${objenesis.home}/objenesis-${objenesis.version}.jar objenesis.loc=${base-maven.loc}/org/objenesis/objenesis/${objenesis.version}/objenesis-${objenesis.version}.jar # - byte-buddy, used by EasyMock, version 1.12.18 or later - -bytebuddy.version=1.15.3 +bytebuddy.version=1.15.4 bytebuddy.checksum.enabled=true bytebuddy.checksum.algorithm=MD5|SHA-1 -bytebuddy.checksum.value=3406712dd496bcda0136945c6e77711c|01b3069696cd9ed55d90b9114ffe3429035ff924 +bytebuddy.checksum.value=eee284717781f391c48e7c87644480a4|e8bd42992701720649765383ff570f415190b83f bytebuddy.home=${base.path}/byte-buddy-${bytebuddy.version} bytebuddy.jar=${bytebuddy.home}/byte-buddy-${bytebuddy.version}.jar bytebuddy.loc=${base-maven.loc}/net/bytebuddy/byte-buddy/${bytebuddy.version}/byte-buddy-${bytebuddy.version}.jar diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index c29f997648..5cbafad3d2 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -166,6 +166,13 @@ + + + +Update Byte Buddy to 1.15.4. (remm) + + + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 9.0.x updated: Ignore Java 24 client IOE occurring on file delete with sendfile
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/9.0.x by this push: new ba169f5b19 Ignore Java 24 client IOE occurring on file delete with sendfile ba169f5b19 is described below commit ba169f5b19237965ab188dc871e07088be4819c1 Author: remm AuthorDate: Mon Oct 14 15:34:30 2024 +0200 Ignore Java 24 client IOE occurring on file delete with sendfile --- test/org/apache/catalina/connector/TestSendFile.java | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/test/org/apache/catalina/connector/TestSendFile.java b/test/org/apache/catalina/connector/TestSendFile.java index 45a7da9e8a..88e3f8cf32 100644 --- a/test/org/apache/catalina/connector/TestSendFile.java +++ b/test/org/apache/catalina/connector/TestSendFile.java @@ -163,8 +163,13 @@ public class TestSendFile extends TomcatBaseTest { tomcat.start(); ByteChunk bc = new ByteChunk(); -getUrl("http://localhost:"; + getPort() + "/test/?" + Globals.SENDFILE_SUPPORTED_ATTR -+ "=true", bc, null); +try { +getUrl("http://localhost:"; + getPort() + "/test/?" + Globals.SENDFILE_SUPPORTED_ATTR ++ "=true", bc, null); +} catch (IOException e) { +// Ignore possible IOE due to file delete on the server +System.out.println("Ignored: " + e.getMessage()); +} CountDownLatch latch = new CountDownLatch(2); List throwables = new CopyOnWriteArrayList<>(); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org