private static int GetRequestResponseHttpStatus(MiniProfilerHandler handler, string resourceName) { using (new HttpSimulator("/mini-profiler-resources/", @"c:\").SimulateRequest(new Uri("http://localhost/mini-profiler-resources" + resourceName))) { handler.ProcessRequest(HttpContext.Current); return(HttpContext.Current.Response.StatusCode); } }
private static int GetRequestResponseHttpStatus(MiniProfilerHandler handler, string resourceName) { using (new HttpSimulator("/mini-profiler-resources/", @"c:\").SimulateRequest(new Uri("http://localhost/mini-profiler-resources"+resourceName))) { handler.ProcessRequest(HttpContext.Current); return HttpContext.Current.Response.StatusCode; } }
private static Type GetRequestResponseEncoding(MiniProfilerHandler handler, string resourceName, string encoding) { var headers = new NameValueCollection(); headers.Add("Accept-encoding", encoding); using (new HttpSimulator("/mini-profiler-resources/", @"c:\").SimulateRequest(new Uri("http://localhost/mini-profiler-resources" + resourceName), HttpVerb.GET, headers)) { handler.ProcessRequest(HttpContext.Current); ////return HttpContext.Current.Response.Headers["Content-encoding"]; return(HttpContext.Current.Response.Filter.GetType()); } }
private static Type GetRequestResponseEncoding(MiniProfilerHandler handler, string resourceName, string encoding) { var headers = new NameValueCollection(); headers.Add("Accept-encoding", encoding); using (new HttpSimulator("/mini-profiler-resources/", @"c:\").SimulateRequest(new Uri("http://localhost/mini-profiler-resources"+resourceName), HttpVerb.GET, headers)) { handler.ProcessRequest(HttpContext.Current); ////return HttpContext.Current.Response.Headers["Content-encoding"]; return HttpContext.Current.Response.Filter.GetType(); } }