Author: markt
Date: Thu Oct 25 22:38:36 2012
New Revision: 1402348
URL: http://svn.apache.org/viewvc?rev=1402348&view=rev
Log:
Expand test cases to cover BZ54025
Added:
tomcat/trunk/test/webapp-3.0/bug53257/foo bar/
tomcat/trunk/test/webapp-3.0/bug53257/foo bar.jsp (with props)
tomcat/trunk/test/webapp-3.0/bug53257/foo bar.txt (with props)
tomcat/trunk/test/webapp-3.0/bug53257/foo bar/foobar.jsp (with props)
tomcat/trunk/test/webapp-3.0/bug53257/foo bar/foobar.txt (with props)
Modified:
tomcat/trunk/test/org/apache/jasper/compiler/TestCompiler.java
tomcat/trunk/test/webapp-3.0/bug53257/index.jsp
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=1402348&r1=1402347&r2=1402348&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/jasper/compiler/TestCompiler.java (original)
+++ tomcat/trunk/test/org/apache/jasper/compiler/TestCompiler.java Thu Oct 25
22:38:36 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() +
Added: tomcat/trunk/test/webapp-3.0/bug53257/foo bar.jsp
URL:
http://svn.apache.org/viewvc/tomcat/trunk/test/webapp-3.0/bug53257/foo%20bar.jsp?rev=1402348&view=auto
==============================================================================
--- tomcat/trunk/test/webapp-3.0/bug53257/foo bar.jsp (added)
+++ tomcat/trunk/test/webapp-3.0/bug53257/foo bar.jsp Thu Oct 25 22:38:36 2012
@@ -0,0 +1,21 @@
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+--%>
+<html>
+ <body>
+ <p>OK</p>
+ </body>
+</html>
\ No newline at end of file
Propchange: tomcat/trunk/test/webapp-3.0/bug53257/foo bar.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Added: tomcat/trunk/test/webapp-3.0/bug53257/foo bar.txt
URL:
http://svn.apache.org/viewvc/tomcat/trunk/test/webapp-3.0/bug53257/foo%20bar.txt?rev=1402348&view=auto
==============================================================================
--- tomcat/trunk/test/webapp-3.0/bug53257/foo bar.txt (added)
+++ tomcat/trunk/test/webapp-3.0/bug53257/foo bar.txt Thu Oct 25 22:38:36 2012
@@ -0,0 +1 @@
+OK
\ No newline at end of file
Propchange: tomcat/trunk/test/webapp-3.0/bug53257/foo bar.txt
------------------------------------------------------------------------------
svn:eol-style = native
Added: tomcat/trunk/test/webapp-3.0/bug53257/foo bar/foobar.jsp
URL:
http://svn.apache.org/viewvc/tomcat/trunk/test/webapp-3.0/bug53257/foo%20bar/foobar.jsp?rev=1402348&view=auto
==============================================================================
--- tomcat/trunk/test/webapp-3.0/bug53257/foo bar/foobar.jsp (added)
+++ tomcat/trunk/test/webapp-3.0/bug53257/foo bar/foobar.jsp Thu Oct 25
22:38:36 2012
@@ -0,0 +1,21 @@
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+--%>
+<html>
+ <body>
+ <p>OK</p>
+ </body>
+</html>
\ No newline at end of file
Propchange: tomcat/trunk/test/webapp-3.0/bug53257/foo bar/foobar.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Added: tomcat/trunk/test/webapp-3.0/bug53257/foo bar/foobar.txt
URL:
http://svn.apache.org/viewvc/tomcat/trunk/test/webapp-3.0/bug53257/foo%20bar/foobar.txt?rev=1402348&view=auto
==============================================================================
--- tomcat/trunk/test/webapp-3.0/bug53257/foo bar/foobar.txt (added)
+++ tomcat/trunk/test/webapp-3.0/bug53257/foo bar/foobar.txt Thu Oct 25
22:38:36 2012
@@ -0,0 +1 @@
+OK
\ No newline at end of file
Propchange: tomcat/trunk/test/webapp-3.0/bug53257/foo bar/foobar.txt
------------------------------------------------------------------------------
svn:eol-style = native
Modified: tomcat/trunk/test/webapp-3.0/bug53257/index.jsp
URL:
http://svn.apache.org/viewvc/tomcat/trunk/test/webapp-3.0/bug53257/index.jsp?rev=1402348&r1=1402347&r2=1402348&view=diff
==============================================================================
--- tomcat/trunk/test/webapp-3.0/bug53257/index.jsp (original)
+++ tomcat/trunk/test/webapp-3.0/bug53257/index.jsp Thu Oct 25 22:38:36 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: [email protected]
For additional commands, e-mail: [email protected]