Author: remy.maucherat(a)jboss.com
Date: 2008-03-21 11:40:49 -0400 (Fri, 21 Mar 2008)
New Revision: 534
Modified:
trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
trunk/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java
Log:
- Fix comet state recycling (not too problematic, it will cause up to one useless event
after begin).
- Tested EOF with chunking: works but the chunk parser doesn't handle non blocking: it
must get the whole chunk
header in a single read, or it will complain. This shouldn't cause many problems in
the real world, but
but it could be improved.
Modified: trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
===================================================================
--- trunk/java/org/apache/coyote/http11/Http11AprProcessor.java 2008-03-21 01:39:06 UTC
(rev 533)
+++ trunk/java/org/apache/coyote/http11/Http11AprProcessor.java 2008-03-21 15:40:49 UTC
(rev 534)
@@ -328,7 +328,6 @@
protected boolean readNotifications = true;
protected boolean writeNotification = false;
protected boolean resumeNotification = false;
- protected boolean nonBlocking = true;
protected boolean cometProcessing = false;
@@ -360,11 +359,6 @@
}
- public boolean getNonBlocking() {
- return nonBlocking;
- }
-
-
public int getCometTimeout() {
return cometTimeout;
}
@@ -815,11 +809,13 @@
if (error) {
inputBuffer.nextRequest();
outputBuffer.nextRequest();
+ recycleComet();
recycle();
return SocketState.CLOSED;
} else if (!comet) {
inputBuffer.nextRequest();
outputBuffer.nextRequest();
+ recycleComet();
recycle();
return SocketState.OPEN;
} else {
@@ -1023,6 +1019,15 @@
}
+ public void recycleComet() {
+ cometTimeout = -1;
+ readNotifications = true;
+ writeNotification = false;
+ resumeNotification = false;
+ cometProcessing = false;
+ }
+
+
// ----------------------------------------------------- ActionHook Methods
Modified: trunk/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java
===================================================================
--- trunk/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java 2008-03-21
01:39:06 UTC (rev 533)
+++ trunk/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java 2008-03-21
15:40:49 UTC (rev 534)
@@ -221,6 +221,7 @@
pos = 0;
lastValid = 0;
endChunk = false;
+ needCRLFParse = false;
}
Show replies by date