diff --git a/Octokit/Clients/Enterprise/EnterpriseProbe.cs b/Octokit/Clients/Enterprise/EnterpriseProbe.cs index 3584825ea6..1d963b38b8 100644 --- a/Octokit/Clients/Enterprise/EnterpriseProbe.cs +++ b/Octokit/Clients/Enterprise/EnterpriseProbe.cs @@ -1,4 +1,5 @@ using System; +using System.Linq; using System.Net; using System.Net.Http; using System.Text.RegularExpressions; @@ -103,7 +104,8 @@ public async Task Probe(Uri enterpriseBaseUrl) static bool IsEnterpriseResponse(IResponse response) { - return response.Headers.ContainsKey("X-GitHub-Request-Id"); + // Use fix from https://github.com/octokit/octokit.net/pull/2175 + return response.Headers.Any(h => string.Equals(h.Key, "X-GitHub-Request-Id", StringComparison.OrdinalIgnoreCase)); } } @@ -125,4 +127,4 @@ public enum EnterpriseProbeResult /// Failed } -} +} \ No newline at end of file