Author: markt
Date: Thu Oct 25 22:41:03 2012
New Revision: 1402349

URL: http://svn.apache.org/viewvc?rev=1402349&view=rev
Log:
Expand test cases to cover BZ54025

Added:
    tomcat/tc7.0.x/trunk/test/webapp-3.0/bug53257/foo bar/
      - copied from r1402348, tomcat/trunk/test/webapp-3.0/bug53257/foo bar/
    tomcat/tc7.0.x/trunk/test/webapp-3.0/bug53257/foo bar.jsp
      - copied unchanged from r1402348, 
tomcat/trunk/test/webapp-3.0/bug53257/foo bar.jsp
    tomcat/tc7.0.x/trunk/test/webapp-3.0/bug53257/foo bar.txt
      - copied unchanged from r1402348, 
tomcat/trunk/test/webapp-3.0/bug53257/foo bar.txt
Modified:
    tomcat/tc7.0.x/trunk/   (props changed)
    tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestCompiler.java
    tomcat/tc7.0.x/trunk/test/webapp-3.0/bug53257/index.jsp

Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
  Merged /tomcat/trunk:r1402348

Modified: tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestCompiler.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestCompiler.java?rev=1402349&r1=1402348&r2=1402349&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestCompiler.java 
(original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestCompiler.java Thu 
Oct 25 22:41:03 2012
@@ -168,6 +168,38 @@ public class TestCompiler extends Tomcat
         tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
         tomcat.start();
 
+        ByteChunk res = getUrl("http://localhost:"; + getPort() +
+                "/test/bug53257/foo%20bar.jsp");
+
+        // Check request completed
+        String result = res.toString();
+        assertEcho(result, "OK");
+    }
+
+    @Test
+    public void testBug53257g() throws Exception {
+        Tomcat tomcat = getTomcatInstance();
+
+        File appDir = new File("test/webapp-3.0");
+        tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
+        tomcat.start();
+
+        ByteChunk res = getUrl("http://localhost:"; + getPort() +
+                "/test/bug53257/foo%20bar/foobar.jsp");
+
+        // Check request completed
+        String result = res.toString();
+        assertEcho(result, "OK");
+    }
+
+    @Test
+    public void testBug53257z() throws Exception {
+        Tomcat tomcat = getTomcatInstance();
+
+        File appDir = new File("test/webapp-3.0");
+        tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
+        tomcat.start();
+
         // Check that URL decoding is not done twice
         ByteChunk res = new ByteChunk();
         int rc = getUrl("http://localhost:"; + getPort() +

Modified: tomcat/tc7.0.x/trunk/test/webapp-3.0/bug53257/index.jsp
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/webapp-3.0/bug53257/index.jsp?rev=1402349&r1=1402348&r2=1402349&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/webapp-3.0/bug53257/index.jsp (original)
+++ tomcat/tc7.0.x/trunk/test/webapp-3.0/bug53257/index.jsp Thu Oct 25 22:41:03 
2012
@@ -17,7 +17,8 @@
 <%@page contentType="text/plain; charset=UTF-8"
 %><%@page import="java.net.URL,java.net.URLConnection"%><%
     String[] testFiles = new String[] {"foo;bar.txt", "foo&bar.txt",
-            "foo#bar.txt", "foo%bar.txt", "foo+bar.txt"};
+            "foo#bar.txt", "foo%bar.txt", "foo+bar.txt", "foo bar.txt",
+            "foo bar/foobar.txt"};
     for (String testFile : testFiles) {
         URL url = application.getResource("/bug53257/" + testFile);
         if (url == null) {



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

Reply via email to