Skip to content

Commit 40b0d43

Browse files
authored
Fixing header lookup for perf/consistency (#9776)
1 parent 87ec218 commit 40b0d43

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/WebJobs.Script/Extensions/HttpRequestExtensions.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
using Microsoft.AspNetCore.Http.Extensions;
1414
using Microsoft.AspNetCore.WebUtilities;
1515
using Microsoft.Azure.WebJobs.Extensions.Http;
16-
using Microsoft.CodeAnalysis.CSharp.Syntax;
1716
using Microsoft.Extensions.DependencyInjection;
1817
using Microsoft.Extensions.Primitives;
1918
using Newtonsoft.Json;
@@ -85,9 +84,9 @@ public static bool IsAppServiceInternalRequest(this HttpRequest request, IEnviro
8584
}
8685

8786
// this header will *always* be present on requests originating externally (i.e. going
88-
// through the Anatares front end). For requests originating internally it will NOT be
87+
// through the Antares front end). For requests originating internally it will NOT be
8988
// present.
90-
return !request.Headers.Keys.Contains(ScriptConstants.AntaresLogIdHeaderName);
89+
return !request.Headers.ContainsKey(ScriptConstants.AntaresLogIdHeaderName);
9190
}
9291

9392
public static bool IsPlatformInternalRequest(this HttpRequest request, IEnvironment environment = null)

0 commit comments

Comments
 (0)