Skip to content

HttpClient with HTTP/3 does not leverage the full QPACK static table #127879

@ladeak

Description

@ladeak

Description

HttpClient with HTTP/3 does not leverage the full QPACK static table, https://www.rfc-editor.org/rfc/rfc9204.html#static-table

Reproduction Steps

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Options, "https://somehttp3server") { Version = HttpVersion.Version30, VersionPolicy = HttpVersionPolicy.RequestVersionExact };
request.Headers.Add("access-control-request-method", "get");
request.Headers.Add("origin", "https://localhost");
var response = await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead);

Expected behavior

Both origin and access-control-request-method headers are encoded by their static table index from the QPACK RFC.

Actual behavior

Only the origin field name is encoded.
For access-control-request-method QPACK could use value 81 from the static table, as both the header name and value matches, however everything is encoded as string literals, that 'inflate' the size of the required frame size.

Regression?

No.

Known Workarounds

No known workarounds

Configuration

.NET 10, windows 11, x64;

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions