diff --git a/content/docs/http3/client.md b/content/docs/http3/client.md index 31465c0..7e3d1e6 100644 --- a/content/docs/http3/client.md +++ b/content/docs/http3/client.md @@ -9,7 +9,7 @@ This package provides a `http.RoundTripper` implementation that can be used on t ```go &http3.RoundTripper{ TLSClientConfig: &tls.Config{}, // set a TLS client config, if desired - QuicConfig: &quic.Config{}, // QUIC connection options + QUICConfig: &quic.Config{}, // QUIC connection options } defer roundTripper.Close() client := &http.Client{ @@ -24,7 +24,7 @@ To use a custom `quic.Transport`, the function used to dial new QUIC connections tr := quic.Transport{} roundTripper := &http3.RoundTripper{ TLSClientConfig: &tls.Config{}, // set a TLS client config, if desired - QuicConfig: &quic.Config{}, // QUIC connection options + QUICConfig: &quic.Config{}, // QUIC connection options Dial: func(ctx context.Context, addr string, tlsConf *tls.Config, quicConf *quic.Config) (quic.EarlyConnection, error) { a, err := net.ResolveUDPAddr("udp", addr) if err != nil { @@ -59,7 +59,7 @@ rt := &http3.RoundTripper{ TLSClientConfig: &tls.Config{ ClientSessionCache: tls.NewLRUClientSessionCache(100), }, - QuicConfig: &quic.Config{ + QUICConfig: &quic.Config{ Allow0RTT: true, }, } diff --git a/content/docs/http3/server.md b/content/docs/http3/server.md index 3ff0fa8..a0c8de8 100644 --- a/content/docs/http3/server.md +++ b/content/docs/http3/server.md @@ -22,7 +22,7 @@ server := http3.Server{ Handler: mux, Addr: "0.0.0.0:443", TLSConfig: http3.ConfigureTLSConfig(&tls.Config{}), // use your tls.Config here - QuicConfig: &quic.Config{}, + QUICConfig: &quic.Config{}, } err := server.ListenAndServe() ``` @@ -73,7 +73,7 @@ var handler http.Handler = http.NewServeMux() // ... add HTTP handlers ... handler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { if r.ProtoMajor < 3 { - err := server.SetQuicHeaders(w.Header()) + err := server.SetQUICHeaders(w.Header()) // ... handle error ... } handler.ServeHTTP(w, r) @@ -85,11 +85,11 @@ handler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { If the HTTP/3 server is located behind an L4 reverse proxy, it might be listening on a different UDP port than the port that is exposed to the internet. To accomodate for this common scenario, the external port can be configured using the `Port` field of the `http3.Server`: ```go server := http3.Server{ - Port: 443, // SetQuicHeaders will now generate the Alt-Svc header for port 443 + Port: 443, // SetQUICHeaders will now generate the Alt-Svc header for port 443 } ``` -More complex scenarios can be handled by manually setting the Alt-Svc header field, or by overwriting the value added by `SetQuicHeaders`. +More complex scenarios can be handled by manually setting the Alt-Svc header field, or by overwriting the value added by `SetQUICHeaders`. ## 0-RTT