On 20/10/2011 10:07, Konstantin Kolinko wrote:
> 2011/10/20  <ma...@apache.org>:
>> Author: markt
>> Date: Wed Oct 19 20:55:39 2011
>> New Revision: 1186485
>>
>> URL: http://svn.apache.org/viewvc?rev=1186485&view=rev
>> Log:
>> Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52055
>> Buffers not correctly reset between keep-alive requests when using async

<snip/>

> Searching for places that use org.apache.coyote.Constants.STAGE_ENDED ...

SocketState.OPEN is probably a clearer indication of this particular
circumstance.

> 1) it looks like AbstractAjpProcessor#asyncDispatch(SocketStatus)
> needs similar patch:
> it has "return SocketState.OPEN;"
> 
> If I understand correctly in Ajp that will be recycle(false)

This already happens. asyncDispatch() is called from
AbstractProtocol$AbstractConnectionHandler which will call release()
when SocketState.OPEN is returned which in turn calls
processor.recycle(false)

> 2) In Http11NioProcessor#event() I do not see nextRequest() calls, but
> similar implementation in Http11AprProcessor#event() has nextRequest()
> calls.

For APR on CLOSED, I don't see that the nextRequest() calls are doing
anything useful. The processor is going to get recycled which will
recycle the buffers. There is no need for nextRequest() in this case.

For NIO on OPEN, I think there is a case for nextRequest(). I'll add the
necessary calls.

<aside>
The more similar the connectors, the easier this type of code review
becomes. I would suggest that this supports the view that refactoring
the connections to align the code is a good thing.

I think there is still scope to further align code both across the
BIO/NIO/APR boundary but also across the HTTP/AJP boundary.
</aside>

Mark

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

Reply via email to