topic
Verified 2026-09-18

HTTP Protocol Upgrade

The Upgrade and Connection fields negotiate a different protocol on an established HTTP/1.1 connection.

Use Upgrade for protocols that define an HTTP/1.1 handshake, such as WebSocket. HTTP/2 and HTTP/3 use their own negotiation mechanisms instead.

httpprotocolupgrade

Reference (http)

Connection: Upgrade
Upgrade: websocket

Use Upgrade for protocols that define an HTTP/1.1 handshake, such as WebSocket. HTTP/2 and HTTP/3 use their own negotiation mechanisms instead.

Common mistakes

  • Forwarding Upgrade as an end-to-end field through a proxy or expecting it to upgrade an HTTP/2 connection.
Permalink: https://merginit.com/reference/http/protocol-upgrade