Subject: [hybi] Which HTTP response must be sent in case of non supported Sec-WebSocket-Protocol ?

From: Iñaki Baz Castillo <[email-masked]>
Date: Wed, 24 Aug 2011 18:38:37 +0200

Hi, I've seen this question in this maillist some times (including
some other mail from me) but AFAIK there is no official reply yet.
Very easy:

- Client handshake includes:
    Sec-WebSocket-Protocol: aaa, bbb, ccc

- Server does not speak aaa, bbb neither ccc, but just ddd.

So I *assume* that the server MUST reject (non-101) the handshake
request. Which HTTP code must it use?

-- 
Iñaki Baz Castillo
<[email-masked]>

---

From: Iñaki Baz Castillo <[email-masked]>
Date: Wed, 24 Aug 2011 18:40:26 +0200

> request. Which HTTP code must it use?

I suggest HTTP 501 Not Implemented:

10.5.2 501 Not Implemented

   The server does not support the functionality required to fulfill the
   request. This is the appropriate response when the server does not
   recognize the request method and is not capable of supporting it for
   any resource.

-- 
Iñaki Baz Castillo
<[email-masked]>