unfiltered/unfiltered — pull request #200 by soro (2014-02-17 04:17:32+00:00)
Title: Fix tests and make sendfile available on request

This pull request fixes a number of tests, mostly by switching things from netty.async.Plan to RequestPlan, since the prior doesn't actually contain the overrides for channelRead etc. anymore. I'm not sure this is the intended direction, but at least the tests pass now.
It also makes it possible to use nettys sendfile support without having to wire everything up yourself by grabbing the underlying ChannelHandlerContext and includes a refactor of the resources code that uses this functionality.
One likely controversial aspect is that this introduces new ResponseFunction and Responder classes that allow one to work with the basic netty HttpResponse. I think this is eventually going to be necessary though and I'm not sure the current resources implementation can actually be completely correct, since the HttpObjectEncoder in netty considers the http response to be complete once it has received a FullHttpResponse (https://github.com/netty/netty/blob/master/codec-http/src/main/java/io/netty/handler/codec/http/HttpObjectEncoder.java?source=c#L104) [FullHttpResponse does inherit from it].