HttpClient with HTTP/3 does not leverage the full QPACK static table
- Dominant language
- C#
- Stars
- 18.3k
- Forks
- 5.6k
- PR merge metrics
- PR metrics pending
Description
### 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
```csharp
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_
Contributor guide
Assessment
This issue has not been assessed yet.