79820111

Date: 2025-11-14 14:07:26
Score: 0.5
Natty:
Report link

This Upgrade mechanism doesn't exist in HTTP/2. HTTP/2 uses multiplexing and binary framing, which is fundamentally incompatible with how WebSockets work.

What Actix Does

When you set up WebSockets in Actix-Web (like in that example), here's what happens:

  1. Even if your server supports HTTP/2, WebSocket connections will always negotiate as HTTP/1.1

  2. The "automatic upgrade to HTTP/2" mentioned in the docs applies to regular HTTP requests, not WebSocket connections

  3. When a client requests a WebSocket upgrade, Actix will handle it over HTTP/1.1 regardless of your HTTP/2 configuration

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: egor10_4