Author: kkolinko
Date: Fri Jun 1 18:02:56 2012
New Revision: 1345290
URL: http://svn.apache.org/viewvc?rev=1345290&view=rev
Log:
One more test, to be sure
https://issues.apache.org/bugzilla/show_bug.cgi?id=53257
Modified:
tomcat/trunk/test/org/apache/jasper/compiler/TestCompiler.java
Modified: tomcat/trunk/test/org/apache/jasper/compiler/TestCompiler.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/jasper/compiler/TestCompiler.java?rev=1345290&r1=1345289&r2=1345290&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/jasper/compiler/TestCompiler.java (original)
+++ tomcat/trunk/test/org/apache/jasper/compiler/TestCompiler.java Fri Jun 1
18:02:56 2012
@@ -22,6 +22,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
@@ -84,6 +85,7 @@ public class TestCompiler extends Tomcat
tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
tomcat.start();
+ // foo;bar.jsp
ByteChunk res = getUrl("http://localhost:" + getPort() +
"/test/bug53257/foo%3bbar.jsp");
@@ -116,6 +118,7 @@ public class TestCompiler extends Tomcat
tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
tomcat.start();
+ // foo#bar.jsp
ByteChunk res = getUrl("http://localhost:" + getPort() +
"/test/bug53257/foo%23bar.jsp");
@@ -132,6 +135,7 @@ public class TestCompiler extends Tomcat
tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
tomcat.start();
+ // foo%bar.jsp
ByteChunk res = getUrl("http://localhost:" + getPort() +
"/test/bug53257/foo%25bar.jsp");
@@ -157,6 +161,21 @@ public class TestCompiler extends Tomcat
}
@Test
+ public void testBug53257f() 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() +
+ "/test/bug53257/foo%2525bar.jsp", res, null);
+ assertEquals(404, rc);
+ }
+
+ @Test
public void testBug51584() throws Exception {
Tomcat tomcat = getTomcatInstance();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]