Skip to content

Http2 test for IIS #14644

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 3 commits into from
Oct 30, 2019
Merged

Http2 test for IIS #14644

merged 3 commits into from
Oct 30, 2019

Conversation

jkotalik
Copy link
Contributor

@jkotalik jkotalik commented Oct 1, 2019

Fixes #14139.

cc @gfoidl

@@ -37,7 +37,7 @@ public static void AddHttpsToServerConfig(this IISDeploymentParameters parameter

element.Descendants("access")
.Single()
.SetAttributeValue("sslFlags", "Ssl, SslNegotiateCert");
.SetAttributeValue("sslFlags", "None");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I need to read into setting this to None. Setting this to none makes it seem like SSL is disabled for the entire site. I'm still seeing in the application that it is binding to https and using HTTP/2. Maybe it's using h2c?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nvrm, I think it's a poor doc. I'm seeing https on the server.

Copy link
Member

Choose a reason for hiding this comment

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

So what does setting this to None actually do?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It removes client cert validation I believe.

@@ -63,6 +63,11 @@ private async Task ServerAddresses(HttpContext ctx)
await ctx.Response.WriteAsync(string.Join(",", serverAddresses.Addresses));
}

private async Task CheckIsHttp2(HttpContext ctx)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
private async Task CheckIsHttp2(HttpContext ctx)
private async Task CheckProtocol(HttpContext ctx)

@analogrelay analogrelay added this to the 5.0.0-preview1 milestone Oct 1, 2019
@jkotalik jkotalik force-pushed the jkotalik/addHttp2Test branch from faff31b to 8e83b3e Compare October 1, 2019 23:15
var client = CreateNonValidatingClient(deploymentResult);
client.DefaultRequestVersion = HttpVersion.Version20;

Assert.Equal("HTTP/2", await client.GetStringAsync($"/CheckIsHttp2"));
Copy link
Member

Choose a reason for hiding this comment

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

Let's test other protocol versions too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Other tests already verify this behavior (checking http 1.1)

@jkotalik jkotalik force-pushed the jkotalik/addHttp2Test branch from 8e83b3e to c50d70f Compare October 30, 2019 00:40
@jkotalik jkotalik merged commit d427e43 into master Oct 30, 2019
@jkotalik jkotalik deleted the jkotalik/addHttp2Test branch October 30, 2019 16:38
@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.

Kestrel and IIS set different Request.Protocol values for HTTP/2
8 participants