static void server_Process(HttpServer server, HttpCall call) { var path = call.Request.Url.LocalPath; SunfishService s = GetServiceForPath(ref path); if (string.IsNullOrWhiteSpace(path)) { call.Redirect(call.Request.Url.LocalPath + "/"); } else { if (s == null || !s.Enabled) { ErrorService.Process404(call); } else { s.Process(path, call); } } call.Close(); }