Commit d69c52bf authored by justcoding121's avatar justcoding121

use case insensitive hashset

parent 81c10135
......@@ -24,11 +24,11 @@ namespace Titanium.Web.Proxy
"KerberosAuthorization"
};
private static readonly HashSet<string> authSchemes = new HashSet<string>
private static readonly HashSet<string> authSchemes = new HashSet<string>(StringComparer.OrdinalIgnoreCase)
{
"NTLM".ToLower(),
"Negotiate".ToLower(),
"Kerberos".ToLower()
"NTLM",
"Negotiate",
"Kerberos"
};
/// <summary>
......@@ -86,7 +86,7 @@ namespace Titanium.Web.Proxy
if (authHeader != null)
{
string scheme = authSchemes.Contains(authHeader.Value.ToLower()) ? authHeader.Value.ToLower() : null;
string scheme = authSchemes.Contains(authHeader.Value) ? authHeader.Value : null;
var expectedAuthState =
scheme == null ? State.WinAuthState.INITIAL_TOKEN : State.WinAuthState.UNAUTHORIZED;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment