diff --git a/src/Servers/Kestrel/Core/src/Internal/Http/PathDecoder.cs b/src/Servers/Kestrel/Core/src/Internal/Http/PathDecoder.cs index 68fc9351fb84..8228ddeb6968 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http/PathDecoder.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http/PathDecoder.cs @@ -42,6 +42,6 @@ public static string DecodePath(Span path, bool pathEncoded, string rawTar return rawTarget; } - return path.Slice(0, pathLength).GetAsciiStringNonNullCharacters(); + return path.Slice(0, pathLength).GetAsciiString(); } }