Here's a variation I reported to Twisted in 2003: http://www.twistedmatrix.com/pipermail/twisted-python/2003-J... , and an updated version at http://permalink.gmane.org/gmane.comp.python.twisted/3628 .
I did not come up with that myself; I had read it elsewhere.
Is this essentially the same thing?
Zed needs a history lesson. David Filo at Yahoo! figured it out at least 4 years before Zed did, and patched FreeBSD to provide accept filters in release 4.0. They buffer the request at the kernel level so that the application stack doesn't even see the HTTP request until it's fully formed.
http://www.freebsd.org/cgi/man.cgi?query=accept_filter&s...