From 204ab0b860d0c97f77373310becdff5f1c95103b Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Fri, 23 Oct 2015 14:56:17 -0700 Subject: [PATCH] Fix build break --- .../Events/CookieAuthenticationEvents.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.AspNet.Authentication.Cookies/Events/CookieAuthenticationEvents.cs b/src/Microsoft.AspNet.Authentication.Cookies/Events/CookieAuthenticationEvents.cs index 615eb2b0c7..e78db2a87d 100644 --- a/src/Microsoft.AspNet.Authentication.Cookies/Events/CookieAuthenticationEvents.cs +++ b/src/Microsoft.AspNet.Authentication.Cookies/Events/CookieAuthenticationEvents.cs @@ -102,8 +102,8 @@ namespace Microsoft.AspNet.Authentication.Cookies private static bool IsAjaxRequest(HttpRequest request) { - return request.Query["X-Requested-With"] == "XMLHttpRequest" || - request.Headers["X-Requested-With"] == "XMLHttpRequest"; + return string.Equals(request.Query["X-Requested-With"], "XMLHttpRequest", StringComparison.Ordinal) || + string.Equals(request.Headers["X-Requested-With"], "XMLHttpRequest", StringComparison.Ordinal); } ///