tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1402349 - in /tomcat/tc7.0.x/trunk: ./ test/org/apache/jasper/compiler/TestCompiler.java test/webapp-3.0/bug53257/foo bar.jsp test/webapp-3.0/bug53257/foo bar.txt test/webapp-3.0/bug53257/foo bar/ test/webapp-3.0/bug53257/index.jsp
Date Thu, 25 Oct 2012 22:41:04 GMT
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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message