This Upgrade mechanism doesn't exist in HTTP/2. HTTP/2 uses multiplexing and binary framing, which is fundamentally incompatible with how WebSockets work.
When you set up WebSockets in Actix-Web (like in that example), here's what happens:
Even if your server supports HTTP/2, WebSocket connections will always negotiate as HTTP/1.1
The "automatic upgrade to HTTP/2" mentioned in the docs applies to regular HTTP requests, not WebSocket connections
When a client requests a WebSocket upgrade, Actix will handle it over HTTP/1.1 regardless of your HTTP/2 configuration