On 12/08/2015 02:30 AM, Bert Huijben wrote:
The TLS and H2C upgrades both begin in one form and end in a different form. Websockets are kind of different in that they require a bad request response in a specific case. I'm not sure in which protocol this error needs to be send though.
For WebSocket, any upgrade failures have to be sent in the original HTTP/1.1 protocol using HTTP error codes.
WebSocket is different from TLS/h2c because, conceptually, you're upgrading the connection to a specific request target (a ws:// URL). The "response" sent back to the client after the upgrade (if you want to call it a response) is simply the establishment of a WebSocket connection for that URL.
--Jacob