Skip to content

Sync shared code from runtime #62900

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 24, 2025
Merged
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
15 changes: 0 additions & 15 deletions src/Shared/runtime/Http3/QPack/H3StaticTable.Http3.cs
Original file line number Diff line number Diff line change
@@ -1,24 +1,12 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Collections.Generic;
using System.Text;

namespace System.Net.Http.QPack
{
internal static partial class H3StaticTable
{
private static readonly Dictionary<HttpMethod, int> s_methodIndex = new Dictionary<HttpMethod, int>
{
// TODO connect is internal to system.net.http
[HttpMethod.Delete] = 16,
[HttpMethod.Get] = 17,
[HttpMethod.Head] = 18,
[HttpMethod.Options] = 19,
[HttpMethod.Post] = 20,
[HttpMethod.Put] = 21,
};

public static bool TryGetStatusIndex(int status, out int index)
{
index = status switch
Expand All @@ -45,9 +33,6 @@ public static bool TryGetStatusIndex(int status, out int index)

public static int Count => s_staticTable.Length;

// TODO: just use Dictionary directly to avoid interface dispatch.
public static IReadOnlyDictionary<HttpMethod, int> MethodIndex => s_methodIndex;

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

private static readonly HeaderField[] s_staticTable = new HeaderField[]
Expand Down
Loading