We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9cb1185 commit e6d7ddeCopy full SHA for e6d7dde
src/Servers/Kestrel/Core/src/Internal/Infrastructure/HttpUtilities.cs
@@ -410,10 +410,11 @@ public static string VersionToString(HttpVersion httpVersion)
410
}
411
public static string MethodToString(HttpMethod method)
412
{
413
- int methodIndex = (int)method;
414
- if (methodIndex >= 0 && methodIndex <= 8)
+ var methodIndex = (int)method;
+ var methodNames = _methodNames;
415
+ if ((uint)methodIndex < (uint)methodNames.Length)
416
- return _methodNames[methodIndex];
417
+ return methodNames[methodIndex];
418
419
return null;
420
0 commit comments