go/doc/next/6-stdlib/99-minor/net/http/67816.md

653 B

The server and client may be configured to support unencrypted HTTP/2 connections.

When [Server.Protocols] contains UnencryptedHTTP2, the server will accept HTTP/2 connections on unencrypted ports. The server can accept both HTTP/1 and unencrypted HTTP/2 on the same port.

When [Transport.Protocols] contains UnencryptedHTTP2 and does not contain HTTP1, the transport will use unencrypted HTTP/2 for http:// URLs. If the transport is configured to use both HTTP/1 and unencrypted HTTP/2, it will use HTTP/1.

Unencrypted HTTP/2 support uses "HTTP/2 with Prior Knowledge" (RFC 9113, section 3.3). The deprecated "Upgrade: h2c" header is not supported.