grapevine icon indicating copy to clipboard operation
grapevine copied to clipboard

Replace HttpListener for .NET 6.0+

Open pgrawehr opened this issue 2 years ago • 4 comments

This replaces the legacy System.Net.HttpListener with SpaceWizzards.HttpListener.HttpListener for .NET 6.0 and above. This replacement implementation is fully managed and does not use any poorly maintained Windows IIS components under the hood. It also no longer requires admin rights (or complex netsh rules) to create the listener and "just works". The only probable downside I can think of is that the network port cannot be shared directly with this implementation, but when something as lightweight as Grapevine is used, that's probably not intended anyway.

Also includes some fixes for ContentType, the old implementation for the default list wasn't working. This resulted in html files being delivered as binary, which then were downloaded by the browser as files instead of displayed as content.

pgrawehr avatar Aug 17 '23 05:08 pgrawehr

I like this idea, but I'm unfamiliar with the package. I'll look into this and get back.

scottoffen avatar Aug 22 '23 20:08 scottoffen

I like this idea, but I'm unfamiliar with the package. I'll look into this and get back.

I didn't know it, either. But it appears to be working and (despite it's low version number) has quite a large number of downloads already.

pgrawehr avatar Aug 23 '23 07:08 pgrawehr

Space Wizards are the developers of the Space Station 14 game. I use a fork of another project maintained by them.

Hyrius avatar Sep 03 '23 07:09 Hyrius

I couldn't get HTTPS to work with SpaceWizzards.HttpListener.HttpListener.

Hyrius avatar Oct 26 '23 20:10 Hyrius