@http · HTTP status codes, explained HTTP/1.1 101 Switching Protocols ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1xx · Informational The server is switching to the protocol you asked for, such as WebSocket. WHAT IT MEANS ──────────────────────────────────────────────────────────── The server agrees to the client's Upgrade request and switches the connection to another protocol, named in the Upgrade header. After this response, the connection no longer speaks HTTP/1.1. Its main use today is opening WebSocket connections. HTTP/2 and HTTP/3 don't use 101; WebSockets there use extended CONNECT instead. WHY YOU'RE SEEING IT ───────────────────────────────────────────────────── → A WebSocket handshake succeeding (Upgrade: websocket). → A client asking for cleartext HTTP/2 with Upgrade: h2c, which is now deprecated. HOW TO FIX IT ──────────────────────────────────────────────────────────── → Nothing to fix. If a WebSocket fails, check that every proxy in front of the server forwards the Upgrade and Connection headers. → In nginx, set proxy_http_version 1.1 and pass both headers explicitly. EXAMPLE RESPONSE ───────────────────────────────────────────────────────── HTTP/1.1 101 Switching Protocols Upgrade: websocket Connection: Upgrade Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo= related 426 Upgrade Required   100 Continue   400 Bad Request spec RFC 9110 §15.2.2 https://www.rfc-editor.org/rfc/rfc9110#section-15.2.2 web https://athttp.com/101 ← curl athttp.com/100 curl athttp.com/102 →