The client sends Upgrade: websocket and Connection: Upgrade. If the server agrees it replies 101 Switching Protocols and from then on the bytes on that connection are no longer HTTP.