public Status Get() { UserService.CreateAnonymousUser(); Visit.CreateFromHttpContext().Log(Log); return(Status.OK); }
private Status RedirectToDownload() { UserService.CreateAnonymousUser(); string[] parsed = this.DownloadPath.Split(new char[] { '/' }, 2, StringSplitOptions.RemoveEmptyEntries); if (2 != parsed.Length) { return(Status.FoundAt("~/releases/")); } VersionString version; string file; try { version = new VersionString(parsed[0]); file = parsed[1].Replace("..", String.Empty); } catch { return(Status.FoundAt("~/releases/")); } // See if there is a version redirect file for the requested release. string redirect = null; try { redirect = this.RedirectedRelease(version.Prefixed, file); } catch { return(Status.NotFound); } // If redirect was not found, assume we're looking for a file on the download server. if (String.IsNullOrEmpty(redirect)) { Visit.CreateFromHttpContext().Log(logger); // New static.wixtoolset.org is case sensitive and all files there are lower case. redirect = String.Format(Configuration.DownloadServerFormat, version.Prefixed, file).ToLowerInvariant(); } return(Status.FoundAt(redirect)); }