Fix auth enabled check

This commit is contained in:
Chris R 2017-06-07 15:34:02 -07:00
parent 6717f1674f
commit 448e6787e2
2 changed files with 3 additions and 3 deletions

View File

@ -58,7 +58,7 @@ namespace Microsoft.AspNetCore.Hosting
else
{
// Lightup a new ANCM variable that tells us if auth is enabled.
foreach (var authType in iisAuth.Split(';'))
foreach (var authType in iisAuth.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries))
{
if (!string.Equals(authType, "anonymous", StringComparison.OrdinalIgnoreCase))
{

View File

@ -42,11 +42,11 @@ namespace TestSites
var authScheme = (await authProvider.GetAllSchemesAsync()).SingleOrDefault();
if (string.IsNullOrEmpty(iisAuth))
{
await ctx.Response.WriteAsync("backcompat;" + authScheme?.Name ?? "null");
await ctx.Response.WriteAsync("backcompat;" + (authScheme?.Name ?? "null"));
}
else
{
await ctx.Response.WriteAsync("latest;" + authScheme?.Name ?? "null");
await ctx.Response.WriteAsync("latest;" + (authScheme?.Name ?? "null"));
}
return;
}