Merge branch 'release/2.1' into release/2.2
This commit is contained in:
commit
ae5b18d459
|
|
@ -3,6 +3,8 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.HttpSys.Internal
|
namespace Microsoft.AspNetCore.HttpSys.Internal
|
||||||
{
|
{
|
||||||
internal static class PathNormalizer
|
internal static class PathNormalizer
|
||||||
|
|
@ -13,7 +15,7 @@ namespace Microsoft.AspNetCore.HttpSys.Internal
|
||||||
// In-place implementation of the algorithm from https://tools.ietf.org/html/rfc3986#section-5.2.4
|
// In-place implementation of the algorithm from https://tools.ietf.org/html/rfc3986#section-5.2.4
|
||||||
public static unsafe int RemoveDotSegments(Span<byte> input)
|
public static unsafe int RemoveDotSegments(Span<byte> input)
|
||||||
{
|
{
|
||||||
fixed (byte* start = input)
|
fixed (byte* start = &MemoryMarshal.GetReference(input))
|
||||||
{
|
{
|
||||||
var end = start + input.Length;
|
var end = start + input.Length;
|
||||||
return RemoveDotSegments(start, end);
|
return RemoveDotSegments(start, end);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue