Subject: [hybi] Suggested new WS status code: 1008 "Extension Required"

From: Iñaki Baz Castillo <[email-masked]>
Date: Mon, 22 Aug 2011 20:02:12 +0200

Following the rationale in other thread, I suggest the following new
WS status code:

  1008

     1008 is just sent from client to server when the client decides to
     disconnect due to lack of some extension in the server's
     Sec-WebSocket-Extensions header during 101 response.
     It MAY contain the name of the extension (or extensions separated
     by comma) in the frame payload data after the status code.

This would be useful to inform the server (so it can log it) the
reason of the client's disconnect after WS handshake.

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

---

From: Iñaki Baz Castillo <[email-masked]>
Date: Mon, 22 Aug 2011 20:04:50 +0200

>     by comma) in the frame payload data after the status code.

To clarify, I meant that the name of the affected extensions could be
carried within the reason/description text after the status code
(instead of writting an "human" text). Anyhow the server can do
nothing with it as the connection has been already closed.

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

---

From: Alexey Melnikov <[email-masked]>
Date: Tue, 30 Aug 2011 11:43:42 +0100

>reason of the client's disconnect after WS handshake.
I am personally Ok with adding this. But I would like to hear some 
comments from the WG.

---

From: Greg Wilkins <[email-masked]>
Date: Tue, 30 Aug 2011 23:56:07 +1000

On 30 August 2011 20:43, Alexey Melnikov <[email-masked]> wrote:
> I am personally Ok with adding this. But I would like to hear some comments
> from the WG.

I don't have any issues with such a code.... other than my concern
that we have a few specific codes, but no general s**t happened close
code.
I'm not sure the server can do anything meaningful with the code,
other than log it to gather evidence that it needs to implement the
missing extension.

cheers

---

From: Iñaki Baz Castillo <[email-masked]>
Date: Tue, 30 Aug 2011 16:50:56 +0200

> other than log it to gather evidence that it needs to implement the

Right. That is useful enough IMHO. Logging and debugging is important.
Knowing the reason a client closed the connection after the WS
handshake is good in any case.

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

---

From: Alexey Melnikov <[email-masked]>
Date: Wed, 31 Aug 2011 15:47:27 +0100

>>I am personally Ok with adding this. But I would like to hear some comments
I've added it as 1010.

>other than log it to gather evidence that it needs to implement the
Right.

---

From: Joe Mason <[email-masked]>
Date: Wed, 31 Aug 2011 15:35:24 -0400

> I've added it as 1010.

Why not combine this with the other issue Iñaki identified, and make it "Extension or subprotocol required"?  (I suggest this instead of a separate code mainly to avoid a ballooning number of error codes.)

Joe

---------------------------------------------------------------------
This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.

---

From: Iñaki Baz Castillo <[email-masked]>
Date: Wed, 31 Aug 2011 21:49:49 +0200

> Why not combine this with the other issue Iñaki identified, and make it "Extension or subprotocol required"?  (I suggest this instead of a separate code mainly to avoid a ballooning number of error…

Note that I suggested both ways for rejecting a WS session:

1) Clients provides extensions "aaa" and "bbb" in the HTTP GET but
server just provides "aaa" in HTTP 101, so the client decides to close
the WS session by sending a (now) 1010 code.

2) Clients provides extensions "aaa" and "bbb" in the HTTP GET but
server requires "ccc" so replies HTTP 421 "Extension Required" with a
Sec-WebSocket-Extensions containing the required extensions the client
must support.

Note that 421 "Extension Required" does not exist in HTTP but just in
SIP, but I see no reason to copy it in WebSocket protocol.

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