Commit d69c52bf authored by justcoding121's avatar justcoding121

use case insensitive hashset

parent 81c10135
...@@ -24,11 +24,11 @@ namespace Titanium.Web.Proxy ...@@ -24,11 +24,11 @@ namespace Titanium.Web.Proxy
"KerberosAuthorization" "KerberosAuthorization"
}; };
private static readonly HashSet<string> authSchemes = new HashSet<string> private static readonly HashSet<string> authSchemes = new HashSet<string>(StringComparer.OrdinalIgnoreCase)
{ {
"NTLM".ToLower(), "NTLM",
"Negotiate".ToLower(), "Negotiate",
"Kerberos".ToLower() "Kerberos"
}; };
/// <summary> /// <summary>
...@@ -86,7 +86,7 @@ namespace Titanium.Web.Proxy ...@@ -86,7 +86,7 @@ namespace Titanium.Web.Proxy
if (authHeader != null) 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 = var expectedAuthState =
scheme == null ? State.WinAuthState.INITIAL_TOKEN : State.WinAuthState.UNAUTHORIZED; 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