NancyFx/Nancy — Issue #480: WithHeader("Content-Type") doesn't work
Author: prabirshrestha
Created: 2012-01-20 19:42:03+00:00
State: open

This code doesn't seem to work.

Get["/blog.appcache"] = _ => View["blog.appcache.cshtml"].WithHeader("Content-Type", "text/cache-manifest");

I needed to change it to:

Get["/blog.appcache"] = _ =>
{
var view = View["appcaches/blog"];
view.ContentType = "text/cache-manifest";
return view;
};