public void Handling_null_content_type() { HttpContextBase fakeContext = Substitute.For <HttpContextBase>(); fakeContext.Response.ContentType = null; LocalizedApplication.InstallResponseFilter(fakeContext); }
public async override Task Invoke(IOwinContext owinContext) { System.Web.HttpContextBase context = owinContext.Get <System.Web.HttpContextBase>(typeof(System.Web.HttpContextBase).FullName); Debug.WriteLine("OwinMiddleware::Invoke -- ContentType: {0},\n\tUrl: {1}\n\tRawUrl:{2}", context.Response.ContentType, context.Request.Url, context.Request.RawUrl); LocalizedApplication.InstallResponseFilter(context); await Next.Invoke(owinContext); }