New challenge for HTTP/2 clients, preload-link

This commit is contained in:
WeebDataHoarder
2025-04-08 02:17:03 +02:00
parent d2513d2bab
commit 2ce9709667
5 changed files with 110 additions and 8 deletions

View File

@@ -84,6 +84,8 @@ func (v *MultiVar) Set(value string) error {
func newServer(handler http.Handler) *http.Server {
h2s := &http2.Server{}
// TODO: use Go 1.24 Server.Protocols to add H2C
// https://pkg.go.dev/net/http#Server.Protocols
h1s := &http.Server{
Handler: h2c.NewHandler(handler, h2s),
}