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

Windows 7 HTTP2 support #5

Open
veso266 opened this issue Oct 4, 2024 · 0 comments
Open

Windows 7 HTTP2 support #5

veso266 opened this issue Oct 4, 2024 · 0 comments

Comments

@veso266
Copy link

veso266 commented Oct 4, 2024

Hi there, recently I was playing with C# HTTP2 server, and after spending hours debuging why firefox won't connect to it (firefox requires TLS), I found out I cannot even make http2 client requests on windows 7 with help of this code

using System;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;

namespace ExampleClient
{
    //Check HTTP2 support with this website: https://tools.keycdn.com/http2-test
    class Program
    {
        static async Task Main(string[] args)
        {
            HttpClient myHttpClient = new HttpClient
            {
                DefaultRequestVersion = HttpVersion.Version20,
                DefaultVersionPolicy = HttpVersionPolicy.RequestVersionOrHigher
            };
            string requestUrl = "https://http2cdn.cdnsun.com";
            try
            {
                Console.WriteLine($"GET {requestUrl}.");
                HttpResponseMessage response = await myHttpClient.GetAsync(requestUrl);
                response.EnsureSuccessStatusCode();
                Console.WriteLine($"Response HttpVersion: {response.Version}");
                string responseBody = await response.Content.ReadAsStringAsync();
                Console.WriteLine($"Response Body Length is: {responseBody.Length}");
                Console.WriteLine($"------------Response Body------------");
                Console.WriteLine(responseBody);
                Console.WriteLine($"------------End of Response Body------------");
            }
            catch (HttpRequestException e)
            {
                Console.WriteLine($"HttpRequestException : {e.Message}");
            }
            Console.WriteLine($"Press Enter to exit....");
            Console.ReadLine();
        }
    }
}

After digging further, I stumbled across this issue: dotnet/runtime#61866
and I found out I am missing a TLS feature: https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/hh831771(v=ws.11)?redirectedfrom=MSDN

and it seams I am not the only one with this problem: curl/curl#840

now do you maybe have any idea, if this can be added (or was already added and I just didn't notice)

Sorry to ask here, but sadly I am not sure whats a good place to even ask this kind of questions, VxEx (still not sure what happened to vxiiduu) is dead, MSFN doesn't seam to be the right place, so I guess here 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant