Remove the non blocking handling of the request, doesn't work well with the new non...
authorfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 29 May 2007 20:41:53 +0000 (20:41 +0000)
committerfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 29 May 2007 20:41:53 +0000 (20:41 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@542645 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/coyote/http11/InternalNioInputBuffer.java
test/org/apache/catalina/tribes/test/channel/ChannelStartStop.java
test/org/apache/catalina/tribes/test/interceptors/TestOrderInterceptor.java
webapps/docs/config/http.xml

index c5309e0..a1d6881 100644 (file)
@@ -422,11 +422,11 @@ public class InternalNioInputBuffer implements InputBuffer {
                 return false;
             }
             if (readTimeout == -1) {
-                if (!fill(false,false)) //request line parsing
+                if (!fill(false,true)) //request line parsing
                     return false;
             } else {
                 // Do a simple read with a short timeout
-                if ( !readSocket(true, false) ) return false;
+                if ( !readSocket(true, true) ) return false;
             }
         }
 
@@ -441,7 +441,7 @@ public class InternalNioInputBuffer implements InputBuffer {
 
             // Read new bytes if needed
             if (pos >= lastValid) {
-                if (!fill(true,false)) //request line parsing
+                if (!fill(true,true)) //request line parsing
                     return false;
             }
 
@@ -470,7 +470,7 @@ public class InternalNioInputBuffer implements InputBuffer {
 
             // Read new bytes if needed
             if (pos >= lastValid) {
-                if (!fill(true,false)) //request line parsing
+                if (!fill(true,true)) //request line parsing
                     return false;
             }
 
@@ -514,7 +514,7 @@ public class InternalNioInputBuffer implements InputBuffer {
 
             // Read new bytes if needed
             if (pos >= lastValid) {
-                if (!fill(true,false)) //reques line parsing
+                if (!fill(true,true)) //reques line parsing
                     return false;
             }
 
@@ -626,7 +626,7 @@ public class InternalNioInputBuffer implements InputBuffer {
 
             // Read new bytes if needed
             if (pos >= lastValid) {
-                if (!fill(true,false)) {//parse header 
+                if (!fill(true,true)) {//parse header 
                     headerParsePos = HeaderParsePosition.HEADER_START;
                     return HeaderParseStatus.NEED_MORE_DATA;
                 }
@@ -664,7 +664,7 @@ public class InternalNioInputBuffer implements InputBuffer {
 
             // Read new bytes if needed
             if (pos >= lastValid) {
-                if (!fill(true,false)) { //parse header 
+                if (!fill(true,true)) { //parse header 
                     return HeaderParseStatus.NEED_MORE_DATA;
                 }
             }
@@ -704,7 +704,7 @@ public class InternalNioInputBuffer implements InputBuffer {
 
                     // Read new bytes if needed
                     if (pos >= lastValid) {
-                        if (!fill(true,false)) {//parse header 
+                        if (!fill(true,true)) {//parse header 
                             //HEADER_VALUE, should already be set
                             return HeaderParseStatus.NEED_MORE_DATA;
                         }
@@ -725,7 +725,7 @@ public class InternalNioInputBuffer implements InputBuffer {
 
                     // Read new bytes if needed
                     if (pos >= lastValid) {
-                        if (!fill(true,false)) {//parse header 
+                        if (!fill(true,true)) {//parse header 
                             //HEADER_VALUE
                             return HeaderParseStatus.NEED_MORE_DATA;
                         }
@@ -756,7 +756,7 @@ public class InternalNioInputBuffer implements InputBuffer {
             }
             // Read new bytes if needed
             if (pos >= lastValid) {
-                if (!fill(true,false)) {//parse header
+                if (!fill(true,true)) {//parse header
                     
                     //HEADER_MULTI_LINE
                     return HeaderParseStatus.NEED_MORE_DATA;
index e514001..ee59032 100644 (file)
@@ -17,6 +17,7 @@ package org.apache.catalina.tribes.test.channel;
 
 import org.apache.catalina.tribes.group.GroupChannel;
 import junit.framework.TestCase;
+import org.apache.catalina.tribes.transport.ReceiverBase;
 
 /**
  * @author Filip Hanik
@@ -48,6 +49,12 @@ public class ChannelStartStop extends TestCase {
         channel.stop(channel.DEFAULT);
     }
 
+    public void testScrap() throws Exception {
+        System.out.println(channel.getChannelReceiver().getClass());
+        ((ReceiverBase)channel.getChannelReceiver()).setMaxThreads(1);
+    } 
+
+
     public void testDoublePartialStart() throws Exception {
         //try to double start the RX 
         int count = 0;
index 3f4ff0e..442690e 100644 (file)
@@ -51,6 +51,7 @@ public class TestOrderInterceptor extends TestCase {
         threads = new Thread[channelCount];\r
         for ( int i=0; i<channelCount; i++ ) {\r
             channels[i] = new GroupChannel();\r
+            \r
             orderitcs[i] = new OrderInterceptor();\r
             mangleitcs[i] = new MangleOrderInterceptor();\r
             orderitcs[i].setExpire(Long.MAX_VALUE);\r
index 4d5afa2..59308ed 100644 (file)
     Tomcat Version   3.x 4.x 5.x 6.x                       6.x                     5.5.x 6.x
     Support Polling         NO                             YES                        YES
     Polling Size           N/A                   Unlimited - Restricted by mem        Unlimited
-    Read HTTP Request     Blocking                     Non Blocking                   Blocking
+    Read HTTP Request     Blocking                     Blocking                       Blocking
     Read HTTP Body        Blocking                     Blocking                       Blocking
     Write HTTP Response   Blocking                     Blocking                       Blocking
     SSL Support           Java SSL                     Java SSL                       OpenSSL