You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2022/11/16 14:42:13 UTC

[tomcat] branch main updated: URL wasn't valid (un-encoded spaces). URL class was tolerant. URI is not

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 2df8bdc5b1 URL wasn't valid (un-encoded spaces). URL class was tolerant. URI is not
2df8bdc5b1 is described below

commit 2df8bdc5b1002c5857cc1f8afdff7a39ed1a2ff9
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Nov 16 14:41:49 2022 +0000

    URL wasn't valid (un-encoded spaces). URL class was tolerant. URI is not
---
 test/org/apache/catalina/ant/TestDeployTask.java | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/test/org/apache/catalina/ant/TestDeployTask.java b/test/org/apache/catalina/ant/TestDeployTask.java
index 8fc3ed2daf..0441d01284 100644
--- a/test/org/apache/catalina/ant/TestDeployTask.java
+++ b/test/org/apache/catalina/ant/TestDeployTask.java
@@ -52,7 +52,6 @@ public class TestDeployTask extends TomcatBaseTest {
         testExecute(deployTask, new File("test/deployment/context.war").toURI().toString());
         testExecute(deployTask, new File("test/deployment/context.war").getAbsolutePath());
         testExecute(deployTask, "jar:" + new File("test/deployment/context.jar").toURI().toString() + "!/context.war");
-        testExecute(deployTask, "file:./test/deployment/dir with spaces/context.war");
         testExecute(deployTask, new File("test/deployment/dir with spaces/context.war").toURI().toString());
         testExecute(deployTask, new File("test/deployment/dir with spaces/context.war").getAbsolutePath());
         testExecute(deployTask, "jar:" + new File("test/deployment/dir with spaces/context.jar").toURI().toString()
@@ -74,8 +73,16 @@ public class TestDeployTask extends TomcatBaseTest {
         testExecute(deployTask, "sc:./test/deployment/context.war");
     }
 
+    @Test(expected = BuildException.class)
+    public void bug58086d() {
+        DeployTask deployTask = new DeployTask();
+        setDefaults(deployTask);
+        testExecute(deployTask, "file:./test/deployment/dir with spaces/context.war");
+    }
+
+
     @Test
-    public void bug58086d() throws Exception {
+    public void bug58086e() throws Exception {
         Tomcat tomcat = getTomcatInstance();
 
         File root = new File("test/deployment");


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