Set new parameters for new WebTransport version

This commit is contained in:
Marco Munizaga
2026-01-19 16:51:03 -05:00
parent afa0e811ca
commit ccdf227e0c
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -15,4 +15,6 @@ var quicConfig = &quic.Config{
Versions: []quic.Version{quic.Version1},
// We don't use datagrams (yet), but this is necessary for WebTransport
EnableDatagrams: true,
// Required for WebTransport
EnableStreamResetPartialDelivery: true,
}
+2
View File
@@ -68,6 +68,7 @@ func newListener(reuseListener quicreuse.Listener, t *transport, isStaticTLSConf
ConnContext: func(ctx context.Context, c *quic.Conn) context.Context {
return context.WithValue(ctx, connKey{}, c)
},
EnableDatagrams: true,
},
CheckOrigin: func(_ *http.Request) bool { return true },
},
@@ -77,6 +78,7 @@ func newListener(reuseListener quicreuse.Listener, t *transport, isStaticTLSConf
mux := http.NewServeMux()
mux.HandleFunc(webtransportHTTPEndpoint, ln.httpHandler)
ln.server.H3.Handler = mux
webtransport.ConfigureHTTP3Server(ln.server.H3)
go func() {
defer close(ln.serverClosed)
for {