From a26f96237b668f050e93041ab6617600abc85cfc Mon Sep 17 00:00:00 2001 From: Justin Van Patten Date: Sat, 11 Mar 2017 22:31:42 -0800 Subject: [PATCH] Specify StringComparison when calling string.StartsWith (#1484) StartsWith does a culture-sensitive comparison by default. An ordinal comparison makes more sense here. --- src/Microsoft.AspNetCore.Server.Kestrel/ServerAddress.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.AspNetCore.Server.Kestrel/ServerAddress.cs b/src/Microsoft.AspNetCore.Server.Kestrel/ServerAddress.cs index cfa0bff4e8..5030e81993 100644 --- a/src/Microsoft.AspNetCore.Server.Kestrel/ServerAddress.cs +++ b/src/Microsoft.AspNetCore.Server.Kestrel/ServerAddress.cs @@ -19,7 +19,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel { get { - return Host.StartsWith(Constants.UnixPipeHostPrefix); + return Host.StartsWith(Constants.UnixPipeHostPrefix, StringComparison.Ordinal); } }