Skip to content
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

HTTP/3: Change alt-svc protocol to h3 and add upgrade test #34469

Merged
merged 2 commits into from
Jul 21, 2021

Conversation

JamesNK
Copy link
Member

@JamesNK JamesNK commented Jul 18, 2021

Fixes #34148

responseHeaders.HeaderAltSvc = $"h3-29=\":{option.IPEndPoint!.Port}\"; ma=84600";
// TODO: Perf. Create string once instead of per-request.
// https://github.com/dotnet/aspnetcore/issues/34468
responseHeaders.HeaderAltSvc = $"h3=\":{option.IPEndPoint!.Port}\"; ma=84600";
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Latest draft has finalized "h3"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was testing the ALPN code with similar values. I think we should include both h3 and h3-29 for compat for at least a milestone, that's really common on websites I've checked. h3 alpn didn't work with HttpClient yet.

Copy link
Member Author

@JamesNK JamesNK Jul 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chrome (and Edge) support "h3"

image

If HttpClient and major browsers support h3 then I think it's fine to completely switch in RC1.

public async Task Listen_Http3AndSocketsCoexistOnSameEndpoint_AltSvcEnabled_Upgrade()
{
// Arrange
var builder = GetHostBuilder()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't the ALPN setting need to be updated to match?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HttpClient is being inconsistent and using h3 in the altsvc but not as it’s alpn dotnet/runtime#55894

Copy link
Member

@Tratcher Tratcher Jul 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. The alt-svc and ALPN should be kept in sync, let's cover this in the meeting later today.

@JamesNK JamesNK merged commit 29c7fe6 into main Jul 21, 2021
@JamesNK JamesNK deleted the jamesnk/http3-protocol-upgrade branch July 21, 2021 01:34
@ghost ghost added this to the 6.0-rc1 milestone Jul 21, 2021
@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HTTP/3: Test alt-svc upgrade from HTTP/1.1 and HTTP/2 to HTTP/3
3 participants