Fixed comet processing.
authorfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 16 Jun 2006 20:55:06 +0000 (20:55 +0000)
committerfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 16 Jun 2006 20:55:06 +0000 (20:55 +0000)
commit5d59b14b8104f952e5c7dd6a5cac2d688f30c967
tree66beac59bbd129415ac48f4277a8aa7d7354ec6a
parentdd50eaea8fa672f716491f296b5704f6c9ad9db2
Fixed comet processing.
The following bug was existing:
When a comet request had begun, and the browser sent some more data, the Tomcat APR component was never reading the data from the socket and lead to two kinds of failures
1. The CometServlet.read returned false, cause no data was read, and the socket closed
2. If the CometServlet.read was overwritten and return true, the thread got stuck in a loop, forever hanging.

The solution was to read the incoming data from the socket, update the content length of the request, and make sure that the input filters would still allow to read the data.

I think the following features still need to be fixed:
1. If CometServlet.read return false, the adapter should call CometServlet.end, not CometServlet.error
2. If CometServlet.read throws an error, then the adapter should call CometServlet.error
3. When CometServlet.read returns false, don't close the socket, keep alive should still work and we should still be able to process more HTTP requests on that connection

git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@414906 13f79535-47bb-0310-9956-ffa450edef68
java/org/apache/coyote/http11/Http11AprProcessor.java
java/org/apache/coyote/http11/InternalAprInputBuffer.java