Skip to content

[HTTP/3] SNI does not use the Host header value #57169

@Tratcher

Description

@Tratcher

HttpClient HTTP/3's implementation does not use HttpRequestMessage.Headers.Host for SNI, unlike prior HTTP versions.

            var request = new HttpRequestMessage(HttpMethod.Get, "https://localhost:443/");
            request.Version = HttpVersion.Version30;
            request.VersionPolicy = HttpVersionPolicy.RequestVersionExact;
            request.Headers.Host = "testhost";

Expected SNI: "testhost"
Actual SNI: "localhost"

Priority: Medium, common customer requirement, difficult to work around.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions