Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

normally uses GET and the Upgrade header, not CONNECT


That’s for HTTP/1.1, where WebSockets are really a completely different protocol which “hijacks” the underlying TCP or TCP+TLS stream from HTTP via the Upgrade request.

HTTP/2 has its own concept of streams, so WebSockets can run over a single HTTP/2 stream, and the linked RFC describes extending the CONNECT method to take over a single stream.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: