101
1xx InformationalSwitching Protocols
The server is switching protocols as requested by the client.
101 Switching Protocols is the server agreeing to change protocols on the same connection, almost always in reply to a WebSocket handshake (Upgrade: websocket). A healthy WebSocket connection shows a 101 in the browser's network tab. If the upgrade fails you'll get a 4xx or a dropped connection instead, and the culprit is usually a proxy in the middle.
What 101 looks like on the wire
GET /chat HTTP/1.1 Host: example.com Upgrade: websocket Connection: Upgrade Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ== Sec-WebSocket-Version: 13 HTTP/1.1 101 Switching Protocols Upgrade: websocket Connection: Upgrade Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=
About 1xx Informational
The request was received and the process is continuing. These are interim responses you rarely handle directly.
How to fix 101 Switching Protocols
- For failed WebSocket upgrades, make sure the proxy forwards the Upgrade and Connection headers - nginx and most load balancers strip them unless told otherwise.
- Confirm the load balancer or CDN actually supports WebSockets and has the feature enabled.
- Check idle timeouts: proxies with short read timeouts cut long-lived WebSocket connections mid-stream.
Where it's defined
101 Switching Protocols is defined in RFC 9110 §15.2.2. MDN's 101 reference covers browser behavior and examples.