Author: markt
Date: Fri Jun 19 12:16:25 2009
New Revision: 786473

URL: http://svn.apache.org/viewvc?rev=786473&view=rev
Log:
Undo accidental commit of files that should not have been included in r786471. 
These will follow separately with the correct comments. Sorry for the noise.

Modified:
    tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java
    tomcat/trunk/java/org/apache/jasper/compiler/JspRuntimeContext.java
    tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java

Modified: tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java?rev=786473&r1=786472&r2=786473&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java (original)
+++ tomcat/trunk/java/org/apache/catalina/valves/AccessLogValve.java Fri Jun 19 
12:16:25 2009
@@ -690,12 +690,10 @@
         }
 
         // Log this message
-        synchronized(this) {
-            if (writer != null) {
-                writer.println(message);
-                if (!buffered) {
-                    writer.flush();
-                }
+        if (writer != null) {
+            writer.println(message);
+            if (!buffered) {
+                writer.flush();
             }
         }
 

Modified: tomcat/trunk/java/org/apache/jasper/compiler/JspRuntimeContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/JspRuntimeContext.java?rev=786473&r1=786472&r2=786473&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/compiler/JspRuntimeContext.java 
(original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/JspRuntimeContext.java Fri Jun 
19 12:16:25 2009
@@ -394,19 +394,16 @@
                 docBase = docBase + "-";
                 permissionCollection.add(new FilePermission(docBase,"read"));
 
-                // Spec says apps should have read/write for their temp
-                // directory. This is fine, as no security sensitive files, at
-                // least any that the app doesn't have full control of anyway,
-                // will be written here.
+                // Create a file read permission for web app tempdir (work)
+                // directory
                 String workDir = options.getScratchDir().toString();
                 if (!workDir.endsWith(File.separator)){
                     permissionCollection.add
-                        (new FilePermission(workDir,"read,write"));
+                        (new FilePermission(workDir,"read"));
                     workDir = workDir + File.separator;
                 }
                 workDir = workDir + "-";
-                permissionCollection.add(new FilePermission(
-                        workDir,"read,write,delete"));
+                permissionCollection.add(new FilePermission(workDir,"read"));
 
                 // Allow the JSP to access 
org.apache.jasper.runtime.HttpJspBase
                 permissionCollection.add( new RuntimePermission(

Modified: tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java?rev=786473&r1=786472&r2=786473&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java (original)
+++ tomcat/trunk/test/org/apache/catalina/connector/TestRequest.java Fri Jun 19 
12:16:25 2009
@@ -56,41 +56,35 @@
         Bug37794Client client = new Bug37794Client();
 
         // Edge cases around zero
-        client.doRequest(-1, false); // Unlimited
+        client.doRequest(-1); // Unlimited
         assertTrue(client.isResponse200());
         assertTrue(client.isResponseBodyOK());
         client.reset();
-        client.doRequest(0, false); // Unlimited
+        client.doRequest(0); // Unlimited
         assertTrue(client.isResponse200());
         assertTrue(client.isResponseBodyOK());
         client.reset();
-        client.doRequest(1, false); // 1 byte - too small should fail
+        client.doRequest(1); // 1 byte - too small should fail
         assertTrue(client.isResponse500());
         
         client.reset();
         
         // Edge cases around actual content length
         client.reset();
-        client.doRequest(6, false); // Too small should fail
+        client.doRequest(6); // Too small should fail
         assertTrue(client.isResponse500());
         client.reset();
-        client.doRequest(7, false); // Just enough should pass
+        client.doRequest(7); // Just enough should pass
         assertTrue(client.isResponse200());
         assertTrue(client.isResponseBodyOK());
         client.reset();
-        client.doRequest(8, false); // 1 extra - should pass
+        client.doRequest(8); // 1 extra - should pass
         assertTrue(client.isResponse200());
         assertTrue(client.isResponseBodyOK());
         
         // Much larger
         client.reset();
-        client.doRequest(8096, false); // Plenty of space - should pass
-        assertTrue(client.isResponse200());
-        assertTrue(client.isResponseBodyOK());
-
-        // Check for case insensitivity
-        client.reset();
-        client.doRequest(8096, true); // Plenty of space - should pass
+        client.doRequest(8096); // Plenty of space - should pass
         assertTrue(client.isResponse200());
         assertTrue(client.isResponseBodyOK());
     }
@@ -121,7 +115,7 @@
      * Bug 37794 test client.
      */
     private static class Bug37794Client extends SimpleHttpClient {
-        private Exception doRequest(int postLimit, boolean ucChunkedHead) {
+        private Exception doRequest(int postLimit) {
             Tomcat tomcat = new Tomcat();
             try {
                 StandardContext root = tomcat.addContext("", TEMP_DIR);
@@ -135,25 +129,14 @@
                 
                 // Send request in two parts
                 String[] request = new String[2];
-                if (ucChunkedHead) {
-                    request[0] =
-                        "POST http://localhost:8080/test HTTP/1.1" + CRLF +
-                        "content-type: application/x-www-form-urlencoded" + 
CRLF +
-                        "Transfer-Encoding: CHUNKED" + CRLF +
-                        "Connection: close" + CRLF +
-                        CRLF +
-                        "3" + CRLF +
-                        "a=1" + CRLF;
-                } else {
-                    request[0] =
-                        "POST http://localhost:8080/test HTTP/1.1" + CRLF +
-                        "content-type: application/x-www-form-urlencoded" + 
CRLF +
-                        "Transfer-Encoding: chunked" + CRLF +
-                        "Connection: close" + CRLF +
-                        CRLF +
-                        "3" + CRLF +
-                        "a=1" + CRLF;
-                }
+                request[0] =
+                    "POST http://localhost:8080/test HTTP/1.1" + CRLF +
+                    "content-type: application/x-www-form-urlencoded" + CRLF +
+                    "Transfer-Encoding: chunked" + CRLF +
+                    "Connection: close" + CRLF +
+                    CRLF +
+                    "3" + CRLF +
+                    "a=1" + CRLF;
                 request[1] =
                     "4" + CRLF +
                     "&b=2" + CRLF +



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

Reply via email to