Skip to content
Closed
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
2 changes: 1 addition & 1 deletion src/Shared/runtime/Http3/QPack/H3StaticTable.Http3.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public static bool TryGetStatusIndex(int status, out int index)
// TODO: just use Dictionary directly to avoid interface dispatch.
public static IReadOnlyDictionary<HttpMethod, int> MethodIndex => s_methodIndex;

public static ref HeaderField Get(int index) => ref s_staticTable[index];
public static HeaderField GetHeaderFieldAt(int index) => s_staticTable[index];

private static readonly HeaderField[] s_staticTable = new HeaderField[]
{
Expand Down
20 changes: 1 addition & 19 deletions src/Shared/runtime/Http3/QPack/QPackDecoder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -180,36 +180,18 @@ public void Decode(in ReadOnlySequence<byte> headerBlock, bool endHeaders, IHttp
{
foreach (ReadOnlyMemory<byte> segment in headerBlock)
{
DecodeCore(segment.Span, handler);
Decode(segment.Span, endHeaders: false, handler);
}
CheckIncompleteHeaderBlock(endHeaders);
}

public void Decode(ReadOnlySpan<byte> headerBlock, bool endHeaders, IHttpHeadersHandler handler)
{
DecodeCore(headerBlock, handler);
CheckIncompleteHeaderBlock(endHeaders);
}

private void DecodeCore(ReadOnlySpan<byte> headerBlock, IHttpHeadersHandler handler)
{
foreach (byte b in headerBlock)
{
OnByte(b, handler);
}
}

private void CheckIncompleteHeaderBlock(bool endHeaders)
{
if (endHeaders)
{
if (_state != State.CompressedHeaders)
{
throw new QPackDecodingException(SR.net_http_hpack_incomplete_header_block);
}
}
}

private void OnByte(byte b, IHttpHeadersHandler handler)
{
int intResult;
Expand Down
210 changes: 0 additions & 210 deletions src/Shared/test/Shared.Tests/runtime/Http3/QPackDecoderTest.cs

This file was deleted.