NancyFx/Nancy — pull request #430 by nolanw (2011-12-01 22:11:11+00:00)
Title: Don't overwrite response contents on error (fixes #429)

The default error handler should accept custom error contents for the errors it handles.

Since this fix simply checks for the response's contents being set, it doesn't handle this case:

```c#
Get["/"] = parameters =>
{
Response.Contents = stream => WriteSomethingTo(Stream);
// later...
if (SomeReason)
{
return 404;
}
}
```

Conceivably, someone does this right now and expects the default error page to appear. With this fix, they'd still get the response contents. (Which is what I'd expect to happen, personally. I set the contents, they should show up. But others' expectations may differ.)