NancyFx/Nancy — pull request #1560 by khellang (2014-06-09 12:03:38+00:00)
Title: [WIP] Negotiation throws in status code handler

Here's a failing test where the negotiation throws when used in a status code handler and no module is found (404).

Discovered in http://stackoverflow.com/questions/24112091/automatic-content-negotation-when-assigning-to-response.

The `NegotiationContext` is `null` because it's set in the [`DefaultNancyModuleBuilder`](https://github.com/NancyFx/Nancy/blob/master/src/Nancy/Routing/DefaultNancyModuleBuilder.cs#L60), which never gets invoked. I think the negotiation context should be set much earlier in the pipeline, maybe even in the `NancyContext` constructor?

@Grumpydev and @TheCodeJunkie, what do you think?