The server refuses the request over the current protocol and requires an upgrade named in the Upgrade header.
426 Upgrade Required tells the client it must switch protocols (for example to TLS, a newer HTTP version, or WebSocket) before the server will process the request. The response must include an Upgrade header naming the acceptable protocol(s).
ws library answers 426.Upgrade: websocket, and Connection: Upgrade.| Header | Role |
|---|---|
Upgrade | Required: protocols the server will accept. |
HTTP/1.1 426 Upgrade Required
Upgrade: websocket
Connection: Upgrade
Content-Type: text/plain
Upgrade Required