unfiltered/unfiltered — pull request #266 by g-eorge (2014-10-07 17:44:45+00:00)
Title: Update to Netty 4.1 and make it possible to provide a custom HttpObjectAggregator

I ran in to some issues in my project caused by the chunk aggregator now being included in the Netty pipeline by default.

On it's own that wasn't such a big deal, but with the `HttpObjectAggregator` in Netty 4.0.23 I couldn't find a way to respond to an oversize request with a 413 status _and_ an error message in the body _and_ cleanly close the request without a broken pipe. Maybe I missed something.

Anyhow I ended up looking in to Netty 4.1 which adds the ability to provide a custom handler for oversize requests, but this requires a custom `HttpObjectAggregator` instance. So I thought it might be useful to make that possible in the `unfiltered.netty.Server` somehow, so here's my suggestion.

It might not be a great plan to update to to Netty 4.1.0-Beta3 just yet, but it would be great to get your feedback in any case.

There is one breaking change here, as I have swapped out the `chunkSize: Int` parameter to `Server` for `chunker: () => Chunker` instead. Maybe there's a better way to do it.