http2dotnet icon indicating copy to clipboard operation
http2dotnet copied to clipboard

Support HTTPS in CliClient

Open bcuff opened this issue 6 years ago • 3 comments

Hi, I hope you don't mind the unsolicited PR. I was exploring some HTTP2 options in C# and found your library. I wanted to get it working with SSL and managed to do so in your CliClient example.

Some Notes:

  • I pulled in a .gitignore from here.
  • I had to upgrade to netcoreapp2.2 because I needed support for ALPN in SslStream.

Thanks!

bcuff avatar May 02 '19 02:05 bcuff

oh wait, i think your suggestion had the protocol backwards. let me fix that and test.

bcuff avatar May 10 '19 14:05 bcuff

Fixed & tested. Here's where it's referenced in the spec.

bcuff avatar May 10 '19 14:05 bcuff

The last one should have been right?

The string "h2c" identifies the protocol where HTTP/2 is run over cleartext TCP. This identifier is used in the HTTP/1.1 Upgrade header field and in any place where HTTP/2 over TCP is identified.

We are doing an upgrade, and cleartext TCP (since TLS always uses ALPN). So h2c should have been right?

Matthias247 avatar May 11 '19 03:05 Matthias247