tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kkoli...@apache.org
Subject svn commit: r1345311 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/core/ContainerBase.java test/org/apache/jasper/compiler/TestCompiler.java
Date Fri, 01 Jun 2012 18:35:34 GMT
Author: kkolinko
Date: Fri Jun  1 18:35:34 2012
New Revision: 1345311

URL: http://svn.apache.org/viewvc?rev=1345311&view=rev
Log:
Merged revisions r1345287 r1345290 from tomcat/trunk:
Remove trailing whitespace from ContainerBase.java
Add one more test for
https://issues.apache.org/bugzilla/show_bug.cgi?id=53257

Modified:
    tomcat/tc7.0.x/trunk/   (props changed)
    tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ContainerBase.java
    tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestCompiler.java

Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
  Merged /tomcat/trunk:r1345287-1345290

Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ContainerBase.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ContainerBase.java?rev=1345311&r1=1345310&r2=1345311&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ContainerBase.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ContainerBase.java Fri Jun  1 18:35:34
2012
@@ -1592,13 +1592,13 @@ public abstract class ContainerBase exte
         private ThreadGroup group;
         private AtomicInteger threadNumber = new AtomicInteger(1);
         private String namePrefix;
-        
+
         public StartStopThreadFactory(String namePrefix) {
             SecurityManager s = System.getSecurityManager();
             group = (s != null) ? s.getThreadGroup() : Thread.currentThread().getThreadGroup();
             this.namePrefix = namePrefix;
         }
-        
+
         @Override
         public Thread newThread(Runnable r) {
             Thread thread = new Thread(group, r, namePrefix + threadNumber.getAndIncrement());

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=1345311&r1=1345310&r2=1345311&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 Fri Jun  1 18:35:34
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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message