Created attachment 25266 [details] Patch to fix issue org.apache.tomcat.util.net.AprEndpoint.unlockAccept does not wakeup accepts with deferred accept or BSD filters. This is because it only connects to its connector for causing the accept call to return. This is not enough in the case of a deferred accept / BSD filters as the accept call only returns from the kernel if data was sent / a HTTP request was sent. The attached patch fixes that by sending and OPTIONS * in this case.
Fixed in trunk and proposed for 6.0.x. Thanks for the patch.
Created attachment 25510 [details] 2010-06-02_tc6_bug49095.patch Updated the tc6.0.x patch to explicitly specify the encoding used by the Writer. That is r950682 of trunk.
Fixed in 6.0 in r952090 and will be in 6.0.27 onwards. Note, that all the affected lines are guarded by if(deferAccept) clauses. It is easy to remove that clause and extend this implementation of unlockAccept() that sends a valid "OPTIONS" request upon other connector implementations. Is it worth doing? Regarding the 'BSD filters': apparently the documentation on them is here: [1], [2] [1] http://www.freebsd.org/cgi/man.cgi?query=accept_filter&sektion=9 [2] http://www.freebsd.org/cgi/man.cgi?query=setsockopt&sektion=2 (see SO_ACCEPTFILTER)