ChrisMH/Nancy.Cassette — Issue #2: Static content not served by Cassette produces an Internal Server Error
Author: ChrisMH
Created: 2011-11-07 18:13:16+00:00
State: open

For example:

Conventions.StaticContentsConventions.Add(StaticContentConventionBuilder.AddDirectory("Images"));

Attempting to serve content from /Images results in an exception. The problem is the CassetteApplication.RewriteResponseContents method is being called but the NancyContext was never cached for the request.

Fixed by checking for a cached context before rewriting contents. It's unnecessary for requests like these, so best to just do nothing.