Subject: [hybi] Closing handshake

From: Anne van Kesteren <[email-masked]>
Date: Wed, 16 Mar 2016 10:57:41 +0100

Per https://tools.ietf.org/html/rfc6455#section-7.1.2 the /code/
argument is required, however, in the API it is optional, and judging
from https://mxr.mozilla.org/mozilla-central/source/dom/webidl/WebSocket.webidl
it is optional in implementations too.

What is the correct behavior here and which specification should be
patched and how?

-- 
https://annevankesteren.nl/

---

From: Takeshi Yoshino <[email-masked]>
Date: Wed, 16 Mar 2016 21:20:52 +0900

I think we should consider that
https://tools.ietf.org/html/rfc6455#section-7.1.2 is broken.

Chrome performs closing handshake with an empty body when a code is not
provided. Firefox does so too.

Takeshi

On Wed, Mar 16, 2016 at 6:57 PM, Anne van Kesteren <[email-masked]> wrote:

> from
> https://mxr.mozilla.org/mozilla-central/source/dom/webidl/WebSocket.webidl

---

From: Takeshi Yoshino <[email-masked]>
Date: Wed, 16 Mar 2016 21:24:53 +0900

> provided. Firefox does so too.

and because, there's no need to have such restriction (making code
mandatory).

---

From: Anne van Kesteren <[email-masked]>
Date: Wed, 16 Mar 2016 13:54:59 +0100

> and because, there's no need to have such restriction (making code

Yeah, seems reasonable. I guess we'll just mention that the RFC is
broken there in the API specification. Won't be the first time.

---

From: Zhong Yu <[email-masked]>
Date: Wed, 16 Mar 2016 12:02:10 -0500

I think the RFC, in its entirety, is pretty clear that the code is optional
in close frame. If the wording has any ambiguity, maybe an editorial errata
is in order.

Zhong Yu
bayou.io

On Wed, Mar 16, 2016 at 7:54 AM, Anne van Kesteren <[email-masked]> wrote:

> _______________________________________________
> hybi mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/hybi
>

---

From: Anne van Kesteren <[email-masked]>
Date: Wed, 16 Mar 2016 18:32:03 +0100

> in close frame. If the wording has any ambiguity, maybe an editorial errata

Sure, the problem is that the API hook requires it, as I mentioned. I
patched this in the API specification:
https://github.com/whatwg/html/pull/889. It's a shame we can't update
the RFC without a lengthy process that nobody probably wants to get
into.

---

From: Alexey Melnikov <[email-masked]>
Date: Wed, 16 Mar 2016 17:45:40 +0000

Hi Anne,

> On 16 Mar 2016, at 17:32, Anne van Kesteren <[email-masked]> wrote:
> 

Updates to existing RFCs is usually much quicker, if the scope of changes is narrow.