Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ static bool TryReadSlow(ref SequenceReader<byte> reader, out long value)
InitialTwoByteLengthMask => 2,
InitialFourByteLengthMask => 4,
_ => 8 // LengthEightByte
};
};

Span<byte> temp = (stackalloc byte[8])[..length];
if (reader.TryCopyTo(temp))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
// The .NET Foundation licenses this file to you under the MIT license.

using System.Buffers;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using System.Linq;
using System.Net.Http.HPack;
using System.Text;
using Xunit;
#if KESTREL
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
// The .NET Foundation licenses this file to you under the MIT license.

using System.Buffers;
using System.Linq;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http.HPack;
using System.Net.Http.QPack;
using System.Text;
using Xunit;
using System.Net.Http.QPack;
using System.Net.Http.HPack;
using HeaderField = System.Net.Http.QPack.HeaderField;
#if KESTREL
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http;
Expand Down Expand Up @@ -236,7 +236,7 @@ private static void TestDecode(byte[] encoded, KeyValuePair<string, string>[] ex
else
{
int chunkSize = bytesAtATime.Value;

// Parse data in chunks, separated by empty chunks
for (int i = 0; i < encoded.Length; i += chunkSize)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ public void TryWrite_BufferNotEmpty_OneByteLimit(long longToEncode)
[Theory]
[InlineData(64, new byte[] { 64, 64 })]
[InlineData(66, new byte[] { 64, 66 })]
[InlineData(16383, new byte[] { 127, 255})]
[InlineData(16383, new byte[] { 127, 255 })]
public void TryWrite_BufferNotEmpty_TwoByteLimit(long longToEncode,
byte[] expected)
{
Expand All @@ -302,7 +302,7 @@ public void TryWrite_BufferNotSizedCorrectly_TwoByteLimit()
}

[Theory]
[InlineData(16384, new byte[] {128, 0, 64, 0})]
[InlineData(16384, new byte[] {128, 0, 64, 0 })]
[InlineData(16386, new byte[] { 128, 0, 64, 2 })]
[InlineData(1073741823, new byte[] { 191, 255, 255, 255 })]
public void TryWrite_BufferNotEmpty_FourByteLimit(long longToEncode,
Expand Down